55 Commits

Author SHA1 Message Date
Dario Sassi 2eb0ddb509 Extern :
- zlib aggiornamento a versione 1.3.2.
2026-03-05 14:37:40 +01:00
Dario Sassi a6dd289f9d C3d :
- piccola modifica per poter compilare con C++20.
2025-11-24 14:29:13 +01:00
Dario Sassi 516da6d797 Extern :
- Eigen passaggio alla versione 3.4.1.
2025-10-10 15:55:14 +02:00
Riccardo Elitropi 99bc2e75a1 Extern :
- aggiunta libreria hiredis 1.3.0.
2025-09-24 16:04:08 +02:00
SaraP f6b8c50409 Extern :
- Optalog aggiornamento a versione 11.0.
2025-09-12 10:08:10 +02:00
SaraP f05795ffff Extern :
- C3d aggiornamento librerie ( 118044).
2025-08-28 14:47:28 +02:00
Dario Sassi daccdfc398 Extern :
- ricompilazione libzip per dll ufficiali.
2025-08-25 11:29:08 +02:00
SaraP ba09e7d6c4 Extern :
- aggiornamento libzip alla versione 1.11.4.
2025-08-25 11:07:49 +02:00
Dario Sassi ca3cf855d7 Extern :
aggiornata fast_float all'ultima versione disponibile (8.0.2).
2025-08-22 11:36:22 +02:00
Dario Sassi 1f4a74e05d Extern :
- aggiornamento lua a 5.4.8.
2025-07-03 10:10:44 +02:00
SaraP 52f91a1dbb Extern :
- C3d aggiornamento librerie ( 118037).
2025-06-05 08:23:20 +02:00
Dario Sassi eebbd2f314 Extern :
- ricompilazione di vroni.
2025-05-31 11:56:18 +02:00
SaraP fc8d04cbf9 Extern :
- modifiche a Vroni.
2025-05-26 12:26:30 +02:00
SaraP bf6235c0d6 Extern :
- C3d aggiornamento librerie ( 118030).
2025-04-29 09:09:40 +02:00
SaraP 3e22df0c99 Extern :
- aggiunta funzione a Vroni.
2025-04-08 08:34:31 +02:00
SaraP 9b2d995ef5 Extern :
- C3d aggiornamento librerie ( 118029).
2025-04-02 08:30:05 +02:00
SaraP 05ca0d3376 Extern :
- aggiunto FIST 6.8 ( già modificato per integrazione nelle nostre librerie).
2025-03-04 16:37:58 +01:00
SaraP f5f6a9cb47 Extern :
- C3d aggiornamento librerie ( 118027).
2025-02-28 15:40:33 +01:00
SaraP 7cb5ebab3f Extern :
- aggiornamento Vroni a 7.8.
2025-01-29 16:25:40 +01:00
Daniele Bariletti 16a454c806 Merge branch 'master' of https://gitlab.steamware.net/egaltech/Extern 2025-01-27 17:58:05 +01:00
Daniele Bariletti c29bb2924c - ricompilazione di opennurbs x32, con un diverso set strumenti (cambio da v141 a v143). 2025-01-27 17:56:46 +01:00
SaraP 8d0674f107 Extern :
- C3d aggiornamento versione a 32bit per VS2022 ( tolto il limite a Windows Xp per Win32).
2025-01-10 08:53:56 +01:00
Dario Sassi ef759a21fc Extern :
- modifiche per ricompilazione senza limite a Windows Xp per Win32.
2025-01-09 17:46:57 +01:00
Dario Sassi 92e1eacd0d Extern :
- aggiunta libreria fast_float ver 7.0.0.
2025-01-03 12:19:54 +01:00
SaraP 6872a4d4f8 Extern :
- C3d aggiornamento librerie ( 118020).
2024-12-31 08:42:54 +01:00
SaraP d6eac07eea Extern :
- C3d aggiornamento librerie ( 118019).
2024-12-12 08:37:52 +01:00
Dario Sassi ab8d108357 Extern :
- ricompilazione lua.
2024-12-04 14:59:38 +01:00
SaraP 3ab0db8937 Extern :
- C3d aggiornamento librerie ( 118015).
2024-10-29 15:01:17 +01:00
SaraP 881ce088e8 Extern :
- modifiche Vroni.
2024-10-16 16:25:41 +02:00
SaraP 0a27141ada Extern :
- C3d aggiornamento librerie ( 118012).
2024-10-08 16:14:52 +02:00
SaraP 05ac02d9d3 Extern :
- C3d aggiornamento librerie ( 118006).
2024-08-07 14:57:35 +02:00
SaraP acc582883a Extern :
- C3d aggiornamento librerie ( 118002).
2024-07-22 08:33:27 +02:00
SaraP 03112c36b9 Extern :
- correzione Vroni.
2024-07-16 16:33:36 +02:00
SaraP 34454e573f Extern :
- aggiornamento Vroni a 7.7.
2024-07-12 11:47:56 +02:00
SaraP 467692a363 Extern :
- correzione Vroni.
2024-07-09 13:19:12 +02:00
SaraP e6e45144ba Extern :
- modifiche Vroni.
2024-07-09 10:24:43 +02:00
Daniele Bariletti edc7499572 Extern :
- C3d aggiornamento librerie ( 117998).
2024-07-03 10:27:12 +02:00
Dario Sassi 63aa16ad57 Extern :
- aggiornamento lua a 5.4.7.
2024-07-01 17:58:28 +02:00
SaraP 09a338b565 Extern :
- C3d aggiornamento delle librerie ( 117994).
2024-06-05 09:47:32 +02:00
SaraP 827b79f766 Extern :
- C3d aggiornamento delle librerie ( 117987).
2024-04-16 14:59:59 +02:00
SaraP 11460c8668 Extern :
- modifiche Vroni.
2024-04-12 14:53:23 +02:00
SaraP 79f60faa19 Extern :
- C3d aggiornamento delle librerie ( 117978).
2024-03-11 15:03:33 +01:00
SaraP 60ce2e9a94 Extern :
- modifiche Vroni per ottimizzare memoria allocata.
2024-02-27 14:27:02 +01:00
Dario Sassi 145f2f4de6 Extern :
- ricompilazione Vroni.
2024-02-16 08:43:38 +01:00
SaraP f58b677c7b Extern :
- modifiche Vroni.
2024-02-14 11:40:22 +01:00
Daniele Bariletti 2c0768c805 Extern :
- aggiornato gitIgnore.
2024-02-14 11:03:59 +01:00
Dario Sassi d7ead83361 Extern :
- ricomilazione Vroni con copia pdb a 32 bit.
2024-02-13 11:43:28 +01:00
SaraP 60f0922072 Extern :
- C3d aggiornamento delle librerie ( 117975).
2024-02-12 12:45:55 +01:00
SaraP abb1b7aa83 Extern :
- modifiche vroni.
2024-02-12 12:18:23 +01:00
Dario Sassi d0c60ec50a Extern :
- ricompilazione Vroni.
2024-02-02 15:57:44 +01:00
Dario Sassi da51445802 Extern :
- ricompilato Vroni.
2024-01-29 09:26:22 +01:00
SaraP e78a4cd94c Extern :
- modifiche vroni.
2024-01-19 10:26:19 +01:00
Dario Sassi bd8f852517 Extern :
- ricompilazione lib3mf.
2024-01-16 20:12:15 +01:00
Dario Sassi dc0c39aa50 Merge branch 'master' of https://gitlab.steamware.net/egaltech/extern 2024-01-16 11:05:12 +01:00
Dario Sassi 682649803f Extern :
- ricompilazione librerie.
2024-01-16 11:04:53 +01:00
586 changed files with 35553 additions and 12107 deletions
+1
View File
@@ -16,3 +16,4 @@
/bin
/obj
/.vs
/C3d/Include/.vs
+35 -44
View File
@@ -16,6 +16,10 @@
#include <topology.h>
class MbCurveMinMaxCurvatureParams;
class MbCurveMinMaxCurvatureResults;
//------------------------------------------------------------------------------
/** \brief \ru Алгоритмы поиска экстремумов на поверхности.
\en Algorithms for finding extremes on the surface. \~
@@ -25,9 +29,9 @@
*/
enum MbeExtremsSearchingMethod
{
esm_GradientDescent = 1, ///< \ru Mетод градиентного спуска. \en Gradient Descent Method.
esm_LineSegregation = 2, ///< \ru Mетод выделения линий смены убывания / возрастания функции по u и по v. \en The method of segregation of lines of change of decrease / increase of the function in u and v directions.
esm_AdaptiveCells = 3, ///< \ru Mетод адаптивного дробления ячеек. \en Adaptive cell splitting method.
esm_GradientDescent = 1, ///< \ru Метод градиентного спуска. \en Gradient Descent Method.
esm_LineSegregation = 2, ///< \ru Метод выделения линий смены убывания / возрастания функции по u и по v. \en The method of segregation of lines of change of decrease / increase of the function in u and v directions.
esm_AdaptiveCells = 3, ///< \ru Метод адаптивного дробления ячеек. \en Adaptive cell splitting method.
};
@@ -476,46 +480,6 @@ MATH_FUNC( double ) CurveOrientedCurvature( const MbCurve3D & curve,
const MbVector3D * planeNorm = nullptr );
//------------------------------------------------------------------------------
/** \brief \ru Найти точки на кривой, в которых кривизна принимает наибольшее и наименьшее значения.
\en Find the points on the curve at which the curvature takes the largest and smallest values. \~
\details \ru Для плоской кривой наибольшее и наименьшее значение может уходить в отрицательную область.
Для неплоской кривой наибольшее и наименьшее значение всегда неотрицательны.
\en For a flat curve, the largest and smallest value may go into the negative region.
For a non-planar curve, the largest and smallest values are always non-negative. \~
\param[in] curve - \ru Исследуемая кривая.
\en Test curve. \~
\param[out] maxCurv - \ru Наибольшее значение кривизны.
\en The greatest value of curvature. \~
\param[out] maxParam - \ru Точка, в которой кривизна принимает наибольшее значение.
\en The point at which the curvature takes the largest value. \~
\param[out] minCurv - \ru Наименьшее значение кривизны.
\en The smallest value of curvature. \~
\param[out] minParam - \ru Точка, в которой кривизна принимает наименьшее значение.
\en The point at which the curvature takes the smallest value. \~
\param[out] bendPoints - \ru Mассив параметров точек перегиба.
\en Array of parameters of bend points. \~
\param[out] maxPoints - \ru Mассив параметров, в которых достигается локальный максимум кривизны по модулю.
\en An array of parameters in which the local maximum curvature modulo is reached. \~
\param[out] minPoints - \ru Mассив параметров, в которых достигается локальный минимум кривизны по модулю.
\en An array of parameters in which the local minimum curvature modulo is reached. \~
\param[out] rapPoints - \ru Mассив параметров, в которых кривизна терпит разрыв.
Для каждого разрыва вставляются две точки, до и после.
\en Array of parameters in which curvature breaks.
For each break two points are inserted, before and after. \~
\ingroup Algorithms_3D
*/
MATH_FUNC( void ) CurveMinMaxCurvature( const MbCurve3D & curve,
double & maxCurv,
double & maxParam,
double & minCurv,
double & minParam,
c3d::DoubleVector * bendPoints = nullptr,
c3d::DoubleVector * maxPoints = nullptr,
c3d::DoubleVector * minPoints = nullptr,
c3d::DoublePairsVector * rapPoints = nullptr );
//------------------------------------------------------------------------------
/** \brief \ru Направление максимальной нормальной кривизны поверхности.
\en The direction of the maximum normal surface curvature. \~
@@ -637,7 +601,7 @@ public:
\en Edge 1. \~
\param[in] edge2 - \ru Ребро 2.
\en Edge 2. \~
\param[in] аccuracy - \ru Заявленная точность совпадения ребер.
\param[in] accuracy - \ru Заявленная точность совпадения ребер.
\en Claimed edges matching accuracy. \~
\param[in] nm - \ru Именователь с версией операции.
\en Names maker with operation version. \~
@@ -671,6 +635,8 @@ public:
/// \ru Установить режим работы. \en Set operation mode.
void SetOperationMode( OperationMode mode ) { calcMode = mode; }
private:
/// \ru Инциализация по кривой пересечения и граням. \en Initialize by intersection curve and faces.
bool Init( const MbSurfaceIntersectionCurve & initCurve, const MbFace * face1, const MbFace * face2 );
/// \ru Инциализация по ребру. \en Initialize by edge.
bool Init( const MbCurveEdge & );
/// \ru Инциализация по двум ребрам. \en Initialize by edges pair.
@@ -782,4 +748,29 @@ MATH_FUNC( bool ) SurfacesJointMinMaxValues( const MbSurfacesJointAnalysisParams
MbSurfacesJointAnalysisResults & results );
//------------------------------------------------------------------------------
/** \brief \ru Найти точки на кривой, в которых кривизна принимает наибольшее и наименьшее значения.
\en Find the points on the curve at which the curvature takes the largest and smallest values. \~
\details \ru Для плоской кривой наибольшее и наименьшее значение может уходить в отрицательную область.
Для неплоской кривой наибольшее и наименьшее значение всегда неотрицательны. \n
Метод может быть использован для поиска экстремумов, точек разрыва и точек перегиба функции кривизны кривой,
а также для расчета потенциальной энергии кривой. Энергия вычисляется как интеграл от квадрата кривизны по длине кривой. \n
\en For a flat curve, the largest and smallest value may go into the negative region.
For a non-planar curve, the largest and smallest values are always non-negative. \n
The method can be used to find local minimum and maximum, break points and bending points of the curvature function and
to calculate the potential energy of the curve. The energy is calculated as the integral of the square of curvature along the length of the curve. \n \~
\param[in] curve - \ru Исследуемая кривая.
\en Test curve. \~
\param[in] params - \ru Параметры расчета особых точек кривизны кривой и вычисления потенциальной энергии кривой.
\en Parameters for calculation of special points of curvature and curve potential energy.\~
\param[out] results - \ru Результаты поиска особых точек кривизны и вычисления потенциальной энергии кривой.
\en Results of curvature special points search and calculation of curve potential energy.\~
\ingroup Algorithms_3D
\warning \ru В разработке.
\en Under development. \~
*/
MATH_FUNC( void ) CurveMinMaxCurvature( const MbCurve3D & curve,
const MbCurveMinMaxCurvatureParams & params,
MbCurveMinMaxCurvatureResults & results );
#endif // __ACTION_CURVATURE_ANALYSIS_H
+8 -542
View File
@@ -22,13 +22,13 @@
#include <vector>
class MATH_CLASS MbPlacement3D;
class MATH_CLASS MbMesh;
class MATH_CLASS MbSurface;
class MATH_CLASS MbSNameMaker;
class MATH_CLASS MbFace;
class MATH_CLASS MbCollection;
struct MATH_CLASS MbCurvature;
class MbPlacement3D;
class MbMesh;
class MbSurface;
class MbSNameMaker;
class MbFace;
class MbCollection;
struct MbCurvature;
//------------------------------------------------------------------------------
@@ -122,525 +122,14 @@ public:
MbeCreateBRepMode bMode = cbm_Default )
: useRelativeTolerance( useRelTol )
, smoothBoundaryEdges ( smoothBoundary )
, tolerance ( tol )
, bAngle ( angle )
, tolerance ( tol )
, surfReconstructMode ( reconMode )
, brepCreationMode ( bMode )
{}
};
//------------------------------------------------------------------------------
/** \brief \ru Параметры вписывания поверхности.
\en Parameters of surface fitting. \~
\ingroup Polygonal_Objects
*/
// ---
class MATH_CLASS MbSurfaceFitToGridParameters {
private:
MbeSpaceType _surfaceType; ///< \ru Тип поверхности. \en A surface type.
double _tolerance; ///< \ru Точность распознавания. \en A fitting tolerance.
c3d::IndicesVector _indicies; ///< \ru Индексы полигонов сетки. \en Indicies of polygons.
MbeRejectOutliersType _typeReject; ///< \ru Способ отбраковки выбросов. \en Outliers rejection mode.
double _valueReject; ///< \ru Пороговое значения для отбраковки выбросов. \en Outliers rejection mode treshold value.
MbSurfaceFitConstraint _fitConstraint; ///< \ru Ограничение. \en Constraint.
size_t _pointsFittingMax; ///< \ru Максимальное количество точек для вписывания. \en Maximum count of fitting points.
bool _withRefinement; ///< \ru Уточнять ли поверхность по всем точкам. \en Refine the surface by all the points or not.
///< \ru Предельные значения параметров аналитических поверхностей. \en Thresholds for analytical surfaces parameters.
double _angleConeMin; ///< \ru Минимально возможный половинный угол конуса (градусы). \en Mininmum allowed cone half-angle ( degrees ).
double _angleConeMax; ///< \ru Максимально возможный половинный угол конуса (градусы). \en Maximum allowed cone half-angle( degrees ).
double _radiusAnalyticShapeMax; ///< \ru Максимально возможный радиальный размер аналитических поверхностей. \en Maximum allowed analytical shapes radial size.
///< \ru Параметры для вписывания нурбс поверхности. \en NURBs surface fitting parameters.
size_t _order; ///< \ru Порядок нурбс поверхности. \en NURBs surface order.
size_t _countCpMax; ///< \ru Максимально разрешенное количество контрольных точек. \en Maximum allowed control points count.
double _smoothCoef; ///< \ru Коэффициент сглаживания [1e-9 - 1e-3]. \en Smoothing coefficient [1e-9 - 1e-3].
private:
/// \ru Конструктор по умолчанию. \en Default constructor.
MbSurfaceFitToGridParameters()
: _surfaceType ( st_Undefined )
, _tolerance ( c3d::DELTA_MIN )
, _indicies ( )
, _typeReject ( rot_NoReject )
, _valueReject ( 0. )
, _pointsFittingMax ( 10000 )
, _withRefinement ( false )
, _order ( c3d::NURBS_DEGREE )
, _countCpMax ( c3d::NURBS_POINTS_MAX_COUNT )
, _smoothCoef ( METRIC_ACCURACY )
, _angleConeMin ( 1. )
, _angleConeMax ( 89. )
, _radiusAnalyticShapeMax( 1500. )
{}
public:
/// \ru Конструктор по параметрам. \en Constructor by parameters.
explicit MbSurfaceFitToGridParameters( MbeSpaceType surfaceType,
double tolerance,
const c3d::IndicesVector & indicies )
: _surfaceType ( surfaceType )
, _tolerance ( tolerance )
, _indicies ( indicies )
, _typeReject ( rot_NoReject )
, _valueReject ( 0. )
, _pointsFittingMax ( 10000 )
, _withRefinement ( false )
, _order ( c3d::NURBS_DEGREE )
, _countCpMax ( c3d::NURBS_POINTS_MAX_COUNT )
, _smoothCoef ( METRIC_ACCURACY )
, _angleConeMin ( 1. )
, _angleConeMax ( 89. )
, _radiusAnalyticShapeMax( 1500. )
{}
/// \ru Конструктор по параметрам. \en Constructor by parameters.
explicit MbSurfaceFitToGridParameters( MbeSpaceType surfaceType,
double tolerance,
const c3d::IndicesVector & indicies,
MbeRejectOutliersType rejectType,
double rejectValue )
: _surfaceType ( surfaceType )
, _tolerance ( tolerance )
, _indicies ( indicies )
, _typeReject ( rejectType )
, _valueReject ( rejectValue )
, _pointsFittingMax ( 10000 )
, _withRefinement ( false )
, _order ( c3d::NURBS_DEGREE )
, _countCpMax ( c3d::NURBS_POINTS_MAX_COUNT )
, _smoothCoef ( METRIC_ACCURACY )
, _angleConeMin ( 1. )
, _angleConeMax ( 89. )
, _radiusAnalyticShapeMax( 1500. )
{}
/// \ru Конструктор по параметрам для вписывания аналитических поверхностей. \en Constructor by parameters for analytic surfaces fitting.
explicit MbSurfaceFitToGridParameters( MbeSpaceType surfaceType,
double tolerance,
const c3d::IndicesVector & indicies,
MbeRejectOutliersType rejectType,
double rejectValue,
double angleConeMin,
double angleConeMax,
double radiusAnalyticShapeMax )
: _surfaceType ( surfaceType )
, _tolerance ( tolerance )
, _indicies ( indicies )
, _typeReject ( rejectType )
, _valueReject ( rejectValue )
, _pointsFittingMax ( 10000 )
, _withRefinement ( false )
, _order ( c3d::NURBS_DEGREE )
, _countCpMax ( c3d::NURBS_POINTS_MAX_COUNT )
, _smoothCoef ( METRIC_ACCURACY )
, _angleConeMin ( angleConeMin )
, _angleConeMax ( angleConeMax )
, _radiusAnalyticShapeMax( radiusAnalyticShapeMax )
{}
/// \ru Конструктор по параметрам для вписывания нурбс поверхности. \en Constructor by parameters for NURBs surface fitting.
explicit MbSurfaceFitToGridParameters( MbeSpaceType surfaceType,
double tolerance,
const c3d::IndicesVector & indicies,
size_t order,
size_t countCpMax,
double smoothCoef )
: _surfaceType ( surfaceType )
, _tolerance ( tolerance )
, _indicies ( indicies )
, _typeReject ( rot_NoReject )
, _valueReject ( 0. )
, _pointsFittingMax ( 10000 )
, _withRefinement ( false )
, _order ( order )
, _countCpMax ( countCpMax )
, _smoothCoef ( smoothCoef )
, _angleConeMin ( 1. )
, _angleConeMax ( 89. )
, _radiusAnalyticShapeMax( 1500. )
{}
/// \ru Выдать тип поверхности. \en Get surface type.
MbeSpaceType GetSurfaceType() const { return _surfaceType; }
/// \ru Выдать точность распознавания. \en Get fitting tolerance.
double GetTolerance() const { return _tolerance; }
/// \ru Выдать индексы полигонов. \en Get indicies of polygons.
const c3d::IndicesVector & GetIndicies() const { return _indicies; }
/// \ru Выдать метод отбраковки выбросов. \en Get outliers rejection mode.
MbeRejectOutliersType GetOutliersRejectionMode() const { return _typeReject; }
/// \ru Выдать пороговое значения для отбраковки выбросов. \en Get outliers rejection mode treshold value.
double GetOutliersRejectionValue() const { return _valueReject; }
/// \ru Выдать порядок нурбс поверхности. \en Get NURBs order.
size_t GetNurbsOrder() const { return _order; }
/// \ru Выдать максимально разрешенное количество контрольных точек. \en Get maximum allowed control points count.
size_t GetCountCpMax() const { return _countCpMax; }
/// \ru Выдать коэффициент сглаживания. \en Get smoothing coefficient.
double GetSmoothCoef() const { return _smoothCoef; }
/// \ru Выдать минимально возможный половинный угол конуса. \en Get mininmum allowed cone half-angle.
double GetAngleConeMin() const { return _angleConeMin; }
/// \ru Выдать максимально возможный половинный угол конуса. \en Get maximum allowed cone half-angle.
double GetAngleConeMax() const { return _angleConeMax; }
/// \ru Выдать максимально возможный радиальный размер аналитических поверхностей. \en Get maximum allowed analytical shapes radial size.
double GetRadiusAnalyticShapeMax() const { return _radiusAnalyticShapeMax; }
/// \ru Выдать ограничение. \en Get the constraint.
const MbSurfaceFitConstraint & GetFitConstraint() const { return _fitConstraint; }
/// \ru Выдать максимальное количество точек для вписывания. \en Get the maximum count of fitting points.
size_t GetPointsFittingMax() const { return _pointsFittingMax; }
/// \ru Выдать флаг уточнения поверхности по всем точкам. \en Get the flag of surface refinement by all the points.
bool GetWithRefinement() const { return _withRefinement; }
/// \ru Установить предельные значения параметров аналитических поверхностей. \en Set thresholds for analytical surfaces parameters.
void SetAnalyticBounds( double angleConeMin, double angleConeMax, double radiusAnalyticShapeMax )
{
_angleConeMin = angleConeMin;
_angleConeMax = angleConeMax;
_radiusAnalyticShapeMax = radiusAnalyticShapeMax;
}
/// \ru Установить параметры для вписывания нурбс поверхности. \en Set NURBs surface fitting parameters.
void SetNurbsFitParams( size_t order, size_t countCpMax, double smoothCoef )
{
_order = order;
_countCpMax = countCpMax;
_smoothCoef = smoothCoef;
}
/** \brief \ru Ограничить ось примитива.
\en Add an axis constraint. \~
\details \ru Ограничить ось цилиндра, конуса или тора, а также нормаль плоскости.
По умолчанию ось примитива или нормаль плоскости будет коллинеарна направлению direction.
Дополнительно можно задать желаемый угол angle между осью примитива или нормалью плоскости и заданным направлением из промежутка [0; П/2].
Для построения плоскости с нормалью, которая перпендикулярна заданному направлению, необходимо задать угол П/2.
Функция сбрасывает выставленные ранее ограничения на ось.
\en Add an axis constraint to a cylinder, cone, torus or plane.
The axis of a primitive or plane normal will be collinear to a given direction by default.
Besides there may be given a desired angle between the axis of a primitive or plane normal and a given direction from [0; П/2].
Fitting a plane with a normal, which is perpendicular to a given direction, implies an angle П/2.
The function resets all previous axis constraints. \~
\param[in] direction - \ru Эталонное направление.
\en Reference direction. \~
\param[in] angle - \ru Угол между осью примитива и заданным направлением.
\en Angle between the axis of a primitive and a given direction. \~
\return \ru Возвращает true, если задан корректный угол, и false - иначе.
\en Returns true, if an angle is correct, or false otherwise. \~
\ingroup Polygonal_Objects
*/
bool AddAxisConstraint( const MbVector3D & direction, double angle = 0. )
{
return _fitConstraint.AddAxisConstraint( direction, angle );
}
/** \brief \ru Зафиксировать ось примитива.
\en Add a coaxial constraint. \~
\details \ru Зафиксировать ось цилиндра, конуса, тора или сферы.
Вписывается примитив с заданной осью.
Если вписывается сфера, ее центр лежит на заданной оси.
Функция сбрасывает выставленные ранее ограничения на ось.
\en Add a coaxial constraint to a cylinder, cone, torus or sphere.
A primitive will be fit with a given axis.
If a sphere is fit, its center lies on a given axis.
The function resets all previous axis constraints. \~
\param[in] axis - \ru Ось.
\en Axis. \~
\ingroup Polygonal_Objects
*/
void AddCoaxialConstraint( const MbAxis3D & axis )
{
return _fitConstraint.AddCoaxialConstraint( axis );
}
/** \brief \ru Зафиксировать радиус цилиндра.
\en Fix cylinder radius. \~
\details \ru Зафиксировать радиус цилиндра.
Радиус должен быть положительным.
\en Fix cylinder radius.
The value has to be positive. \~
\param[in] radius - \ru Радиус цилиндра.
\en Cylinder radius. \~
\return \ru Возвращает true, если задан корректный радиус, и false - иначе.
\en Returns true, if a radius is correct, or false otherwise. \~
\ingroup Polygonal_Objects
*/
bool AddCylinderRadiusConstraint( double radius )
{
return _fitConstraint.AddCylinderRadiusConstraint( radius );
}
/** \brief \ru Зафиксировать радиус сферы.
\en Fix sphere radius. \~
\details \ru Зафиксировать радиус сферы.
Радиус должен быть положительным.
\en Fix sphere radius.
The value has to be positive. \~
\param[in] radius - \ru Радиус сферы.
\en Sphere radius. \~
\return \ru Возвращает true, если задан корректный радиус, и false - иначе.
\en Returns true, if a radius is correct, or false otherwise. \~
\ingroup Polygonal_Objects
*/
bool AddSphereRadiusConstraint( double radius )
{
return _fitConstraint.AddSphereRadiusConstraint( radius );
}
/** \brief \ru Зафиксировать угол конуса.
\en Fix cone angle. \~
\details \ru Зафиксировать угол конуса.
Угол должен быть из промежутка (0; П/2).
\en Fix cone angle.
The angle has to be from (0; П/2). \~
\param[in] angle - \ru Угол конуса.
\en Cone angle. \~
\return \ru Возвращает true, если задан корректный угол, и false - иначе.
\en Returns true, if an angle is correct, or false otherwise. \~
\ingroup Polygonal_Objects
*/
bool AddConeAngleConstraint( double angle )
{
return _fitConstraint.AddConeAngleConstraint( angle );
}
/** \brief \ru Зафиксировать радиусы тора.
\en Fix torus radii. \~
\details \ru Зафиксировать радиусы тора.
Можно зафиксировать большой и малый радиусы тора (только один их них или сразу оба).
Значения должны быть положительными (=0 - значение не зафиксировано).
\en Fix torus radii.
There may be fixed the major radius (_size1) or the minor radius (_size2) of a torus (one or both of them).
The values have to be positive (=0 - value is not fixed). \~
\param[in] majorRadius - \ru Большой радиус тора.
\en Major torus radius. \~
\param[in] minorRadius - \ru Малый радиус тора.
\en Minor torus radius. \~
\return \ru Возвращает true, если заданы корректные радиусы, и false - иначе.
\en Returns true, if radii are correct, or false otherwise. \~
\ingroup Polygonal_Objects
*/
bool AddTorusRadiiConstraint( double majorRadius, double minorRadius )
{
return _fitConstraint.AddTorusRadiiConstraint( majorRadius, minorRadius );
}
/** \brief \ru Установить ограничение типа XYW.
\en Set the XYW-constraint. \~
\details \ru Установить ограничение типа XYW.
Ограничение типа XYW допускает только параллельный перенос вдоль осей OX и OY и поворот вокруг оси OZ заданной системы координат.
Для плоскости, цилиндра, конуса или тора должен быть зафиксирован угол theta между осью объекта и осью OZ заданной СК.
Угол theta должен принадлежать отрезку [0; П/2].
Для сферы должна быть зафиксирована координата z ее центра в заданной СК.
Для тора должна быть зафиксирована координата z центра его направляющей окружности в заданной СК.
При необходимости можно зафиксировать размерные параметры объекта.
Функция сбрасывает выставленные ранее ограничения (например, добавленные с помощью методов "Add*Constraint").
\en Set the XYW-constraint.
Translation along the OX и OY axes and rotation about the OZ axis of a local coordinate system are only allowed.
For a plane, a cylinder, a cone or a torus there has to be fixed the angle theta between an object's axis and the OZ axis of a given coordinate system.
The angle theta has to belong to [0; П/2].
For a sphere there has to be fixed the Z coordinate of its center.
For a torus there has to be fixed the Z coordinate of its directrix circle.
There may be fixed some dimensional parameters of an object if necessary.
The function resets all previous constraints (for example, having been set by "Add*Constraint"). \~
\param[in] typeSurface - \ru Тип поверхности.
\en Surface type. \~
\param[in] typeDim - \ru Тип размерного ограничения.
\en Dimensional constraint type. \~
\param[in] fixedValues - \ru Фиксированные значения параметров поверхности.
\en Structure with fixed values of surface parameters. \~
\param[in] place - \ru Локальная система координат.
\en Local coordinate system. \~
\return \ru Возвращает код результата операции.
\en Returns operation result code. \~
\ingroup Polygonal_Objects
*/
MbResultType SetFitConstraintXYW( MbeSpaceType typeSurface,
MbeDimensionalConstraintType typeDim,
const MbConstraintFixedValues & fixedValues,
const MbPlacement3D & place )
{
return _fitConstraint.InitializeXYW( typeSurface, typeDim, fixedValues, place );
}
/** \brief \ru Установить ограничение типа Z.
\en Set the Z-constraint. \~
\details \ru Установить ограничение типа Z.
Ограничение типа Z допускает только сдвиг вдоль оси OZ заданной системы координат.
Для плоскости, цилиндра, конуса или тора должны быть зафиксированы:
- зенитный угол theta: угол между осью объекта и осью OZ заданной СК, должен принадлежать отрезку [0; П/2],
- азимутальный угол phi: угол между проекцией оси объекта на плоскость OXY и осью OX заданной СК,
должен принадлежать промежутку [0; 2П).
Для цилиндра, конуса или тора должны быть зафиксированы координаты x и y некоторой точки на оси объекта.
Для сферы должны быть зафиксированы координаты x и y ее центра в заданной СК.
При необходимости можно зафиксировать размерные параметры объекта.
Функция сбрасывает выставленные ранее ограничения (например, добавленные с помощью методов "Add*Constraint").
\en Set the Z-constraint.
Translation along the OZ axis of a local coordinate system is only allowed.
For a plane, a cylinder, a cone or a torus there have to be fixed:
- the zenith angle theta: the angle between an object's axis and the OZ axis of a given CS, has to belong to [0; П/2],
- the azimuthal angle phi: the angle between the projection of an object's axis onto the OXY plane
and the OX axis of a given CS, has to belong to [0; 2П).
For a cylinder, a cone or a torus there have to be fixed the X and Y coordinates of a point of an object's axis.
For a sphere there have to be fixed the X and Y coordinates of its center.
There may be fixed some dimensional parameters of an object if necessary.
The function resets all previous constraints (for example, having been set by "Add*Constraint"). \~
\param[in] typeSurface - \ru Тип поверхности.
\en Surface type. \~
\param[in] typeDim - \ru Тип размерного ограничения.
\en Dimensional constraint type. \~
\param[in] fixedValues - \ru Фиксированные значения параметров поверхности.
\en Structure with fixed values of surface parameters. \~
\param[in] place - \ru Локальная система координат.
\en Local coordinate system. \~
\return \ru Возвращает код результата операции.
\en Returns operation result code. \~
\ingroup Polygonal_Objects
*/
MbResultType SetFitConstraintZ( MbeSpaceType typeSurface,
MbeDimensionalConstraintType typeDim,
const MbConstraintFixedValues & fixedValues,
const MbPlacement3D & place )
{
return _fitConstraint.InitializeZ( typeSurface, typeDim, fixedValues, place );
}
/** \brief \ru Установить ограничение типа XYZ.
\en Set the XYZ-constraint. \~
\details \ru Установить ограничение типа XYZ.
Ограничение типа XYZ допускает только параллельный перенос (запрещены повороты вокруг координатных осей заданной системы координат).
Для плоскости, цилиндра, конуса или тора должны быть зафиксированы:
- зенитный угол theta: угол между осью объекта и осью OZ заданной СК, должен принадлежать отрезку [0; П/2],
- азимутальный угол phi: угол между проекцией оси объекта на плоскость OXY и осью OX заданной СК,
должен принадлежать промежутку [0; 2П).
При необходимости можно зафиксировать размерные параметры объекта.
Функция сбрасывает выставленные ранее ограничения (например, добавленные с помощью методов "Add*Constraint").
\en Set the XYZ-constraint.
Translation is only allowed (any rotation is forbidden).
For a plane, a cylinder, a cone or a torus there have to be fixed:
- the zenith angle theta: the angle between an object's axis and the OZ axis of a given CS, has to belong to [0; П/2],
- the azimuthal angle phi: the angle between the projection of an object's axis onto the OXY plane
and the OX axis of a given CS, has to belong to [0; 2П).
There may be fixed some dimensional parameters of an object if necessary.
The function resets all previous constraints (for example, having been set by "Add*Constraint"). \~
\param[in] typeSurface - \ru Тип поверхности.
\en Surface type. \~
\param[in] typeDim - \ru Тип размерного ограничения.
\en Dimensional constraint type. \~
\param[in] fixedValues - \ru Фиксированные значения параметров поверхности.
\en Structure with fixed values of surface parameters. \~
\param[in] place - \ru Локальная система координат.
\en Local coordinate system. \~
\return \ru Возвращает код результата операции.
\en Returns operation result code. \~
\ingroup Polygonal_Objects
*/
MbResultType SetFitConstraintXYZ( MbeSpaceType typeSurface,
MbeDimensionalConstraintType typeDim,
const MbConstraintFixedValues & fixedValues,
const MbPlacement3D & place )
{
return _fitConstraint.InitializeXYZ( typeSurface, typeDim, fixedValues, place );
}
/** \brief \ru Установить ограничение типа ZW.
\en Set the ZW-constraint. \~
\details \ru Установить ограничение типа ZW.
Ограничение типа ZW допускает только сдвиг вдоль оси OZ и поворот вокруг оси OZ заданной системы координат.
Для плоскости, цилиндра, конуса или тора должны быть зафиксированы:
- зенитный угол theta: угол между осью объекта и осью OZ заданной СК, должен принадлежать отрезку [0; П/2],
- начальный азимутальный угол phi: угол между проекцией оси объекта в начальной позиции на плоскость OXY и осью OX заданной СК,
должен принадлежать промежутку [0; 2П),
- расстояние dist от оси OZ заданной СК до оси объекта.
Для cферы должно быть зафиксировано расстояние dist от ее центра до оси OZ заданной СК.
При необходимости можно зафиксировать размерные параметры объекта.
Функция сбрасывает выставленные ранее ограничения (например, добавленные с помощью методов "Add*Constraint").
\en Set the ZW-constraint.
Translation along the OZ axis and rotation about the OZ axis of a local coordinate system are only allowed.
For a plane, a cylinder, a cone or a torus there have to be fixed:
- the zenith angle theta: the angle between an object's axis and the OZ axis of a given CS, has to belong to [0; П/2],
- the initial azimuthal angle phi: the angle between the projection of an object's axis in the initial position onto the OXY plane
and the OX axis of a given CS, has to belong to [0; 2П),
- the distance between an object's axis the OZ axis of a given CS.
For a sphere there has to be fixed the distance between its center and the OZ axis of a given CS.
There may be fixed some dimensional parameters of an object if necessary.
The function resets all previous constraints (for example, having been set by "Add*Constraint"). \~
\param[in] typeSurface - \ru Тип поверхности.
\en Surface type. \~
\param[in] typeDim - \ru Тип размерного ограничения.
\en Dimensional constraint type. \~
\param[in] fixedValues - \ru Фиксированные значения параметров поверхности.
\en Structure with fixed values of surface parameters. \~
\param[in] place - \ru Локальная система координат.
\en Local coordinate system. \~
\return \ru Возвращает код результата операции.
\en Returns operation result code. \~
\ingroup Polygonal_Objects
*/
MbResultType SetFitConstraintZW( MbeSpaceType typeSurface,
MbeDimensionalConstraintType typeDim,
const MbConstraintFixedValues & fixedValues,
const MbPlacement3D & place )
{
return _fitConstraint.InitializeZW( typeSurface, typeDim, fixedValues, place );
}
/// \ru Установить максимальное количество точек для вписывания. \en Set the maximum count of fitting points.
void SetPointsFittingMax( size_t value ) { _pointsFittingMax = value; }
/// \ru Установить флаг уточнения поверхности по всем точкам. \en Set the flag of surface refinement by all the points.
void SetWithRefinement( bool value ) { _withRefinement = value; }
OBVIOUS_PRIVATE_COPY( MbSurfaceFitToGridParameters )
};
//------------------------------------------------------------------------------
/** \brief \ru Результат вписывания поверхности.
\en Parameters of surface fitting. \~
\ingroup Polygonal_Objects
*/
// ---
class MATH_CLASS MbSurfaceFitToGridResults {
private:
c3d::SurfaceSPtr _surface; ///< \ru Поверхность. \en A surface.
double _devMax; ///< \ru Максимальное получившееся отклонение. \en A maximal deviation.
double _devMean; ///< \ru Среднее получившееся отклонение. \en A mean deviation.
double _rmsd; ///< \ru Среднее квадратическое отклонение. \en A root-mean-square deviation.
public:
/// \ru Конструктор по умолчанию. \en Default constructor.
MbSurfaceFitToGridResults()
: _surface( nullptr )
, _devMax ( 0.0 )
, _devMean( 0.0 )
, _rmsd ( 0.0 )
{}
/// \ru Конструктор по параметрам. \en Constructor by parameters.
MbSurfaceFitToGridResults( MbSurface * surface, double tolerance )
: _surface( surface )
, _devMax ( tolerance )
, _devMean( 0.0 )
, _rmsd ( 0.0 )
{}
/// \ru Конструктор по параметрам. \en Constructor by parameters.
MbSurfaceFitToGridResults( MbSurface * surface, double devMax, double devMean, double rmsd )
: _surface( surface )
, _devMax ( devMax )
, _devMean( devMean )
, _rmsd ( rmsd )
{}
/// \ru Инициализировать данные. \en Initialize data.
void Init( MbSurface * surface, double tolerance ) {
_surface = surface;
_devMax = tolerance;
_devMean = 0.;
_rmsd = 0.;
}
/// \ru Инициализировать данные. \en Initialize data.
void Init( MbSurface * surface, double devMax, double devMean, double rmsd ) {
_surface = surface;
_devMax = devMax;
_devMean = devMean;
_rmsd = rmsd;
}
/// \ru Выдать поверхность. \en Get surface.
c3d::SurfaceSPtr GetSurface() const { return _surface; }
/// \ru Выдать максимальное отклонение. \en Get maximal deviation.
double GetTolerance() const { return _devMax; }
/// \ru Выдать среднее отклонение. \en Get mean deviation.
double GetMeanDeviation() const { return _devMean; }
/// \ru Выдать cреднее квадратическое отклонение. \en Get root-mean-square deviation.
double GetRmsd() const { return _rmsd; }
OBVIOUS_PRIVATE_COPY( MbSurfaceFitToGridResults )
};
//------------------------------------------------------------------------------
/** \brief \ru Класс для создания оболочки в граничном представлении по полигональной сетке.
\en Class for creating a BRep shell by polygonal mesh. \~
@@ -979,27 +468,4 @@ MATH_FUNC( MbResultType ) ConvertMeshToShell( MbMesh & mesh, MbFaceShell *& shel
// ---
MATH_FUNC( MbResultType ) ConvertCollectionToShell( MbCollection & collection, MbFaceShell *& shell, const MbMeshProcessorValues & params = MbMeshProcessorValues() );
//------------------------------------------------------------------------------
/** \brief \ru Вписать поверхность в множество полигонов сетки.
\en Fit the surface into polygon set. \~
\details \ru Вписать поверхность заданного типа в множество полигонов триангуляции. \n
В случае если множество полигонов не задано, используются
все полигоны триангуляции.
\en 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 Параметры вписывания поверхности.
\en The fitting parameters. \~
\param[out] results - \ru Результаты вписывания поверхности.
\en Results of surface fitting. \~
\return \ru Возвращает код результата операции.
\en Returns operation result code. \~
\warning \ru В разработке.
\en Under development. \~
\ingroup Polygonal_Objects
*/
// ---
MATH_FUNC( MbResultType ) FitSurfaceToGrid( const MbGrid & grid, const MbSurfaceFitToGridParameters & params, MbSurfaceFitToGridResults & results );
#endif // __ACTION_B_SHAPER_H
+69 -16
View File
@@ -16,20 +16,18 @@
#include <templ_s_array.h>
#include <mb_cart_point.h>
#include <plane_item.h>
#include <mb_operation_result.h>
#include <vector>
#include <op_curve_parameter.h>
class MATH_CLASS MbPlacement3D;
class MATH_CLASS MbCurve;
class MATH_CLASS MbContour;
class MATH_CLASS MbCurve3D;
class MATH_CLASS MbSurface;
class MATH_CLASS MbSNameMaker;
class MATH_CLASS MbFace;
class MATH_CLASS MbCurveFitParameters;
class MATH_CLASS MbCurveFitResults;
class MbPlacement3D;
class MbCurve;
class MbContour;
class MbCurve3D;
class MbSurface;
class MbSNameMaker;
class MbFace;
class MbCurveFitParameters;
class MbCurveFitResults;
//------------------------------------------------------------------------------
/** \brief \ru Перечисление способов создания эллипса (окружности) или их дуг в двумерном пространстве.
@@ -151,7 +149,7 @@ MATH_FUNC (MbResultType) Segment( const MbCartPoint & point1,
\param[in] createWay - \ru Способ создания. Определяет как интерпретировать входные параметры.
\en Create way. Defines how to interpret the input parameters.\~
\param[in] center - \ru Центр
\en Сenter. \~
\en Center. \~
\param[in] points - \ru Конечные точки или точки через которые проходит кривая.
\en Endpoints or points through which the curve passes. \~
\param[in,out] a - \ru Интерпретация параметра зависит от способа создания дуги, см. enum #ArcCreateWay
@@ -462,8 +460,8 @@ MATH_FUNC (MbContour *) DuplicateContour( const MbContour & cntr,
\en Create an offset curve. \~
\details \ru Создать эквидистантную кривую по базовой кривой и смещению в крайних точках. \n
\en Create the offset curve for a given curve with offset in the begin and the end points. \n \~
\param[in] curve - \ru Базовая кривая.
\en Base curve. \~
\param[in] curve - \ru Базовая кривая. Не может быть контуром или ломаной.
\en Base curve. Cannot be a contour or polyline. \~
\param[in] offset1 - \ru Смещение в точке Tmin базовой кривой.
\en Offset distance on point Tmin of base curve. \~
\param[in] offset2 - \ru Смещение в точке Tmax базовой кривой.
@@ -515,7 +513,7 @@ MATH_FUNC (MbContour *) OffsetContour( const MbContour & cntr,
/** \brief \ru Создать эквидистантный контур, начинающийся и оканчивающийся на оси вращения.
\en Create an offset contour with start and end points on the rotation axis. \~
\details \ru Создать незамкнутый эквидистантный контур, начинающийся и оканчивающийся на оси вращения. \n
Cчитается, что, если контур замкнуть, то он будет ориентирован против движения часовой стрелки. \n
Считается, что, если контур замкнуть, то он будет ориентирован против движения часовой стрелки. \n
\en Create an open offset contour with start and end points on the rotation axis. \n
It is considered that if one closes the contour, it will be oriented counterclockwise. \n \~
\param[in] cntr - \ru Исходный контур.
@@ -810,6 +808,35 @@ MATH_FUNC( MbContour * ) DeleteDegenerateSegments( const MbContour & cntr,
MbSNameMaker * names = nullptr );
//------------------------------------------------------------------------------
/** \brief \ru Удалить самопересечения из контура.
\en Remove self-intersections from contour. \~
\details \ru Если контур самопересекается, удаляет части контура, чтобы в результате не осталось самопересечений. \n
\en If the contour self-intersects, removes parts of the contour so that the result is free of self-intersections. \n \~
\param[in, out] contour - \ru Исходный контур для изменения.
\en The initial contour to be modified. \~
\param[in] params - \ru Параметры операции.
\en Operation parameters. \~
\param[out] parts - \ru Набор несамопересекающихся замкнутых контуров, оставшихся после удаления самопересечений.
\en The set of non-self-intersecting closed contours remaining after removing self-intersections. \~
\return \ru Возвращает код результата операции:
MbResultType::rt_NoIntersect, если самопересечений не найдено;
MbResultType::rt_Success, если самопересечения успешно удалены;
MbResultType::rt_Error в случае ошибки выполнения операции.
\en Returns operation result code:
MbResultType::rt_NoIntersect if no self-intersections were found;
MbResultType::rt_Success if self-intersections were successfully removed;
MbResultType::rt_Error if the operation failed. \~
\ingroup Curve_Modeling
\warning \ru В разработке.
\en Under development. \~
*/
// ---
MATH_FUNC( MbResultType ) RemoveSelfIntersections( MbContour & contour,
const MbRemoveSelfIntParams & params,
std::vector<SPtr<MbContour>> * parts = nullptr );
//------------------------------------------------------------------------------
/** \brief \ru Установить параметризацию кривой пропорционально длине кривой.
\en Set curve parametrization proportional to the curve length. \~
@@ -849,4 +876,30 @@ MATH_FUNC ( MbCurve * ) SetProportionalParametrization( MbCurve * curve,
*/
// ---
MATH_FUNC( MbResultType ) FitCurve( const MbCurveFitParameters & params, MbCurveFitResults & results );
//------------------------------------------------------------------------------
/** \brief \ru Построить срединную кривую.
\en Create median curve. \~
\details \ru Построить срединную кривую.
\en Create median curve. \~
\param[in] baseCurve - \ru Базовая кривая.
\en The base curve. \~
\param[in] responseCurve - \ru Ответная кривая.
\en The response curve. \~
\param[in] params - \ru Параметры построения.
\en The parameters for creating median curve. \~
\param[out] results - \ru Результаты построения.
\en The results of creating median curve. \~
\return \ru Возвращает код результата операции.
\en Returns operation result code. \~
\ingroup Curve_Modeling
\warning \ru В разработке.
\en Under development. \~
*/
// ---
MATH_FUNC( MbResultType ) MedianCurve( const MbCurve & baseCurve,
const MbCurve & responseCurve,
const MbMedianCurveParams & params,
MbMedianCurveResults & results );
#endif // __ACTION_CURVE_H
+60 -92
View File
@@ -22,29 +22,29 @@
#include <templ_sptr.h>
#include <mb_cart_point3d.h>
#include <space_item.h>
#include <curve3d.h>
#include <mb_operation_result.h>
#include <vector>
class MATH_CLASS MbCurve;
class MATH_CLASS MbCurve3D;
class MATH_CLASS MbContour3D;
class MATH_CLASS MbWireFrame;
class MATH_CLASS MbFace;
class MATH_CLASS MbSurface;
class MATH_CLASS MbItem;
class MATH_CLASS MbName;
class MATH_CLASS MbSweptData;
class MATH_CLASS MbContourChamferParams;
struct MATH_CLASS MbNurbsParameters;
class MATH_CLASS MbNurbsCopyCurveResult;
class MATH_CLASS MbCurvesWrappingParams;
class MATH_CLASS MbCurvesWrappingResults;
class MATH_CLASS MbCurveFitParameters3D;
class MATH_CLASS MbCurveFitResults3D;
class MATH_CLASS MbCurveExtensionParameters3D;
class MbCurve;
class MbContour3D;
class MbWireFrame;
class MbFace;
class MbSurface;
class MbItem;
class MbName;
class MbSweptData;
class MbContourChamferParams;
struct MbNurbsParameters;
class MbNurbsCopyCurveResult;
class MbCurvesWrappingParams;
class MbCurvesWrappingResults;
class MbCurveFitParameters3D;
class MbCurveFitResults3D;
class MbCurveExtensionParameters3D;
struct MATH_CLASS EvolutionValues;
struct EvolutionValues;
//------------------------------------------------------------------------------
/** \brief \ru Создать прямую.
@@ -195,36 +195,6 @@ MATH_FUNC (MbResultType) NurbsCurve( const SArray<MbCartPoint3D> & pointList,
MbCurve3D *& result );
//------------------------------------------------------------------------------
/** \brief \ru Создать Nurbs кривую с сортировкой точек по расстоянию, проходящую по набору точек.
\en Create a Nurbs curve with sorting points by distance passing through a set of points. \~
\details \ru Создать Nurbs кривую с сортировкой точек по расстоянию, проходящую по набору точек, следующего типа: \n
\en Create a Nurbs curve with sorting points by distance passing through a set of points that has the following type: \n
\param[in] pointList - \ru Исходные точки.
\en The initial curve. \~
\param[in] curveClosed - \ru Замкнутость кривой.
\en Closure of the curve. \~
\param[in] degree - \ru Степень кривой (для Nurbs).
\en A curve degree (for Nurbs). \~
\param[in] mode - \ru Вариант построения кривой.
\en A Curve construction option. \~
\param[in/out] accuracy - \ru Требуемая точность / максимальное отклонение построенной кривой.
\en Thye desired accuracy / max deviation of constructed curve. \~
\param[out] result - \ru Построенная кривая.
\en The constructed curve. \~
\return \ru Возвращает среднее отклонение построенной кривой.
\en Returns average deviation of constructed curve. \~
\ingroup Curve3D_Modeling
*/
// ---
MATH_FUNC (double) NurbsFitting( const std::vector<MbCartPoint3D> & pointList,
bool curveClosed,
size_t degree,
size_t mode,
double & accuracy,
MbCurve3D *& result );
//------------------------------------------------------------------------------
/** \brief \ru Создать копию кривой в виде NURBS.
\en Create a copy of a curve as a NURBS-curve. \~
@@ -239,7 +209,7 @@ MATH_FUNC (double) NurbsFitting( const std::vector<MbCartPoint3D> & pointList,
\ingroup Curve3D_Modeling
*/
//---
MATH_FUNC (MbResultType) NurbsCopy( const MbCurve3D & curve,
MATH_FUNC (MbResultType) NurbsCopy( const MbCurve3D & curve,
MbCurve3D *& result );
@@ -439,13 +409,13 @@ MATH_FUNC (MbCurve3D *) DuplicateCurve( const MbCurve3D & curve,
//---
MATH_FUNC (MbResultType) AddCurveToContour( MbCurve3D & curve,
MbCurve3D & contour,
bool toEnd );
bool toEnd );
//------------------------------------------------------------------------------
/** \brief \ru Построить кривую в пространстве по двумерной кривой.
\en Create a space curve from a two-dimensional curve. \~
\details \ru Построить кривую в пространстве по двумерной кривой сurve на плоскости place. \n
\details \ru Построить кривую в пространстве по двумерной кривой curve на плоскости place. \n
Построение выполняется на оригинале кривой.
\en Create a space curve from a two-dimensional curve 'curve' lying on plane 'place'. \n
The construction is performed on the source curve. \~
@@ -461,13 +431,13 @@ MATH_FUNC (MbResultType) AddCurveToContour( MbCurve3D & curve,
*/
// ---
MATH_FUNC (MbResultType) PlaneCurve( const MbPlacement3D & place,
const MbCurve & curve,
MbCurve3D *& result );
const MbCurve & curve,
MbCurve3D *& result );
//------------------------------------------------------------------------------
/** \brief \ru Построить кривую на поверхности по двумерной кривой.
\en Create a curve on a surface given a two-dimensional curve. \~
\details \ru Построить кривую на поверхности surface по двумерной кривой сurve. \n
\details \ru Построить кривую на поверхности surface по двумерной кривой curve. \n
Построение выполняется на оригиналах кривой и поверхности.
\en Create a curve on a surface 'surface' given a two-dimensional curve 'curve'. \n
The construction is performed on the original curve and surface. \~
@@ -482,8 +452,8 @@ MATH_FUNC (MbResultType) PlaneCurve( const MbPlacement3D & place,
\ingroup Curve3D_Modeling
*/
// ---
MATH_FUNC (MbResultType) SurfaceCurve( const MbSurface & surface,
const MbCurve & curve,
MATH_FUNC (MbResultType) SurfaceCurve( const MbSurface & surface,
const MbCurve & curve,
MbCurve3D *& result );
@@ -622,10 +592,10 @@ MATH_FUNC (MbResultType) CreateContours( RPArray<MbCurve3D> & curves,
\ingroup Curve3D_Modeling
*/
// ---
MATH_FUNC (MbResultType) WireFrame( const MbCurve3D & curve,
const MbName & curveName,
SimpleName mainName,
MbWireFrame *& result );
MATH_FUNC (MbResultType) WireFrame( const MbCurve3D & curve,
const MbName & curveName,
SimpleName mainName,
MbWireFrame *& result );
//------------------------------------------------------------------------------
@@ -647,9 +617,9 @@ MATH_FUNC (MbResultType) WireFrame( const MbCurve3D & curve,
*/
// ---
MATH_FUNC (MbResultType) WireFrame( const RPArray<MbCurve3D> & curves,
const RPArray<MbName> & curveNames,
SimpleName mainName,
MbWireFrame *& result );
const RPArray<MbName> & curveNames,
SimpleName mainName,
MbWireFrame *& result );
//------------------------------------------------------------------------------
@@ -674,11 +644,11 @@ MATH_FUNC (MbResultType) WireFrame( const RPArray<MbCurve3D> & curves,
\ingroup Curve3D_Modeling
*/
// ---
MATH_FUNC (MbResultType) CreatePolyArcCurve3D( const MbCurve3D & curve,
MbCurve3D *& result,
double & eps,
double minRad = Math::minRadius,
double maxRad = Math::maxRadius );
MATH_FUNC (MbResultType) CreatePolyArcCurve3D( const MbCurve3D & curve,
MbCurve3D *& result,
double & eps,
double minRad = Math::minRadius,
double maxRad = Math::maxRadius );
//------------------------------------------------------------------------------
@@ -705,10 +675,10 @@ MATH_FUNC (MbResultType) CreatePolyArcCurve3D( const MbCurve3D & curve,
\ingroup Curve3D_Modeling
*/
// ---
MATH_FUNC (bool) GetSpaceCurve( const MbItem & item,
MATH_FUNC (bool) GetSpaceCurve( MbItem & item,
bool keepPlacement,
SPtr<MbCurve3D> & curve0,
std::vector< SPtr<MbCurve3D> > * curves = nullptr );
c3d::SpaceCurveSPtr & curve0,
c3d::SpaceCurvesSPtrVector * curves = nullptr );
//-------------------------------------------------------------------------------
@@ -736,10 +706,10 @@ MATH_FUNC (bool) GetSpaceCurve( const MbItem & item,
\ingroup Curve3D_Modeling
*/
// ---
MATH_FUNC (MbCurve3D *) UnwrapCurve( const MbCurve3D & curve,
MATH_FUNC (MbCurve3D *) UnwrapCurve( const MbCurve3D & curve,
const MbPlacement3D & placement,
const MbCartPoint3D & point,
double deviationAngle = DEVIATION_SAG);
double deviationAngle = DEVIATION_SAG);
//------------------------------------------------------------------------------
@@ -768,13 +738,13 @@ MATH_FUNC (MbCurve3D *) UnwrapCurve( const MbCurve3D & curve,
\ingroup Curve3D_Modeling
*/
// ---
MATH_FUNC (MbResultType) EvolutionSection( const MbSweptData & generCurves,
const MbCurve3D & guideCurve,
double guideParam,
MATH_FUNC (MbResultType) EvolutionSection( const MbSweptData & generCurves,
const MbCurve3D & guideCurve,
double guideParam,
const EvolutionValues & params,
MbSweptData & result,
VERSION version = Math::DefaultMathVersion(),
double angleEpsilon = ANGLE_EPSILON );
MbSweptData & result,
VERSION version = Math::DefaultMathVersion(),
double angleEpsilon = ANGLE_EPSILON );
//------------------------------------------------------------------------------
@@ -1165,15 +1135,15 @@ MATH_FUNC( MbResultType ) CreateFairBSplineCurveOnBasePolylineOfHermiteGDInflex(
// ---
//------------------------------------------------------------------------------
/** \brief \ru Создать плавную B-сплайновую кривую (со сглаживанием и репараметризацией) на зашумленных данных.
\en Create a fair B-spline curve with smoothing and reparametrization on noisy data. \~
\en Create a fair B-spline curve with smoothing and reparameterization on noisy data. \~
\details \ru Создать плавную B-сплайновую кривую [со сглаживанием и репараметризацией] на зашумленных данных
(опорной ломаной, ГО Эрмита).
\en Create a fair B-spline curve with smoothing and reparametrization on noisy data (base polyline of Hermite GD). \n
\attention \ru Экспериментальный класс. \en Experimental class. \~
\param[in] polyline - \ru Исходная ломаная.
\en An initial polyline. \~
\param[in] inType - \ru Тип данных построения кривой.
\en The type of the curve construction data. \~
\param[in] plnNoisy - \ru Зашумленная ломаная (может быть nullptr).
\en The noisy polyline (can be nullptr). \~
\param[in] data - \ru Данные построения кривой.
\en The curve construction data. \~
\param[out] resCurve - \ru Сплайновая кривая.
@@ -1184,7 +1154,7 @@ MATH_FUNC( MbResultType ) CreateFairBSplineCurveOnBasePolylineOfHermiteGDInflex(
*/
// ---
MATH_FUNC( MbResultType ) CreateFairBSplineCurveOnNoisyData( MbCurve3D* pllne,
int inType, // 1 - простая ломаная, 2 - ГО Эрмита
MbCurve3D* plnNoisy,
MbFairCurveData & data,
MbCurve3D *& resCurve );
@@ -1462,7 +1432,7 @@ MATH_FUNC(MbResultType) ConicNurbs( MbNurbs3D * curve,
/** \brief \ru Построение сплайна заданной длины, соединяющего заданные точки.
\en Connecting the specified points by a curve of a specified length. \~
\details \ru Построенная кривая должна выходить из заданной точки в заданном направлении и заканчиваться в заданной точке в заданном направлении.
Kривизна кривой не должна превосходить заданного максимального значения. \n
Кривизна кривой не должна превосходить заданного максимального значения. \n
\en The resulting curve must start at a given point in a given direction and end at a given point in a given direction.
The curvature of the curve must not exceed the specified maximum value. \~ \n
\param[in] begPoint - \ru Начальная точка.
@@ -1525,14 +1495,12 @@ MATH_FUNC ( MbCurve3D * ) SetProportionalParametrization( MbCurve3D * curve,
\en Extend the given curve. \~
\details \ru Продлить заданную кривую в соответствии с заданными параметрами. \n
\en Extend the given curve according to the given parameters. \~ \n
\param[in] sourceCurve - \ru Исходная (удлиняемая) кривая.
\param[in] sourceCurve - \ru Исходная (продлеваемая) кривая.
\en Source (extended) curve. \~
\param[in] parameters - \ru Параметры продления.
\en Parameters of extension. \~
\param[in] snMaker - \ru Именователь построенного ребра.
\en An object defining the edges names. \~
\param[out] resFrame - \ru Результирующая кривая внутри каркаса.
\en Result curve in the wire-frame. \~
\en Result curve in the wire frame. \~
\return \ru Возвращает код результата операции. В случае успеха всегда вернется ненулевая кривая (возможно, она будет совпадать с исходной кривой).
\en Returns the code of the operation result. In case of success, the result curve cannot be nullptr (it will be possibly the same as the source one).
\ingroup Curve3D_Modeling
@@ -1579,8 +1547,8 @@ MATH_FUNC (MbResultType) CreateContourChamfer( const MbContourChamferParams & pa
//-------------------------------------------------------------------------------
/** \brief \ru Построить развертку кривых и точек на плоскость.
\en Construct unwrapped curves and points. \~
\details \ru Построение развертки кривых и точек на плоскость. См. также #CurvesUnwrapping.\n
\en Construct unwrapped curves and points on a plane. Also check out #CurvesUnwrapping.\n \~
\details \ru Построение развертки кривых и точек на плоскость.\n
\en Construct unwrapped curves and points on a plane.\n \~
\param[in] params - \ru Параметры разворачивания.
\en Unwrapping parameters. \~
\param[out] result - \ru Результат разворачивания.
@@ -1597,8 +1565,8 @@ MATH_FUNC (MbResultType) UnwrapCurve( const MbCurvesWrappingParams & parameters
//-------------------------------------------------------------------------------
/** \brief \ru Выполнить операцию сворачивания кривых и точек на поверхность.
\en Perform the operation of wrapping curves and points on a surface. \~
\details \ru Выполнить операцию сворачивания кривых на поверхность. См. также #CurvesWrapping.\n
\en Perform the operation of wrapping curves on a surface. Also check out #CurvesWrapping.\n \~
\details \ru Выполнить операцию сворачивания кривых на поверхность.\n
\en Perform the operation of wrapping curves on a surface.\n \~
\param[in] params - \ru Параметры сворачивания.
\en Wrapping parameters. \~
\param[out] result - \ru Результат сворачивания.
+56 -25
View File
@@ -14,34 +14,31 @@
#ifndef __ACTION_DIRECT_H
#define __ACTION_DIRECT_H
#include <templ_s_array.h>
#include <templ_array2.h>
#include <templ_rp_array.h>
#include <hash32.h>
#include <mb_enum.h>
#include <op_direct_mod_parameter.h>
class MATH_CLASS MbCartPoint3D;
class MATH_CLASS MbCurve;
class MATH_CLASS MbCurve3D;
class MATH_CLASS MbCurveEdge;
class MATH_CLASS MbFace;
class MATH_CLASS MbFaceShell;
class MATH_CLASS MbModifiedSolidParams;
class MATH_CLASS MbModifiedSolidResults;
class MATH_CLASS MbPlacement3D;
class MATH_CLASS MbSNameMaker;
class MATH_CLASS MbSolid;
class MATH_CLASS MbSplineSurface;
class MATH_CLASS MbSurface;
class MATH_CLASS MbSurfaceIntersectionCurve;
class MbCartPoint3D;
class MbCurve;
class MbCurve3D;
class MbCurveEdge;
class MbFace;
class MbFaceShell;
class MbModifiedSolidParams;
class MbModifiedSolidResults;
class MbPlacement3D;
class MbSNameMaker;
class MbSolid;
class MbSplineSurface;
class MbSurface;
class MbSurfaceIntersectionCurve;
struct MATH_CLASS ModifyValues;
struct MATH_CLASS NurbsBlockValues;
struct MATH_CLASS NurbsValues;
struct MATH_CLASS TransformValues;
struct ModifyValues;
struct NurbsBlockValues;
struct NurbsValues;
struct TransformValues;
template <class Type> class Array2;
template <class Type> class SArray;
template <class Type> class RPArray;
//------------------------------------------------------------------------------
/** \brief \ru Модифицировать тело по матрице.
@@ -201,7 +198,41 @@ MATH_FUNC (MbResultType) CollectFacesForModification( MbFaceShell * shell,
\param[out] results - \ru Результаты модификации.
\en Results of the modifcation. \~
\return \ru Возвращает код результата операции.
\en Returns operation result code. \~
Возможные коды ошибок:
Для всех типов:
rt_Success -- Ошибок нет.
rt_Error -- Неизвестная ошибка.
rt_IncorrectData -- Некорректные данные.
rt_ParameterError -- Ошибочный параметр.
Для типа dmm_ReplaceGroupFaces:
rt_NoFacesForModification -- Ошибка в параметрах. Отсутствуют заменяемые грани.
rt_NoReplacementFaces -- Ошибка в параметрах. Отсутствуют заменяющие грани.
rt_ConnectionError -- Ошибка в параметрах. Нарушена связность группы граней.
rt_FacesGroupsOverlapError -- Ошибка в параметрах. Среди заменяющих граней есть заменяемые, массивы не должны пересекаться.
rt_NoEdgesForBuild -- Отсутствуют граничные рёбра в заменяемой оболочке.
rt_OffsetError -- Невозможно эквидистантно сдвинуть оболочку.
rt_ExtensionOutOfRange -- Невозможно продлить оболочку.
rt_SolidError -- Невозможно собрать оболочку из заменяющих граней.
rt_CuttingError -- Невозможно усечь оболочку новой группой граней.
rt_StitchShellsError -- Невозможно сшить итоговую оболочку.
\en Returns operation result code.
Possible error codes:
For all types:
rt_Success -- No errors.
rt_Error -- Unknown error.
rt_IncorrectData -- Incorrect data.
rt_ParameterError -- Wrong parameter.
For the type dmm_ReplaceGroupFaces:
rt_NoFacesForModification -- Parameter error. There are no replaced faces.
rt_NoReplacementFaces -- Parameter error. There are no replacement faces.
rt_ConnectionError -- Parameter error. Broken connectivity of the face group.
rt_FacesGroupsOverlapError -- Parameter error. There are replacement faces among the replaced faces. Those arrays must not overlap.
rt_NoEdgesForBuild -- There are no boundary edges in the replaced shell.
rt_OffsetError -- Cannot move the shell equidistantly.
rt_ExtensionOutOfRange -- The shell cannot be extended.
rt_SolidError -- Cannot make the shell from replacement faces.
rt_CuttingError -- Impossible to cut the shell with the new faces group.
rt_StitchShellsError -- Impossible to stitch the final shell. \~
\ingroup Direct_Modeling
*/
// ---
+63 -107
View File
@@ -16,10 +16,11 @@
#include <op_swept_parameter.h>
#include <mb_operation_result.h>
class MATH_CLASS MbPlanarGrid;
class MATH_CLASS MbGrid;
struct MATH_CLASS MbShellsIntersectionData;
class IProgressIndicator;
class MbPlanarGrid;
class MbGrid;
struct MbShellsIntersectionData;
class MbShellProjectionParams;
class IProgressIndicator;
//------------------------------------------------------------------------------
/** \brief \ru Проверить оболочку на предмет разделения на отдельные части.
@@ -239,7 +240,7 @@ MATH_FUNC (bool) UnifyOwnComplanarFaces( MbFaceShell & shell,
\en Capture the faces in one of proposed methods. \~
\details \ru Захватить грани одним из способов распространения по связной оболочке. \n
\en Capture the faces in one of methods of propagation in connected shell. \n \~
\param[in] fp - \ru Cпособ захвата граней.
\param[in] fp - \ru Способ захвата граней.
\en A method of capturing the faces. \~
\param[in,out] face_set - \ru Набор граней.
\en A set of faces. \~
@@ -630,7 +631,7 @@ MATH_FUNC (void) GetRangeToCubeOrSurface( const MbCurve3D & curve,
/** \brief \ru Найти ближайшие тела при выдавливании с опцией "до ближайшего объекта".
\en Find the nearest solids while extruding with option 'up to the nearest object'. \~
\details \ru Найти ближайшие тела при выдавливании с опцией "до ближайшего объекта". \n
возвращает номерa ближайших тел ближайших тел в прямом и обратном направлении.
возвращает номера ближайших тел ближайших тел в прямом и обратном направлении.
\en Find the nearest solids while extruding with option 'up to the nearest object'. \n
returns numbers of the nearest solids in the forward and the backward direction. \~
\param[in] params - \ru Параметры операции.
@@ -646,72 +647,6 @@ MATH_FUNC (bool) GetNearestSolid( const MbNearestSolidParams & params,
MbNearestSolidResult & result );
//------------------------------------------------------------------------------
/** \brief \ru Найти ближайшие тела при выдавливании с опцией "до ближайшего объекта".
\en Find the nearest solids while extruding with option 'up to the nearest object'. \~
\details \ru Найти ближайшие тела при выдавливании с опцией "до ближайшего объекта". \n
Возвращает номерa (nPlus и nMinus) ближайших тел с положительной и отрицательной стороны эскиза.
\en Find the nearest solids while extruding with option 'up to the nearest object'. \n
Returns the numbers (nPlus and nMinus) of nearest solids on the positive and the negative sides of the sketch. \~
\param[in] pl - \ru Локальная система координат.
\en A local coordinate system. \~
\param[in] c - \ru Множество двумерных контуров.
\en An array of two-dimensional contours. \~
\param[in] direction - \ru Направление выдавливания.
\en An extrusion direction. \~
\param[in] solids - \ru Целевой набор тел.
\en A target set of solids. \~
\param[out] nPlus - \ru Номер ближайшего тела в положительном направлении.
\en The number of the nearest solid in the positive direction. \~
\param[out] nMinus - \ru Номер ближайшего тела в отрицательном направлении.
\en The number of the nearest solid in the negative direction. \~
\return \ru Возвращает true, если найдено тело хотя бы в одном из направлений.
\en Returns 'true' if a solid is found in at least one of directions. \~
\ingroup Algorithms_3D
*/
// ---
DEPRECATE_DECLARE_REPLACE( GetNearestSolid with MbNearestSolidParams )
MATH_FUNC (bool) GetNearestSolid( const MbPlacement3D & pl,
RPArray<MbContour> & c,
MbSweptLayout::Direction direction,
RPArray<MbSolid> & solids,
size_t & nPlus,
size_t & nMinus );
//------------------------------------------------------------------------------
/** \brief \ru Найти ближайшие тела при выдавливании с опцией "до ближайшего объекта".
\en Find the nearest solids while extruding with option 'up to the nearest object'. \~
\details \ru Найти ближайшие тела при выдавливании с опцией "до ближайшего объекта". \n
возвращает номерa (nPlus и nMinus) ближайших тел ближайших тел в прямом и обратном направлении.
\en Find the nearest solids while extruding with option 'up to the nearest object'. \n
returns numbers (nPlus and nMinus) of the nearest solids in the forward and the backward direction. \~
\param[in] curves - \ru Набор кривых.
\en A set of curves. \~
\param[in] direction - \ru Направление выдавливания.
\en An extrusion direction. \~
\param[in] operationDirection - \ru Параметры выдавливания "до ближайшего объекта".
\en Parameters of extrusion 'up to the nearest object'. \~
\param[in] solids - \ru Целевой набор тел.
\en A target set of solids. \~
\param[out] nPlus - \ru Номер ближайшего тела в положительном направлении.
\en The number of the nearest solid in the positive direction. \~
\param[out] nMinus - \ru Номер ближайшего тела в отрицательном направлении.
\en The number of the nearest solid in the negative direction. \~
\return \ru Возвращает true, если найдено тело хотя бы в одном из направлений.
\en Returns 'true' if a solid is found in at least one of directions. \~
\ingroup Algorithms_3D
*/
// ---
DEPRECATE_DECLARE_REPLACE( GetNearestSolid with MbNearestSolidParams )
MATH_FUNC (bool) GetNearestSolid( RPArray<MbCurve3D> & curves,
const MbVector3D & direction,
MbSweptLayout::Direction operationDirection,
RPArray<MbSolid> & solids,
size_t & nPlus,
size_t & nMinus );
//------------------------------------------------------------------------------
/** \brief \ru Проверить оболочку или тело, состоящее из NURBS поверхностей.
\en Check a shell or a solid that consists of NURBS surfaces. \~
@@ -843,38 +778,6 @@ MATH_FUNC (MbSurface *) GetExtendedSurfaceCopy( MbCube &
VERSION version );// = Math::DefaultMathVersion() );
//------------------------------------------------------------------------------
/** \brief \ru Построить набор граней с топологией призмы.
\en Create a set of faces with topology of a prism. \~
\details \ru Построить набор граней с топологией призмы. \n
\en Create a set of faces with topology of a prism. \n \~
\param[in] place - \ru Локальная система координат (ЛСК).
\en A local coordinate system (LCS). \~
\param[in] contour - \ru Двумерный контур в ЛСК.
\en A two-dimensional curve in LCS. \~
\param[in] der - \ru Направление выдавливания.
\en An extrusion direction. \~
\param[in] sense - \ru Ориентация выходного массива граней как замкнутой оболочки.
\en An orientation of the output array of faces as a closed shell. \~
\param[in] n - \ru Именователь.
\en An object for naming the new objects. \~
\param[in,out] faces - \ru Множество созданных граней.
\en The array of created faces. \~
\param[in] useAddCount - \ru Использовать количество граней initFaces на входе для именования новых граней.
\en The number of input faces initFaces is to be used for naming the new faces. \~
\return \ru Возвращает true, если получилось построить грани.
\en Returns true if new faces have been successfully created. \~
\ingroup Algorithms_3D
\deprecated \ru Функция устарела, взамен использовать #CreateFaces с #FacesSPtrVector.
\en The function is deprecated, instead use #CreateFaces with #FacesSPtrVector. \~
*/
// ---
DEPRECATE_DECLARE_REPLACE( CreateFaces with FacesSPtrVector )
MATH_FUNC (bool) CreateFaces( const MbPlacement3D & place, const MbContour & contour,
const MbVector3D & der, bool sense, const MbSNameMaker & n,
RPArray<MbFace> & faces, bool useAddCount = false );
//------------------------------------------------------------------------------
/** \brief \ru Построить набор граней с топологией призмы.
\en Create a set of faces with topology of a prism. \~
@@ -1127,7 +1030,7 @@ MATH_FUNC (MbItem *) ReplaceByInstance( MbItem * item, double ratioThreashhold =
//------------------------------------------------------------------------------
/** \brief \ru Построениe «залитого» объема, расположенного между внутренней поверхностью сосуда и ограничивающей поверхностью или телом. \~
/** \brief \ru Построение «залитого» объема, расположенного между внутренней поверхностью сосуда и ограничивающей поверхностью или телом. \~
\en The construction of a "flood fill" volume located between the inner surface of the vessel and the bounding surface or body. \~
\details \ru На вход подаётся тело, дополнительная поверхность или дополнительное тело и координаты источника.
На выходе получаем объём, построенный от источника и ограниченный со всех сторон оболочкой тела и дополнительными объектами. \~
@@ -1189,9 +1092,9 @@ MATH_FUNC (MbResultType) CreateFastener ( const RPArray<MbSolid> & solids,
//------------------------------------------------------------------------------
/** \brief \ru Cоздать набор крепежных элементов по трехмерной кривой. НЕ ИСПОЛЬЗОВАТЬ ВНЕ ТЕСТОВОГО ПРИЛОЖЕНИЯ!!! ФУНКЦИЯ НАХОДИТСЯ В РАЗРАБОТКЕ!!!
/** \brief \ru Создать набор крепежных элементов по трехмерной кривой. НЕ ИСПОЛЬЗОВАТЬ ВНЕ ТЕСТОВОГО ПРИЛОЖЕНИЯ!!! ФУНКЦИЯ НАХОДИТСЯ В РАЗРАБОТКЕ!!!
\en Create an array of fastener elements using 3d curve. \~
\details \ru Cоздать набор крепежных элементов по трехмерной кривой.
\details \ru Создать набор крепежных элементов по трехмерной кривой.
\en Create an array of fastener elements using 3d curve. \~
\param[in] solids - \ru Множество тел для скрепления.
\en Array of bodies with a hole and fastener body. \~
@@ -1439,4 +1342,57 @@ SPtr<Item> GetTransformedItem( SPtr<Item> & item, const MbMatrix3D & matr, MbReg
}
return resItem;
}
//------------------------------------------------------------------------------
/** \brief \ru Класс для проецирования на оболочку.
\en Class for projection onto shell. \~
\details \ru Класс для проецирования на оболочку. \n
\en Class for projection onto shell. \n \~
\ingroup Algorithms_3D
\warning \ru В разработке.
\en Under development. \~
*/
// ---
class MATH_CLASS MbFaceShellProjector
{
protected:
MbFaceShellProjector() {}
public:
/// \ru Деструктор. \en Destructor.
virtual ~MbFaceShellProjector() {}
/** \brief \ru Создать экземпляр класса по оболочке и параметрам.
\en Create class instance by shell and parameters. \~
\details \ru Создать экземпляр класса по оболочке и параметрам. Пользователь должен сам удалить объект.
\en Create class instance by shell and parameters. User must delete created object. \~
\param[in] shell - \ru Оболочка. \n
\en Shell. \~
\param[in] params - \ru Параметры для многократного проецирования точек на оболочку. \n
\en Parameters for multiple projection of points onto the shell. \~
\return \ru Возвращает указатель на созданный объект.
\en Returns pointer to created object. \~
*/
static MbFaceShellProjector * Create( const MbFaceShell & shell, const MbShellProjectionParams & params );
/** \brief \ru Найти ближайшую проекцию точки на оболочку.
\en Find nearest point projection to the shell. \~
\details \ru Найти номер грани и параметры её поверхности для ближайшей проекции точки на оболочку. \n
\en Find face index and surface parameters for the nearest point projection to the shell. \n \~
\param[in] p - \ru Проецируемая точка.
\en A point to project. \~
\param[out] faceIndex - \ru Номер грани в оболочке для ближайшей проекции.
\en The index of nearest face of the shell. \~
\param[out] u - \ru Первый параметр поверхности грани проекций для ближайшей проекции точки на оболочку.
\en The first parameter of the face surface for the nearest projection. \~
\param[out] v - \ru Второй параметр поверхности грани проекций для ближайшей проекции точки на оболочку.
\en The second parameter of the face surface for the nearest projection. \~
\return \ru Удалось ли определить положение точки.
\en Whether the point projection was successfully defined. \~
*/
virtual bool NearPointProjection( const MbCartPoint3D & point, size_t & faceIndex, double & u, double & v ) const = 0;
OBVIOUS_PRIVATE_COPY( MbFaceShellProjector );
};
#endif // __ACTION_GENERAL_H
+113 -28
View File
@@ -20,25 +20,26 @@
#include <curve3d.h>
#include <vector>
class MATH_CLASS MbPlacement3D;
class MATH_CLASS MbMesh;
class MATH_CLASS MbSurface;
class MATH_CLASS MbSolid;
class MATH_CLASS MbPlaneItem;
class MATH_CLASS MbSNameMaker;
class MATH_CLASS MbFace;
class MATH_CLASS MbCollection;
class MATH_CLASS MbMeshSimplificationParams;
class MATH_CLASS MbConvexHullParams;
struct MATH_CLASS MbConvexHullResults;
class MATH_CLASS MbConvexHullParams3D;
class MATH_CLASS MbMeshToInstanceParams;
class MATH_CLASS MbMeshToInstanceResults;
class MATH_CLASS MbOrientedBox;
class MATH_CLASS MbMeshUnwrapParams;
class MATH_CLASS MbMeshUnwrapResult;
class MATH_CLASS MbObjectAlignmentParams;
class MATH_CLASS MbObjectAlignmentResult;
class MbPlacement3D;
class MbMesh;
class MbSurface;
class MbSolid;
class MbPlaneItem;
class MbSNameMaker;
class MbFace;
class MbCollection;
class MbMeshSimplificationParams;
class MbConvexHullParams;
struct MbConvexHullResults;
class MbConvexHullParams3D;
class MbRepairInconsistentMeshParams;
class MbMeshToInstanceParams;
class MbMeshToInstanceResults;
class MbOrientedBox;
class MbMeshUnwrapParams;
class MbMeshUnwrapResult;
class MbObjectAlignmentParams;
class MbObjectAlignmentResult;
//------------------------------------------------------------------------------
/** \brief \ru Данные диагностики полигонального объекта.
@@ -627,15 +628,18 @@ MATH_FUNC(MbOrientedBox) CalculateBoundingBox( const MbMesh & mesh );
//------------------------------------------------------------------------------
/** \brief \ru Исправить несовместную ориентацию полигонов сетки по отношению друг к другу.
\en Repair inconsistent orientation of mesh polygons with respect to each other. \~
\param[out] result - \ru Полигональный объект.
\en The polygonal object. \~
\param[in] params - \ru Параметры операции.
\en Parameters of the operation \~
\param[in] mesh - \ru Полигональный объект.
\en The polygonal object. \~
\return \ru Возвращает код результата операции.
\en Returns operation result code. \~
\ingroup Polygonal_Objects
\warning \ru В разработке.
\en Under development. \~
*/ // ---
MATH_FUNC (MbResultType) RepairInconsistentMesh( MbMesh & mesh );
MATH_FUNC (MbResultType) RepairInconsistentMesh( const MbRepairInconsistentMeshParams & params,
MbMesh & mesh );
//------------------------------------------------------------------------------
@@ -679,7 +683,7 @@ MATH_FUNC( bool ) CheckMeshClosure( const MbMesh & mesh, MeshInfo & info );
//------------------------------------------------------------------------------
/** \brief \ru Определить замкнутость объекта и выдать подробную информацию о границах.
\en Check the object closeness and provide detailed information about boundaries. \~
\detail \ru Определить замкнутость объекта и выдать подробную информацию о границах. Расширенная версия #CheckMeshClosure.
\details \ru Определить замкнутость объекта и выдать подробную информацию о границах. Расширенная версия #CheckMeshClosure.
\en Check the object closeness and provide detailed information about boundaries. An extended version of #CheckMeshClosure. \~
\param[in] mesh - \ru Полигональный объект.
\en The polygonal object. \~
@@ -697,7 +701,7 @@ MATH_FUNC( bool ) InspectMeshClosure( const MbMesh & mesh, MeshInfo & info );
//------------------------------------------------------------------------------
/** \brief \ru Упростить триангуляцию.
\en Simplify triangulation. \~
\detail \ru Упростить триангуляцию.
\details \ru Упростить триангуляцию.
\en Simplify triangulation. \~
\param[in] mesh - \ru Полигональный объект.
\en The polygonal object. \~
@@ -707,13 +711,15 @@ MATH_FUNC( bool ) InspectMeshClosure( const MbMesh & mesh, MeshInfo & info );
\en Vector of simplified triangulations. \~
\ingroup Polygonal_Objects
*/ // ---
MATH_FUNC( MbResultType ) SimplifyTriangularMesh( const MbMesh & mesh, const MbMeshSimplificationParams & params, c3d::MeshesSPtrVector & simplifiedMeshes );
MATH_FUNC( MbResultType ) SimplifyTriangularMesh( const MbMesh & mesh,
const MbMeshSimplificationParams & params,
c3d::MeshesSPtrVector & simplifiedMeshes );
//------------------------------------------------------------------------------
/** \brief \ru Упростить триангуляцию.
\en Simplify triangulation. \~
\detail \ru Упростить триангуляцию. Делает упрощение до первого уровня, указанного в параметрах.
\details \ru Упростить триангуляцию. Делает упрощение до первого уровня, указанного в параметрах.
\en Simplify triangulation up to the first level from parameters. \~
\param[in] params - \ru Параметры симплификации.
\en Simplifiation parameters. \~
@@ -722,7 +728,8 @@ MATH_FUNC( MbResultType ) SimplifyTriangularMesh( const MbMesh & mesh, const MbM
\ingroup Polygonal_Objects
*/ // ---
MATH_FUNC( MbResultType ) SimplifyTriangularMesh( const MbMeshSimplificationParams & params, MbMesh & mesh );
MATH_FUNC( MbResultType ) SimplifyTriangularMesh( const MbMeshSimplificationParams & params,
MbMesh & mesh );
//------------------------------------------------------------------------------
@@ -749,7 +756,7 @@ MATH_FUNC( MbResultType ) UnwrapMesh( const MbMeshUnwrapParams & params, MbMeshU
//------------------------------------------------------------------------------
/** \brief \ru Совместить объекты.
\en Align objects. \~
\detail \ru Совместить два объекта: moving к fixed.
\details \ru Совместить два объекта: moving к fixed.
\en Align two objects: moving to fixed. \~
\param[in] fixed - \ru Объект, к которому выполняем совмещение.
\en Object to which another object is aligned. \~
@@ -769,4 +776,82 @@ MATH_FUNC( MbResultType ) AlignObjects( const MbItem & fixed,
const MbObjectAlignmentParams & params,
MbObjectAlignmentResult & result );
//------------------------------------------------------------------------------
/** \brief \ru Класс для драпировки оболочки тканью.
\en Class for shell draping. \~
\details \ru Класс для драпировки оболочки тканью. \n
\en Class for shell draping. \n \~
\ingroup Polygonal_Objects
\deprecated
*/
// ---
class MATH_CLASS MbDrapMaker
{
protected:
MbDrapMaker() {}
public:
/// \ru Деструктор. \en Destructor.
virtual ~MbDrapMaker() {}
/** \brief \ru Получить грань-развертку.
\en Get unwrapped face. \~
\details \ru Получить грань-развертку.
Ее контур получается путем аппроксимации границы сеточной развертки.
\en Get unwrapped face.
It's contour is calculated by approximation of the unwrapped mesh border.
\param[in] tolApprox - \ru Точность аппроксимации.
\en Approximation tolerance. \~
\param[out] unwrapped - \ru Грань-развертка.
\en Unwrapped face. \~
*/
virtual void GetUnwrapped( double tolApprox, c3d::FaceSPtr & unwrapped ) const = 0;
/** \brief \ru Получить полилинии для главной нити основы.
\en Get polyline for main warp thread. \~
\details \ru Получить полилинии для главной нити основы.
Эти полилинии идут от точки приложения в положительном и отрицательном направлении
оси Х локальной системы координат.
\en Get polyline for main warp thread.
Polylines go in the positive and negative direction of the local coordinate system X-axis.
\param[out] warpPlus - \ru Полилиния в положительном направлении.
\en Polyline in the positive direction. \~
\param[out] warpMinus - \ru Полилиния в отрицательном направлении.
\en Polyline in the negative direction. \~
*/
virtual void GetWarp( c3d::SpacePointsVector & warpPlus, c3d::SpacePointsVector & warpMinus ) const = 0;
/** \brief \ru Получить полилинии для главной нити утка.
\en Get polyline for main weft thread. \~
\details \ru Получить полилинии для главной нити утка.
Эти полилинии идут от точки приложения в положительном и отрицательном направлении
оси Y локальной системы координат.
\en Get polyline for main weft thread.
Polylines go in the positive and negative direction of the local coordinate system Y-axis.
\param[out] weftPlus - \ru Полилиния в положительном направлении.
\en Polyline in the positive direction. \~
\param[out] weftMinus - \ru Полилиния в отрицательном направлении.
\en Polyline in the negative direction. \~
*/
virtual void GetWeft( c3d::SpacePointsVector & weftPlus, c3d::SpacePointsVector & weftMinus ) const = 0;
/// \ru Получить количество сторон ячеек. \en Get cell sides count.
virtual size_t GetCellSidesCount() const = 0;
/// \ru Получить полилинию для стороны ячейки. \en Get cell side polyline.
virtual void GetCellSidePolyline( size_t iSide, c3d::SpacePointsVector & poly ) const = 0;
/// \ru Получить угол для стороны ячейки. \en Get cell side angle.
virtual double GetCellSideAngle( size_t iSide ) const = 0;
/** \brief \ru Получить полилинию разреза ткани на поверхности оболочки.
\en Get fiber cut polyline on the shell surface. \~
\details \ru Получить полилинию разреза ткани на поверхности оболочки.
\en Get fiber cut polyline on the shell surface.
\param[in] uv - \ru Начало прямой - линии разреза.
\en Beginning of the cut line. \~
\param[in] dir - \ru Направление прямой - линии разреза.
\en Direction of the cut line. \~
\param[out] polys - \ru Полилинии - отображение линии разреза на оболочку.
\en Polylines - line mapping to the shell. \~
*/
virtual void GetSplitPolylines( const MbCartPoint & uv, const MbVector & dir, std::vector<c3d::SpacePointsVector> & polys ) const = 0;
OBVIOUS_PRIVATE_COPY( MbDrapMaker );
};
#endif // __ACTION_MESH_H
+9 -260
View File
@@ -21,71 +21,13 @@
#include <mb_operation_result.h>
class MATH_CLASS MbCurve;
class MATH_CLASS MbCurve3D;
class MATH_CLASS MbSurface;
class MATH_CLASS MbCurveEdge;
class MATH_CLASS MbFace;
class MATH_CLASS MbSolid;
class MATH_CLASS MbSNameMaker;
//------------------------------------------------------------------------------
/** \brief \ru Построить фантомные поверхности скругления/фаски.
\en Create phantom surfaces of fillet/chamfer. \~
\details \ru Построить фантомные поверхности скругления/фаски и сложить в контейнер surfaces. \n
По окончании работ поверхности можно и нужно удалить. \n
\en Create phantom surfaces of fillet/chamfer and store them in the container 'surfaces'. \n
After finish working with the surfaces they should be deleted. \n \~
\deprecated \ru Метод устарел. Взамен использовать #SmoothPhantom с набором параметров #MbSmoothPhantomParams.
\en The method is deprecated. Use instead #SmoothPhantom with the parameters #MbSmoothPhantomParams. \~
\param[in] solid - \ru Исходное тело.
\en The initial solid. \~
\param[in] edges - \ru Множество выбранных ребер для скругления/фаски.
\en An array of edges for fillet/chamfer. \~
\param[in] params - \ru Параметры операции скругления/фаски.
\en Parameters of the fillet/chamfer operation. \~
\param[out] result - \ru Поверхности скругления/фаски.
\en The fillet/chamfer surfaces. \~
\return \ru Возвращает код результата построения.
\en Returns the creation result code. \~
\ingroup Algorithms_3D
*/
// ---
DEPRECATE_DECLARE_REPLACE( SmoothPhantom with MbSmoothPhantomParams )
MATH_FUNC (MbResultType) SmoothPhantom( const MbSolid & solid,
RPArray<MbCurveEdge> & edges,
const SmoothValues & params,
RPArray<MbSurface> & result );
//------------------------------------------------------------------------------
/** \brief \ru Построить фантомные поверхности скругления/фаски.
\en Create phantom surfaces of fillet/chamfer.\~
\details \ru Построить фантомные поверхности скругления/фаски и сложить в контейнер surfaces. \n
По окончании работ поверхности можно и нужно удалить.
\en Create phantom surfaces of fillet/chamfer and store them in the container 'surfaces'. \n
After finish working with the surfaces they should be deleted. \~
\deprecated \ru Метод устарел. Взамен использовать #SmoothPhantom с набором параметров #MbSmoothPhantomParams.
\en The method is deprecated. Use instead #SmoothPhantom with the parameters #MbSmoothPhantomParams. \~
\param[in] solid - \ru Исходное тело.
\en The initial solid. \~
\param[in] edges - \ru Множество выбранных ребер и функций изменения радиуса для скругления/фаски.
\en An array of edges and radius laws for fillet/chamfer. \~
\param[in] params - \ru Параметры операции скругления/фаски.
\en Parameters of the fillet/chamfer operation. \~
\param[out] result - \ru Поверхности скругления/фаски.
\en The fillet/chamfer surfaces. \~
\return \ru Возвращает код результата построения.
\en Returns the creation result code. \~
\ingroup Algorithms_3D
*/
// ---
DEPRECATE_DECLARE_REPLACE( SmoothPhantom with MbSmoothPhantomParams )
MATH_FUNC (MbResultType) SmoothPhantom( const MbSolid & solid,
SArray<MbEdgeFunction> & edges,
const SmoothValues & params,
RPArray<MbSurface> & result );
class MbCurve;
class MbCurve3D;
class MbSurface;
class MbCurveEdge;
class MbFace;
class MbSolid;
class MbSNameMaker;
//------------------------------------------------------------------------------
@@ -108,77 +50,6 @@ MATH_FUNC (MbResultType) SmoothPhantom( const MbSmoothPhantomParams & params,
MbSmoothPhantomResult & result );
//------------------------------------------------------------------------------
/** \brief \ru Построить последовательности гладко стыкующихся рёбер.
\en \~
\details \ru Построить последовательности гладко стыкующихся рёбер, скругляемых одновременно,
а также поверхности скругления/фаски (массив surfaces). \n
По окончании работ поверхности можно и нужно удалить.
\en \~
\deprecated \ru Метод устарел. Взамен использовать #SmoothSequence с набором параметров #MbSmoothSequenceParams.
\en The method is deprecated. Use instead #SmoothSequence with the parameters #MbSmoothSequenceParams. \~
\param[in] solid - \ru Исходное тело.
\en The initial solid. \~
\param[in] edges - \ru Множество выбранных ребер для скругления/фаски.
\en An array of edges for fillet/chamfer. \~
\param[in] params - \ru Параметры операции скругления/фаски.
\en Parameters of the fillet/chamfer operation. \~
\param[in] createSurfaces - \ru Создавать ли поверхности скругления/фаски для фантома?
\en Create a fillet/chamfer surfaces for phantom. \~
\param[out] sequences - \ru Последовательность гладко стыкующихся рёбер.
\en Sequence of smooth mating edges. \~
\param[out] result - \ru Поверхности скругления/фаски.
\en The fillet/chamfer surfaces. \~
\return \ru Возвращает код результата построения.
\en \~
\ingroup Algorithms_3D
*/
// ---
DEPRECATE_DECLARE_REPLACE( SmoothSequence with MbSmoothSequenceParams )
MATH_FUNC (MbResultType) SmoothSequence( const MbSolid & solid,
RPArray<MbCurveEdge> & edges,
const SmoothValues & params,
bool createSurfaces,
RPArray<MbEdgeSequence> & sequences,
RPArray<MbSurface> & result );
//------------------------------------------------------------------------------
/** \brief \ru Построить последовательности гладко стыкующихся рёбер.
\en \~
\details \ru Построить последовательности гладко стыкующихся рёбер, скругляемых одновременно,
а также поверхности скругления/фаски (массив surfaces). \n
По окончании работ поверхности можно и нужно удалить.
\en \~
\deprecated \ru Метод устарел. Взамен использовать #SmoothSequence с набором параметров #MbSmoothSequenceParams.
\en The method is deprecated. Use instead #SmoothSequence with the parameters #MbSmoothSequenceParams. \~
\param[in] solid - \ru Исходное тело.
\en The initial solid. \~
\param[in] edges - \ru Множество выбранных ребер и функций изменения радиуса для скругления/фаски.
\en An array of edges and radius laws for fillet/chamfer. \~
\param[in] params - \ru Параметры операции скругления/фаски.
\en Parameters of the fillet/chamfer operation. \~
\param[in] createSurfaces - \ru Создавать ли поверхности скругления/фаски для фантома?
\en Create a fillet/chamfer surfaces for phantom. \~
\param[out] sequences - \ru Последовательность гладко стыкующихся рёбер.
\en Sequence of smooth mating edges. \~
\param[out] result - \ru Поверхности скругления/фаски.
\en The fillet/chamfer surfaces. \~
\return \ru Возвращает код результата построения.
\en \~
\ingroup Algorithms_3D
*/
// ---
DEPRECATE_DECLARE_REPLACE( SmoothSequence with MbSmoothSequenceParams )
MATH_FUNC (MbResultType) SmoothSequence( const MbSolid & solid,
SArray<MbEdgeFunction> & edges,
const SmoothValues & params,
bool createSurfaces,
RPArray<MbEdgeSequence> & sequences,
RPArray<MbSurface> & result );
//------------------------------------------------------------------------------
/** \brief \ru Построить последовательности гладко стыкующихся рёбер.
\en Create a sequence of smoothly connected edges.\~
@@ -280,76 +151,6 @@ MATH_FUNC (bool) TruncatDirection( const MbCurveEdge & truncatingEdge,
MbPlacement3D & dirPlace );
//------------------------------------------------------------------------------
/** \brief \ru Построить опорные точки размеров операции скругления/фаски.
\en Create support points of fillet/chamfer operation sizes. \~
\details \ru Построить опорные точки размеров операции скругления/фаски и сложить в контейнер data. \n
Первые две точки лежат на краях поверхности скругления/фаски.
\en Create support points of fillet/chamfer operation sizes and store them in container 'data'. \n
The first two points lie on the fillet/chamfer surface boundary. \~
\deprecated \ru Метод устарел. Взамен использовать #SmoothPositionData с набором параметров #MbSmoothPositionDataParams.
\en The method is deprecated. Use instead #SmoothPositionData with the parameters #MbSmoothPositionDataParams. \~
\param[in] solid - \ru Исходное тело.
\en The initial solid. \~
\param[in] edges - \ru Множество выбранных ребер для скругления/фаски.
\en An array of edges for fillet/chamfer. \~
\param[in] params - \ru Параметры операции скругления/фаски.
\en Parameters of the fillet/chamfer operation. \~
\param[out] result - \ru Опорные точки размеров операции скругления/фаски.
\en Support points of the fillet/chamfer operation sizes. \~
\param[in] edgeParam - \ru Параметр точки на ребре (0 <= edgeParam <= 1).
\en The parameter of a point on the edge (0 <= edgeParam <= 1). \~
\param[in] dimensionEdge - \ru Ребро, на котором дать опорные точки.
\en The edge on which the support points are to be created. \~
\return \ru Возвращает код результата построения.
\en Returns the creation result code. \~
\ingroup Algorithms_3D
*/
// ---
DEPRECATE_DECLARE_REPLACE( SmoothPositionData with MbSmoothPositionDataParams )
MATH_FUNC (MbResultType) SmoothPositionData( const MbSolid & solid,
RPArray<MbCurveEdge> & edges,
const SmoothValues & params,
RPArray<MbPositionData> & result,
double edgeParam = 0.5,
const MbCurveEdge * dimensionEdge = nullptr );
//------------------------------------------------------------------------------
/** \brief \ru Построить опорные точки размеров операции скругления/фаски.
\en Create support points of fillet/chamfer operation sizes. \~
\details \ru Построить опорные точки размеров операции скругления/фаски и сложить в контейнер data. \n
Первые две точки лежат на краях поверхности скругления/фаски.
\en Create support points of fillet/chamfer operation sizes and store them in container 'data'. \n
The first two points lie on the fillet/chamfer surface boundary. \~
\deprecated \ru Метод устарел. Взамен использовать #SmoothPositionData с набором параметров #MbSmoothPositionDataParams.
\en The method is deprecated. Use instead #SmoothPositionData with the parameters #MbSmoothPositionDataParams. \~
\param[in] solid - \ru Исходное тело.
\en The initial solid. \~
\param[in] edges - \ru Множество выбранных ребер для скругления/фаски и функций изменения радиуса для скругления/фаски.
\en The array of specified edges for fillet/chamfer and radius laws for fillet/chamfer. \~
\param[in] params - \ru Параметры операции скругления/фаски.
\en Parameters of the fillet/chamfer operation. \~
\param[out] result - \ru Опорные точки размеров операции скругления/фаски.
\en Support points of the fillet/chamfer operation sizes. \~
\param[in] edgeParam - \ru Параметр точки на ребре (0 <= edgeParam <= 1).
\en The parameter of a point on the edge (0 <= edgeParam <= 1). \~
\param[in] dimensionEdge - \ru Ребро, на котором дать опорные точки.
\en The edge on which the support points are to be created. \~
\return \ru Возвращает код результата построения.
\en Returns the creation result code. \~
\ingroup Algorithms_3D
*/
// ---
DEPRECATE_DECLARE_REPLACE( SmoothPositionData with MbSmoothPositionDataParams )
MATH_FUNC (MbResultType) SmoothPositionData( const MbSolid & solid,
SArray<MbEdgeFunction> & edges,
const SmoothValues & params,
RPArray<MbPositionData> & result,
double edgeParam = 0.5,
const MbCurveEdge * dimensionEdge = nullptr );
//------------------------------------------------------------------------------
/** \brief \ru Построить опорные точки размеров операции скругления/фаски.
\en Create support points of fillet/chamfer operation sizes. \~
@@ -401,8 +202,8 @@ MATH_FUNC (MbFunction *) CreateFunction( const MbCurve3D & curve,
\en A function creation for behavior of Y-curve coordinate with X-curve parameter. \n
\param[in] curve - \ru Кривая.
\en The curve. \~
\param[in] params - \ru Параметры скалярной функции.
\en The parameters of the scalar function. \~
\param[in] params - \ru Параметры создания скалярной функции.
\en The parameters of creating a scalar function. \~
\return \ru Возвращает построенную функцию.
\en Returns the created function. \~
\ingroup Algorithms_3D
@@ -430,56 +231,4 @@ MATH_FUNC (MbResultType) SectionPhantom( const MbSectionData & sectionData,
MbSectionPhantom & sctionPhantom );
//------------------------------------------------------------------------------
/** \brief \ru Вычисление данных фантома для торцев поверхности переменного сечения.
\en Calculation of the phantom data for the ends of the mutable section surface. \~
\details \ru Вычисление плоскости сечения, точек направляющих, сторон охватывающего треугольника и вершины на торце поверхности. \n
\en Calculating the section plane, guide points, sides of the enclosing triangle, and apex at the ends of the surface. \n
\param[in] sectionData - \ru Параметры поверхности переменного сечения.
\en The parameters of the mutable section surface. \~
\param[out] begPlace - \ru XY плоскость локальной системы координат в начале поверхности.
\en The XY plane of the local coordinate system is the plane at the beginning of the surface. \~
\param[out] begGuideP1 - \ru Точка первой направляющей в начале поверхности.
\en The point of the first guide at the beginning of the surface. \~
\param[out] begGuideP2 - \ru Точка второй направляющей в начале поверхности.
\en The point of the second guide at the beginning of the surface. \~
\param[out] begVector1 - \ru Вектор направления от первой направляющей (сторона охватывающего треугольника) в начале поверхности.
\en The direction vector from the first guide (the side of the enclosing triangle) at the beginning of the surface. \~
\param[out] begVector2 - \ru Вектор направления от второй направляющей (сторона охватывающего треугольника) в начале поверхности.
\en The direction vector from the second guide (the side of the enclosing triangle) at the beginning of the surface. \~
\param[out] begApex - \ru Точка вершинной кривой в начале поверхности (может быть в бесконечности).
\en The point of the apex curve at the beginning of the surface (maybe in infinity). \~
\param[out] endPlace - \ru XY плоскость локальной системы координат в конце поверхности.
\en The XY plane of the local coordinate system is the plane at the end of the surface. \~
\param[out] endGuideP1 - \ru Точка первой направляющей в конце поверхности.
\en The point of the first guide at the end of the surface. \~
\param[out] endGuideP2 - \ru Точка второй направляющей в конце поверхности.
\en The point of the second guide at the end of the surface. \~
\param[out] endVector1 - \ru Вектор направления от первой направляющей (сторона охватывающего треугольника) в конце поверхности.
\en The direction vector from the first guide (the side of the enclosing triangle) at the end of the surface. \~
\param[out] endVector2 - \ru Вектор направления от второй направляющей (сторона охватывающего треугольника) в конце поверхности.
\en The direction vector from the second guide (the side of the enclosing triangle) at the end of the surface. \~
\param[out] endApex - \ru Точка вершинной кривой в конце поверхности (может быть в бесконечности).
\en The point of the apex curve at the end of the surface (maybe in infinity). \~
\return \ru Возвращает код результата построения.
\en Returns the creation result code. \~
\ingroup Algorithms_3D
*/
// ---
DEPRECATE_DECLARE_REPLACE(SectionPhantom with MbSectionPhantom)
MATH_FUNC (MbResultType) SectionPhantom( const MbSectionData & sectionData,
MbPlacement3D & begPlace,
MbCartPoint3D & begGuideP1,
MbCartPoint3D & begGuideP2,
MbVector3D & begVector1,
MbVector3D & begVector2,
MbCartPoint3D & begApex,
MbPlacement3D & endPlace,
MbCartPoint3D & endGuideP1,
MbCartPoint3D & endGuideP2,
MbVector3D & endVector1,
MbVector3D & endVector2,
MbCartPoint3D & endApex );
#endif // __ACTION_PHANTOM_H
+6 -6
View File
@@ -22,12 +22,12 @@
#include <mb_variables.h>
class MATH_CLASS MbCurve;
class MATH_CLASS MbLineSegment;
class MATH_CLASS MbLine3D;
class MATH_CLASS MbCurve3D;
class MATH_CLASS MbSurface;
class MATH_CLASS MbFaceShell;
class MbCurve;
class MbLineSegment;
class MbLine3D;
class MbCurve3D;
class MbSurface;
class MbFaceShell;
//------------------------------------------------------------------------------
+526
View File
@@ -0,0 +1,526 @@
////////////////////////////////////////////////////////////////////////////////
/**
\file
\brief \ru Методы построения полигональных геометрических объектов с топологией.
\en Functions for construction of the polygonal geometric object with topology. \~
\details \ru Полигональные геометрические объекты могут быть построены по набору точек или на базе других объектов.
\en Polygonal geometric objects can be constructed using a set of points or on the basis of other objects. \~
*/
////////////////////////////////////////////////////////////////////////////////
#ifndef __ACTION_POLYMESH_H
#define __ACTION_POLYMESH_H
#include <mb_cart_point.h>
#include <mb_cart_point3d.h>
#include <mb_operation_result.h>
#include <curve3d.h>
class MbPolymesh;
class MbFaceShell;
class MbPolymeshTopo;
class MbHalfedgeBoundaryCriterionBase;
class MbMeshCurvatureParams;
class MbDrapeShellParams;
class MbDrapeShellResults;
class MbRemeshParams;
class MbShellLinearizationParams;
class MbMergePolymeshParams;
class MbMeshSmoothingParams;
class MbPolyline3D;
class MbPolylinePolymeshProjectParams;
class MbPolylinePolymeshProjectResults;
class MbFillClosedCurveParams;
class MbFillPolymeshHoleParams;
class MbPolymeshNormalsParams;
class MbCurvePolymeshProjectParams;
class MbPolymeshProjectResults;
class MbPathPolymeshOffsetParams;
class MbPolymeshBooleanParams;
class MbPolymeshBooleanResults;
//------------------------------------------------------------------------------
/** \brief \ru Создать полигональный объект по оболочке.
\en Create the polymesh by the shell. \~
\details \ru Создать полигональный объект по оболочке.
В нем будет сохранен маппинг от регионов и ребер сегментации к граням и ребрам оболочки.
Любые операции, изменяющие топологию сегментации, приведут к невалидности маппинга.
\en Create the polymesh by the shell.
Creates mapping from segmentation edges to shell edges and from segmentation regions to shell faces.
Any operations that change segmentation topology will lead to invalid mapping.
\param[in] params - \ru Параметры алгоритма.
\en The parameters. \~
\param[in] shell - \ru Оболочка.
\en The shell. \~
\param[in,out] mesh - \ru Полигональная сетка.
\en The polymesh. \~
\return \ru Код результата операции, rt_Success в случае успеха.
\en Returns the operation result code, rt_Success if polymesh has been created. \n
\ingroup Polygonal_Objects
\warning \ru В разработке.
\en Under development. \~
*/
// ---
MATH_FUNC( MbResultType ) CreatePolymeshByShell( const MbShellLinearizationParams & params, const MbFaceShell & shell, MbPolymesh & mesh );
//------------------------------------------------------------------------------
/** \brief \ru Выделить связные группы из набора фасетов.
\en Get connected groups from facets. \~
\param[in] mesh - \ru Полигональный объект с топологией.
\en A polygonal object with topology. \~
\param[in] facets - \ru Набор фасетов.
\en Facet array. \~
\param[out] groups - \ru Связные группы фасетов.
\en Groups of connected facets. \~
\ingroup Polygonal_Objects
\warning \ru В разработке.
\en Under development. \~
*/ // ---
MATH_FUNC( void ) GetConnectedFacetGroups( const MbPolymesh & mesh,
const c3d::IndicesVector & facets,
std::vector<c3d::IndicesVector> & groups );
//------------------------------------------------------------------------------
/** \brief \ru Выделить связные группы из набора регионов.
\en Get connected groups from regions. \~
\param[in] mesh - \ru Полигональный объект с топологией.
\en A polygonal object with topology. \~
\param[in] regions - \ru Набор регионов.
\en Region array. \~
\param[out] groups - \ru Связные группы регионов.
\en Groups of connected regions. \~
\ingroup Polygonal_Objects
\warning \ru В разработке.
\en Under development. \~
*/ // ---
MATH_FUNC( void ) GetConnectedRegionGroups( const MbPolymesh & mesh,
const c3d::IndicesVector & regions,
std::vector<c3d::IndicesVector> & groups );
//------------------------------------------------------------------------------
/** \brief \ru Разбить сетку на регионы согласно критерию границы.
\en Divide a polymesh into regions according to a given boundary criterion. \~
\param[in] mesh - \ru Полигональный объект с топологией.
\en A polygonal object with topology. \~
\param[in] crit - \ru Критерий границы.
\en Boundary criterion. \~
\param[out] facets - \ru Группы фасетов, разделенные по регионам.
\en Groups of facets divided into regions. \~
\ingroup Polygonal_Objects
\warning \ru В разработке.
\en Under development. \~
*/ // ---
MATH_FUNC( void ) GetPolymeshRegions( const MbPolymesh & mesh,
const MbHalfedgeBoundaryCriterionBase & crit,
std::vector<c3d::IndicesVector> & facets );
//------------------------------------------------------------------------------
/** \brief \ru Получить регион сетки согласно критерию границы по указанному фасету-затравке.
\en Get the region containing a given facet according to a given boundary criterion. \~
\param[in] mesh - \ru Полигональный объект с топологией.
\en A polygonal object with topology. \~
\param[in] crit - \ru Критерий границы.
\en Boundary criterion. \~
\param[in] seed - \ru Фасет-затравка.
\en A seed facet. \~
\param[out] facets - \ru Все фасеты региона.
\en All the facets of a region. \~
\ingroup Polygonal_Objects
\warning \ru В разработке.
\en Under development. \~
*/ // ---
MATH_FUNC( void ) GetPolymeshRegion( const MbPolymesh & mesh,
const MbHalfedgeBoundaryCriterionBase & crit,
size_t seed,
c3d::IndicesVector & facets );
//------------------------------------------------------------------------------
/** \brief \ru Получить границы региона фасетов.
\en Get the boundary edges of a given region. \~
\param[in] mesh - \ru Полигональный объект с топологией.
\en A polygonal object with topology. \~
\param[in] region - \ru Набор фасетов, составляющих регион.
\en Facet array which forms a region. \~
\param[out] boundaries - \ru Границы региона (набор граничных ребер).
\en Boundary edges of a region. \~
\ingroup Polygonal_Objects
\warning \ru В разработке.
\en Under development. \~
*/ // ---
MATH_FUNC( void ) GetPolymeshRegionBoundaries( const MbPolymesh & mesh,
const c3d::IndicesVector & region,
std::vector<c3d::IndicesVector> & boundaries );
//------------------------------------------------------------------------------
/** \brief \ru Получить открытые границы сетки.
\en Get the open boundary edges of a polymesh. \~
\param[in] mesh - \ru Полигональный объект с топологией.
\en A polygonal object with topology. \~
\param[out] boundaries - \ru Открытые границы (наборы граничных ребер).
\en Arrays of open boundary edges. \~
\ingroup Polygonal_Objects
\warning \ru В разработке.
\en Under development. \~
*/ // ---
MATH_FUNC( void ) GetPolymeshOpenBoundaries( const MbPolymesh & mesh, std::vector<c3d::IndicesVector> & boundaries );
//------------------------------------------------------------------------------
/** \brief \ru Получить открытые границы сегментации.
\en Get open segmentation boundaries. \~
\param[in] mesh - \ru Полигональный объект с топологией.
\en A polygonal object with topology. \~
\param[out] boundaries - \ru Открытые границы (наборы граничных ребер сегментации).
\en Arrays of open boundary edges of a segmentation. \~
\ingroup Polygonal_Objects
\warning \ru В разработке.
\en Under development. \~
*/ // ---
MATH_FUNC( void ) GetSegmOpenBoundaries( const MbPolymesh & mesh, std::vector<c3d::IndicesVector> & boundaries );
/// \ru Получить полилинию для ребра сегментации.
MATH_FUNC( bool ) GetPolymeshEdgePolyline( const MbPolymesh & mesh, size_t iEdSegm, c3d::SpacePointsVector & polyline );
/// \ru Получить полилинию для цикла сегментации.
MATH_FUNC( void ) GetPolymeshLoopPolyline( const MbPolymesh & mesh, size_t iLoop, c3d::SpacePointsVector & polyline );
//------------------------------------------------------------------------------
/** \brief \ru Построить контур сечения полигонального объекта плоскостью.
\en Create a section contour for a polygonal object. \~
\param[in] mesh - \ru Полигональный объект с топологией.
\en A polygonal object with topology. \~
\param[in] place - \ru Секущая плоскость.
\en A cutting plane. \~
\param[out] polylines - \ru Построенные ломаные контура сечения объекта.
\en The resultant contours. \~
\ingroup Polygonal_Objects
\warning \ru В разработке.
\en Under development. \~
*/ // ---
MATH_FUNC( MbResultType ) PolymeshSection( const MbPolymesh & mesh,
const MbPlacement3D & place,
c3d::SpaceCurvesSPtrVector & polylines );
//------------------------------------------------------------------------------
/** \brief \ru Отрезать часть полигонального объекта плоскостью.
\en Cut the part of a polygonal object by a plane. \~
\param[in] place - \ru Секущая плоскость.
\en A cutting plane. \~
\param[in] bTriangulate - \ru Триангулировать ли разрезанные фасеты.
\en Should cut facets be triangulated. \~
\param[in,out] mesh - \ru Полигональный объект с топологией.
\en A polygonal object with topology. \~
\ingroup Polygonal_Objects
\warning \ru В разработке.
\en Under development. \~
*/ // ---
MATH_FUNC( bool ) CutPolymeshByPlane( const MbPlacement3D & place,
bool bTriangulate,
MbPolymesh & mesh );
//------------------------------------------------------------------------------
/** \brief \ru Скопировать часть полигонального объекта в другой полигональный объект.
\en Copy the part of a polygonal object into another polygonal object. \~
\param[in] mesh - \ru Оригинальный полигональный объект.
\en An original polygonal object. \~
\param[in] facets - \ru Набор копируемых фасетов.
\en A polygonal object with topology. \~
\param[in,out] meshSub - \ru Полигональный объект, в который производится копирование.
\en A polygonal object in which data should be copied to. \~
\ingroup Polygonal_Objects
\warning \ru В разработке.
\en Under development.\~
*/ // ---
MATH_FUNC( void ) CopyPolymeshPart( const MbPolymesh & mesh, const c3d::IndicesVector & facets, MbPolymesh & meshSub );
//------------------------------------------------------------------------------
/** \brief \ru Проверить, является ли полигональный объект триангуляцией.
\en Verify if polymesh is triangulation. \~
\param[in] mesh - \ru Полигональный объект.
\en Polygonal object. \~
\return \ru True если полигональный объект является триангуляцией, иначе false.
\en True if polymesh is triangulation, otherwise false. \~
\ingroup Polygonal_Objects
*/ // ---
MATH_FUNC( bool ) IsPolymeshTriangulation( const MbPolymesh & mesh );
//------------------------------------------------------------------------------
/** \brief \ru Ремешировать полигональный объект.
\en Remesh a polygonal object. \~
\details \ru Ремешировать полигональный объект.
Он должен быть триангуляцией. Если метод ремешинга по кривизне, в сетке должен
присутствовать атрибут кривизн.
Атрибуты нормалей и кривизн будут удалены.
Если в сетке есть оболочка как параметрическая подложка, она будет использована для проецирования
вершин триангуляции.
\en Remesh a polygonal object.
The polymesh must contains only triangle facets.
For remeshing by curvature method a curvature attribute must be defined.
Deletes curvature and normal attributes.
If the polymesh has a shell as a parametric substrate, it will be used for a polymesh vertices projection. \~
\param[in] params - \ru Параметры алгоритма.
\en The parameters. \~
\param[in,out] mesh - \ru Полигональная сетка.
\en The polymesh. \~
\return \ru Код результата операции, rt_Success в случае успеха.
\en Returns the operation result code, rt_Success if remeshing is successful. \n
\ingroup Polygonal_Objects
\warning \ru В разработке.
\en Under development. \~
*/
// ---
MATH_FUNC( MbResultType ) Remesh( const MbRemeshParams & params, MbPolymesh & mesh );
//------------------------------------------------------------------------------
/** \brief \ru Рассчитать кривизны полигональной сетки.
\en Calculates mesh curvatures. \~
\details \ru Рассчитать кривизны полигональной сетки.
Результатом операции является появление у полигональной сетки атрибута кривизн.
Если атрибут уже был, он будет удален и создан заново.
\en Calculates mesh curvatures.
Operation result is a curvature half edge attribute inserted into the original polymesh.
If mesh has one it will be removed before caclulation. \~
\param[in] params - \ru Параметры алгоритма.
\en The parameters. \~
\param[in,out] mesh - \ru Полигональная сетка.
\en Polymesh. \~
\return \ru Код результата операции, rt_Success если кривизны были рассчитаны.
\en Returns the operation result code, rt_Success if curvatures were calculated. \n
\ingroup Polygonal_Objects
\warning \ru В разработке.
\en Under development. \~
*/
// ---
MATH_FUNC( MbResultType ) CalculatePolymeshCurvatures( const MbMeshCurvatureParams & params, MbPolymesh & mesh );
//------------------------------------------------------------------------------
/** \brief \ru Драпировка оболочки тканью.
\en Drap a shell with fabric. \~
\details \ru Драпировка оболочки тканью.
\en Drap a shell with fabric.
\param[in] params - \ru Параметры алгоритма.
\en The parameters. \~
\param[out] results - \ru Результаты алгоритма.
\en Results. \~
\return \ru Код результата операции, rt_Success если драпировка получилась.
\en Returns the operation result code, rt_Success if drape is successful. \n
\ingroup Shell_Modeling
\warning \ru В разработке.
\en Under development. \~
*/
// ---
MATH_FUNC( MbResultType ) DrapeShell( const MbDrapeShellParams & params, MbDrapeShellResults & results );
//------------------------------------------------------------------------------
/** \brief \ru Объединить полигональный объект с другим полигональным объектом.
\en Merge a polygonal object with another polygonal object. \~
\param[in] meshFrom - \ru Полигональный объект, который копируется в meshTo.
\en A polygonal object, being copied into meshTo. \~
\param[in] params - \ru Параметры объединения.
\en Merging parameters. \~
\param[in-out] meshTo - \ru Полигональный объект, который аккумулирует результат объединения.
\en A polygonal object, accumulating merged objects. \~
\return \ru Код результата операции, rt_Success, если объекты успешно объединены.
\en Returns the operation result code, rt_Success if the objects are successfully merged. \n
\ingroup Polygonal_Objects
\warning \ru В разработке.
\en Under development.\~
*/ // ---
MATH_FUNC( MbResultType ) MergePolymeshes( const MbPolymesh & meshFrom, const MbMergePolymeshParams & params, MbPolymesh & meshTo );
//------------------------------------------------------------------------------
/** \brief \ru Сгладить полигональный объект по набору входных параметров сглаживания.
\en Smooth a polygonal object using a set of input smoothing parameters. \~
\param[in] params - \ru Параметры сглаживания.
\en Smoothing parameters. \~
\param[in-out] mesh - \ru Полигональный объект.
\en A polygonal object. \~
\return \ru Код результата операции, rt_Success если объект успешно сглажен.
\en Returns the operation result code, rt_Success if the object is successfully smoothed. \n
\ingroup Polygonal_Objects
\warning \ru В разработке.
\en Under development.\~
*/ // ---
MATH_FUNC( MbResultType ) SmoothPolymesh( const MbMeshSmoothingParams & params, MbPolymesh & mesh );
//------------------------------------------------------------------------------
/** \brief \ru Спроецировать полилинию на полигональный объект.
\en Project a polyline on a polygonal object. \~
\details \ru Спроецировать полилинию на полигональный объект.
Если на некотором участке полилиния проецируется внутрь фасета, он разделяется на несколько фасетов.
При этом создаются новые рёбра полигонального объекта.
\en Project a polyline on a polygonal object.
In case of projecting a polyline's fragment inside a facet, it splits into new ones, so new edges are created. \~
\param[in-out] mesh - \ru Полигональный объект.
\en A polygonal object being projected on. \~
\param[in] params - \ru Параметры проецирования полилинии на полигональный объект.
\en Parameters for projecting a polyline on a polymesh. \~
\param[out] results - \ru Результат проецирования полилинии на полигональный объект.
\en Result of projecting a polyline on a polymesh. \~
\return \ru Код результата операции, rt_Success, если проекция успешно построена.
\en Returns the operation result code, rt_Success if a polyline is successfully projected. \n
\ingroup Polygonal_Objects
\warning \ru В разработке.
\en Under development.\~
*/ // ---
MATH_FUNC( MbResultType ) ProjectPolylineOnPolymesh( MbPolymesh & mesh, const MbPolylinePolymeshProjectParams & params, MbPolylinePolymeshProjectResults & results );
//------------------------------------------------------------------------------
/** \brief \ru Заполнить отверстие, заданное замкнутой кривой.
\en Fill a hole defined by a closed curve. \~
\details \ru Заполнить отверстие, заданное замкнутой кривой.
\en Fill a hole defined by a closed curve. \~
\param[in] params - \ru Параметры заполнения.
\en Filling parameters. \~
\param[out] patch - \ru Заплатка.
\en A patch. \~
\return \ru Код результата операции.
\en Returns the operation result code. \~
\ingroup Polygonal_Objects
\warning \ru В разработке.
\en Under development. \~
*/ // ---
MATH_FUNC( MbResultType ) FillClosedCurve( const MbFillClosedCurveParams & params, MbPolymesh & patch );
//------------------------------------------------------------------------------
/** \brief \ru Заполнить отверстие полигонального объекта.
\en Fill a polygonal object hole. \~
\details \ru Заполнить отверстие полигонального объекта.
В результате операции в полигональном объекте могут появиться неактивные элементы.
Впоследствии их можно удалить вручную функцией DeleteInactive.
\en Fill a polygonal object hole.
Some inactive elements can appear during the operation.
They can be explicitly removed by the DeleteInactive function afterwards. \~
\param[in] params - \ru Параметры заполнения.
\en Filling parameters. \~
\param[in-out] mesh - \ru Полигональный объект.
\en A polygonal object. \~
\return \ru Код результата операции.
\en Returns the operation result code. \~
\ingroup Polygonal_Objects
\warning \ru В разработке.
\en Under development. \~
*/ // ---
MATH_FUNC( MbResultType ) FillPolymeshHole( const MbFillPolymeshHoleParams & params, MbPolymesh & mesh );
//------------------------------------------------------------------------------
/** \brief \ru Рассчитать нормали в вершинах полигонального объекта.
\en Calculate normal vectors at the vertices of a polygonal object. \~
\details \ru Рассчитать нормали в вершинах полигонального объекта.
В результате операции у полигонального объекта появится атрибут нормалей, если его не было,
и обновится, если был.
\en Calculate normal vectors at the vertices of a polygonal object.
As a result of the operation, the polygonal object will have a attribute with normals if it did not exist,
and will be updated if it did. \~
\param[in] params - \ru Параметры расчета нормалей.
\en Parameters for calculation of normal vectors. \~
\param[in-out] mesh - \ru Полигональный объект.
\en A polygonal object. \~
\return \ru Код результата операции.
\en Returns the operation result code. \~
\ingroup Polygonal_Objects
\warning \ru В разработке.
\en Under development. \~
*/ // ---
MATH_FUNC( MbResultType ) CalculatePolymeshNormals( const MbPolymeshNormalsParams & params, MbPolymesh & mesh );
//------------------------------------------------------------------------------
/** \brief \ru Обрезать полигональный объект набором кривых.
\en Cut a polygonal object by a set of curves. \~
\details \ru Обрезать полигональный объект набором кривых.
В результате операции в полигональном объекте могут появиться неактивные элементы.
Впоследствии их можно удалить вручную функцией DeleteInactive.
\en Cut a polygonal object by a set of curves.
Some inactive elements can appear during the operation.
They can be explicitly removed by the DeleteInactive function afterwards. \~
\param[in] params - \ru Параметры обрезки полигонального объекта набором кривых.
\en Parameters for cutting a polymesh with a set of curves. \~
\param[out] results - \ru Результаты обрезки полигонального объекта набором кривых.
\en Results of cutting a polymesh with a set of curves. \~
\param[in-out] mesh - \ru Полигональный объект.
\en A polygonal object being projected on. \~
\return \ru Код результата операции, rt_Success в случае успеха операции.
\en Returns the operation result code, rt_Success if an operation is successful. \n
\ingroup Polygonal_Objects
\warning \ru В разработке.
\en Under development.\~
*/ // ---
MATH_FUNC( MbResultType ) CutPolymeshByCurves( const MbCurvePolymeshProjectParams & params, MbPolymeshProjectResults & results, MbPolymesh & mesh );
//------------------------------------------------------------------------------
/** \brief \ru Выполнить эквидистантное смещение цепочек ребер по поверхности полигонального объекта.
\en Offset polymesh edge paths. \~
\details \ru Выполнить эквидистантное смещение цепочек ребер по поверхности полигонального объекта.
В результате операции в полигональном объекте могут появиться неактивные элементы.
Впоследствии их можно удалить вручную функцией DeleteInactive.
\en Offset polymesh edge paths.
Some inactive elements can appear during the operation.
They can be explicitly removed by the DeleteInactive function afterwards. \~
\param[in] params - \ru Параметры оффсета цепочки ребер полигонального объекта.
\en Parameters for polymesh edge paths offsetting. \~
\param[out] results - \ru Результаты оффсета цепочки ребер полигонального объекта
\en Results of polymesh edge paths offsetting. \~
\param[in-out] mesh - \ru Полигональный объект.
\en A polygonal object. \~
\return \ru Код результата операции, rt_Success в случае успеха операции.
\en Returns the operation result code, rt_Success if an operation is successful. \n
\ingroup Polygonal_Objects
\warning \ru В разработке.
\en Under development.\~
*/ // ---
MATH_FUNC( MbResultType ) OffsetPolymeshPath( const MbPathPolymeshOffsetParams & params, MbPolymeshProjectResults & results, MbPolymesh & mesh );
//------------------------------------------------------------------------------
/** \brief \ru Булева операция на двух полигональных объектах.
\en Boolean operation for two polygonal objects. \~
\details \ru Булева операция на двух полигональных объектах.
Поддерживаются сетки, содержащие только треугольные фасеты.
Первый полигональный объект будет содержать сетку - результат операции.
Второй полигональный объект будет невалиден после операции.
\en Boolean operation for two polygonal objects. \~
Supports meshes with triangular facets only.
The first polygonal object will contain the polymesh with boolean operation result.
The second polygonal object will be invalid after operation.
\param[in] params - \ru Параметры операции.
\en The parameters. \~
\param[out] results - \ru Результаты операции.
\en The results. \~
\param[in-out] mesh0 - \ru Первый полигональный объект.
\en The first polygonal object. \~
\param[in-out] mesh1 - \ru Второй полигональный объект.
\en The second polygonal object. \~
\return \ru Возвращает код результата операции.
\en Returns operation result code. \~
\warning \ru В разработке.
\en Under development.\~
\ingroup Polygonal_Objects
*/ // ---
MATH_FUNC( MbResultType ) PolymeshBoolean( const MbPolymeshBooleanParams & params, MbPolymeshBooleanResults & results, MbPolymesh & mesh0, MbPolymesh & mesh1 );
#endif // __ACTION_POLYMESH_H
+64
View File
@@ -0,0 +1,64 @@
////////////////////////////////////////////////////////////////////////////////
/**
\file
\brief \ru Классы для операций с полигональными геометрическими объектами с топологией.
\en Classes for operations with polygonal geometric objects with topology. \~
*/
////////////////////////////////////////////////////////////////////////////////
#ifndef __ACTION_POLYMESH_OPERATIONS_H
#define __ACTION_POLYMESH_OPERATIONS_H
#include <math_define.h>
#include <mb_operation_result.h>
class MbPolymesh;
class MbSegmentationParams;
class MbRepairSegmentationParams;
//------------------------------------------------------------------------------
/** \brief \ru Абстрактный класс для сегментации полигональных объектов.
\en An abstract class for segmenting polygonal objects. \~
\details \ru Абстрактный класс для сегментации полигональных объектов.
\en An abstract class for segmenting polygonal objects. \~
\warning \ru В разработке.
\en Under development. \~
*/
// ---
class MATH_CLASS MbMeshSegmenter
{
protected:
/// \ru Конструктор. \en Constructor.
MbMeshSegmenter() = default;
public:
/// \ru Деструктор. \en Destructor.
virtual ~MbMeshSegmenter() = default;
/** \brief \ru Создать экземпляр класса на основе MbPolymesh.
\en Create an object by MbPolymesh. \~
\param[in] mesh - \ru Полигональный геометрический объект.
\en A polygonal geometric object. \~
\return \ru Возвращает указатель на созданный объект.
\en Returns the pointer to a created object. \~
*/
static MbMeshSegmenter * Create( MbPolymesh & mesh );
/** \brief \ru Сегментировать полигональный объект.
\en Segment the polygonal object. \~
\param[in] params - \ru Параметры сегментации.
\en Segmentation parameters. \~
\return \ru Код результата операции.
\en Returns the operation result code. \~
*/
virtual MbResultType Segment( const MbSegmentationParams & params ) = 0;
/** \brief \ru Починить сегментацию полигонального объекта.
\en Repair the segmentation of the polygonal object. \~
\param[in] params - \ru Параметры лечения сегментации.
\en Parameters for repairing the segmentation. \~
*/
virtual void RepairSegmentation( const MbRepairSegmentationParams & params ) = 0;
};
#endif // __ACTION_POLYMESH_OPERATIONS_H
-74
View File
@@ -946,19 +946,6 @@ MATH_FUNC (MbResultType) CreateStampParts( const MbStampPartsParams & params,
MbStampPartsResult & resultSolids );
//------------------------------------------------------------------------------
// устаревшая
// ---
DEPRECATE_DECLARE_REPLACE( CreateStampParts with 'MbStampPartsParams' argument )
MATH_FUNC (MbResultType) CreateStampParts( const MbPlacement3D & placement,
const MbContour & contour,
const MbStampingValues & params,
const double thickness,
const MbSNameMaker & nameMaker,
MbSolid *& partToAdd,
MbSolid *& partToSubtract );
//------------------------------------------------------------------------------
/** \brief \ru Создание составляющих частей штамповки одного тела другим телом.
\en Stamping with a tool solid (punch or die). \~
@@ -1736,67 +1723,6 @@ MATH_FUNC (bool) BuildBends3DCenterlines( const MbBends3DLinesParams & params,
MbBends3DLinesResult & result );
//------------------------------------------------------------------------------
/** \brief \ru Рассчитать параметры для замыкания угла.
\en Calculate the parameters for the corner closure. \~
\details \ru Находит общее ребро угла или пару рёбер для замыканий через сгиб. Рассчитывает параметры замыкания для данных пар граней.\n
\en Find common edge for corner closure or two basic edges for corner closure across bend.
Calculate the parameters for the corner closure of selected faces.\n \~
\deprecated \ru Функция устарела, взамен использовать #GetParamsForCloseCorner с параметрами #MbCloseCornerParams и #MbCloseCornerResults.
\en The function is deprecated, instead use #GetParamsForCloseCorner with parameters #MbCloseCornerParams and #MbCloseCornerResults. \~
\param[in] facesPlus - \ru Выбранные торцевые грани стороны угла, условно принятой за положительную.
\en Selected butt faces from the side of angle assumed to be positive.\~
\param[in] facesMinus - \ru Выбранные торцевые грани стороны угла, условно принятой за отрицательную.
\en Selected butt faces from the side of angle assumed to be negative. \~
\param[out] parameters - \ru Параметры замыкания.
\en The closure parameters. \~
\param[out] edgePlus - \ru Ребро сгиба, условно принятое за положительное.
\en The bend edge assumed to be positive. \~
\param[out] edgeMinus - \ru Ребро сгиба, условно принятое за отрицательное.
\en The bend edge assumed to be negative. \~
\return \ru true - в случае успеха операции, false - в противном случае.
\en True if the operation succeeded, otherwise false. \~
\ingroup Sheet_Metal_Modeling
*/
// ---
DEPRECATE_DECLARE_REPLACE( GetParamsForCloseCorner with MbCloseCornerParams and MbCloseCornerResults arguments )
MATH_FUNC (bool) GetParamsForCloseCorner( const RPArray<MbFace> & facesPlus,
const RPArray<MbFace> & facesMinus,
MbClosedCornerValues & parameters,
MbCurveEdge *& edgePlus,
MbCurveEdge *& edgeMinus );
//------------------------------------------------------------------------------
/** \brief \ru Рассчитать параметры для замыкания угла.
\en Calculate the parameters for the corner closure. \~
\details \ru Находит общее ребро угла или пару рёбер для замыканий через сгиб.\n
\en Find common edge for corner closure or two basic edges for corner closure across bend.\n \~
\deprecated \ru Функция устарела, взамен использовать #GetParamsForCloseCorner с параметрами #MbCloseCornerParams и #MbCloseCornerResults.
\en The function is deprecated, instead use #GetParamsForCloseCorner with parameters #MbCloseCornerParams and #MbCloseCornerResults. \~
\param[in] selectedEdgePlus - \ru Выбранное ребро стороны угла, условно принятой за положительную.
\en Selected edge from the side of angle assumed to be positive.\~
\param[in] selectedEdgeMinus - \ru Выбранное ребро стороны угла, условно принятой за отрицательную.
\en Selected edge from the side of angle assumed to be negative. \~
\param[out] parameters - \ru Параметры замыкания.
\en The closure parameters. \~
\param[out] edgePlus - \ru Ребро сгиба, условно принятое за положительное.
\en The bend edge assumed to be positive. \~
\param[out] edgeMinus - \ru Ребро сгиба, условно принятое за отрицательное.
\en The bend edge assumed to be negative. GetParamsForCloseCorner
\return \ru true - в случае успеха операции, false - в противном случае.
\en True if the operation succeeded, otherwise false. \~
\ingroup Sheet_Metal_Modeling
*/
// ---
DEPRECATE_DECLARE_REPLACE( GetParamsForCloseCorner with MbCloseCornerParams and MbCloseCornerResults arguments )
MATH_FUNC (bool) GetParamsForCloseCorner( const MbCurveEdge & selectedEdgePlus,
const MbCurveEdge & selectedEdgeMinus,
MbClosedCornerValues & parameters,
MbCurveEdge *& edgePlus,
MbCurveEdge *& edgeMinus );
//------------------------------------------------------------------------------
/** \brief \ru Рассчитать параметры для замыкания угла.
\en Calculate the parameters for the corner closure. \~
+84 -440
View File
@@ -26,26 +26,21 @@
#define __ACTION_SHELL_H
#include <templ_rp_array.h>
#include <templ_s_array.h>
#include <mb_cart_point3d.h>
#include <space_item.h>
#include <op_boolean_flags.h>
#include <op_shell_parameter.h>
#include <op_swept_parameter.h>
#include <topology_faceset.h>
#include <mb_operation_result.h>
class MATH_CLASS MbCurve;
class MATH_CLASS MbCurve3D;
class MATH_CLASS MbSurface;
class MATH_CLASS MbCurveEdge;
class MATH_CLASS MbFace;
class MATH_CLASS MbSolid;
class MATH_CLASS MbSNameMaker;
class MATH_CLASS MbPatchCurve;
class IProgressIndicator;
class MbCurve;
class MbCurve3D;
class MbSurface;
class MbCurveEdge;
class MbFace;
class MbSolid;
class MbSNameMaker;
class MbPatchCurve;
class IProgressIndicator;
//------------------------------------------------------------------------------
@@ -142,36 +137,6 @@ MATH_FUNC (MbResultType) OffsetShell( MbSolid & solid,
MbSolid *& result );
//------------------------------------------------------------------------------
/** \brief \ru Построить незамкнутое тело по множеству точек.
\en Create an open solid from a point set. \~
\details \ru Построить незамкнутое тело по множеству точек, заданных в параметрах построения. \n
\en Create an open solid from a point set specified in parameters. \n \~
\deprecated \ru Функция устарела, взамен использовать #NurbsSurfacesShell с набором параметров #MbNurbsSurfacesShellParams.
\en The function is deprecated, instead use #NurbsSurfacesShell with the parameter list #MbNurbsSurfacesShellParams. \~
\param[in, out] params - \ru Параметры операции.
\en The operation parameters. \~
\param[in] operNames - \ru Именователь.
\en An object for naming the new objects. \~
\param[in] isPhantom - \ru Режим создания фантома.
\en Create in the phantom mode. \~
\param[out] result - \ru Результирующая оболочка.
\en The required shell. \~
\param[in, out] progBar - \ru Индикатор прогресса выполнения операции.
\en A progress indicator of the operation. \~
\return \ru Возвращает код результата операции.
\en Returns operation result code. \~
\ingroup Shell_Modeling
*/
// ---
DEPRECATE_DECLARE_REPLACE( NurbsSurfacesShell with MbNurbsSurfacesShellParams )
MATH_FUNC (MbResultType) NurbsSurfacesShell( NurbsSurfaceValues & params,
const MbSNameMaker & operNames,
bool isPhantom,
MbSolid *& result,
IProgressIndicator * progBar );
//------------------------------------------------------------------------------
/** \brief \ru Построить незамкнутое тело по множеству точек.
\en Create an open solid from a point set. \~
@@ -193,37 +158,13 @@ MATH_FUNC (MbResultType) NurbsSurfacesShell( MbNurbsSurfacesShellParams & params
IProgressIndicator * progBar );
//------------------------------------------------------------------------------
/** \brief \ru Построить незамкнутое тело по сети кривых.
\en Create an open solid from a set of curves. \~
\details \ru Построить незамкнутое тело по сети кривых, заданных в параметрах построения. \n
\en Create an open solid from a set of curves specified in the parameters. \n \~
\deprecated \ru Функция устарела, взамен использовать #MeshShell с набором параметров #MbMeshShellParameters.
\en The function is deprecated, instead use #MeshShell with the parameter list #MbMeshShellParameters. \~
\param[in] pars - \ru Параметры операции.
\en The operation parameters. \~
\param[in] operNames - \ru Именователь.
\en An object for naming the new objects. \~
\param[in] isPhantom - \ru Режим создания фантома.
\en Create in the phantom mode. \~
\param[out] result - \ru Результирующая оболочка.
\en The required shell. \~
\return \ru Возвращает код результата операции.
\en Returns operation result code. \~
\ingroup Shell_Modeling
*/
// ---
DEPRECATE_DECLARE_REPLACE( MeshShell with MbMeshShellParameters )
MATH_FUNC (MbResultType) MeshShell( MeshSurfaceValues & pars,
const MbSNameMaker & operNames,
bool isPhantom,
MbSolid *& result );
//------------------------------------------------------------------------------
/** \brief \ru Построить тело по сети кривых.
\en Create a solid from a set of curves. \~
\details \ru Построить тело по сети кривых, заданных в параметрах построения. \n
\en Create a solid from a set of curves specified in the parameters. \n \~
\deprecated \ru Функция устарела, взамен использовать функцию со структурой результата построения.
\en The constructor is deprecated. Instead, use a function MeshShell with a structure MbMeshShellResults. \~
\param[in] params - \ru Параметры операции.
\en The operation parameters. \~
\param[out] result - \ru Результирующая оболочка.
@@ -233,9 +174,27 @@ MATH_FUNC (MbResultType) MeshShell( MeshSurfaceValues & pars,
\ingroup Shell_Modeling
*/
// ---
DEPRECATE_DECLARE_REPLACE ( MeshShell with a structure MbMeshShellResults )
MATH_FUNC (MbResultType) MeshShell( const MbMeshShellParameters & params,
c3d::SolidSPtr & result );
//------------------------------------------------------------------------------
/** \brief \ru Построить тело по сети кривых.
\en Create a solid from a set of curves. \~
\details \ru Построить тело по сети кривых, заданных в параметрах построения. \n
\en Create a solid from a set of curves specified in the parameters. \n \~
\param[in] params - \ru Параметры операции.
\en The operation parameters. \~
\param[out] result - \ru Результаты построения.
\en Operation results. \~
\return \ru Возвращает код результата операции.
\en Returns operation result code. \~
\ingroup Shell_Modeling
*/
// ---
MATH_FUNC (MbResultType) MeshShell( const MbMeshShellParameters & params,
MbMeshShellResults & result );
//------------------------------------------------------------------------------
/** \brief \ru Усечь (обрезать) незамкнутое тело.
@@ -250,8 +209,8 @@ MATH_FUNC (MbResultType) MeshShell( const MbMeshShellParameters & params,
\en Whether to copy the initial shells. \~
\param[in] operNames - \ru Именователь.
\en An object for naming the new objects. \~
\param[in] truncatingItems - \ru Усекающие объекты.
\en Truncating objects. \~
\param[in] truncatingItems - \ru Усекающие объекты ( кривые, поверхности или тела ).
\en Truncating objects ( curves, surfaces or solids ). \~
\param[in] truncatingOrients - \ru Ориентация усекающих объектов.
\en The truncating objects orientation. \~
\param[in] truncatingSplitMode - \ru Кривые используются как линии разъема.
@@ -269,6 +228,7 @@ MATH_FUNC (MbResultType) MeshShell( const MbMeshShellParameters & params,
\ingroup Shell_Modeling
*/
// ---
DEPRECATE_DECLARE_REPLACE ( TruncateShell with MbTruncateShellParams )
MATH_FUNC (MbResultType) TruncateShell( MbSolid & initSolid,
SArray<size_t> & selIndices,
MbeCopyMode initCopyMode,
@@ -282,48 +242,31 @@ MATH_FUNC (MbResultType) TruncateShell( MbSolid & initSolid,
MbPlacement3D *& resultPlace );
//------------------------------------------------------------------------------
/** \brief \ru Построить продолжение незамкнутого тела выдавливанием.
\en Create an extension of an open solid by extrusion. \~
\details \ru Построить продолжение незамкнутого тела путём продления указанных краевых рёбер тела. \n
Продление может быть выполнено следующими способами.
Может быть удлинена на заданное расстояние указанная грань.
К указанной грани может быть добавлена гладко стыкующаяся с ней грань.
К указанной грани может быть добавлена грань, полученная выдавливанием крайнего ребра в заданном направлении.
\en Create an extension of an open solid by extension of specified boundary edges of the solid. \n \~
An extension can be performed in the following ways:
The specified faces can be extended on the given distance.
A smoothly connected face can be added to the given face.
A face obtained by extrusion of a boundary edge in the given direction can be added to the specified face.
\param[in] solid - \ru Исходная оболочка.
\en The initial shell. \~
\param[in] sameShell - \ru Режим копирования оболочки.
\en Whether to copy the shell. \~
\param[in] face - \ru Одна из продляемых граней в исходной оболочке.
\en One of the face of the initial shell to be extended. \~
\param[in] edges - \ru Множество краевых ребер, через которые выполняется продление.
\en An array of boundary edges through which to extend the face. \~
\param[in] params - \ru Параметры операции.
\en The operation parameters. \~
\param[in] operNames - \ru Именователь.
\en An object for naming the new objects. \~
\param[out] result - \ru Результирующая оболочка.
\en The required shell. \~
\return \ru Возвращает код результата операции.
\en Returns operation result code. \~
\deprecated \ru Функция устарела, взамен использовать #ExtensionShell с набором параметров #MbExtensionShellParams.
\en The function is deprecated, instead use #ExtensionShell with the parameter list #MbExtensionShellParams. \~
/** \brief \ru Усечь (обрезать) незамкнутое тело.
\en Truncate an open solid. \~
\details \ru Выполнить построение незамкнутого тела путём усечения исходного тела. \n
\en Create an open solid by truncation the initial solid. \n \~
\param[in] initSolid - \ru Исходная оболочка.
\en The initial shell. \~
\param[in] copyMode - \ru Режим копирования исходной оболочки.
\en Whether to copy the initial shells. \~
\param[in] params - \ru Параметры операции.
\en The operation parameters. \~
\param[out] results - \ru Результаты операции.
\en The operation results. \~
\return \ru Возвращает код результата операции.
\en Returns operation result code. \~
\ingroup Shell_Modeling
\warning \ru В разработке.
\en Under development. \~
*/
// ---
DEPRECATE_DECLARE_REPLACE( ExtensionShell with MbExtensionShellParams )
MATH_FUNC (MbResultType) ExtensionShell( MbSolid & solid,
MbeCopyMode sameShell,
MbFace & face,
const RPArray<MbCurveEdge> & edges,
const ExtensionValues & params,
const MbSNameMaker & operNames,
MbSolid *& result );
MATH_FUNC( MbResultType ) TruncateShell( MbSolid & initSolid,
MbeCopyMode copyMode,
const MbTruncateShellParams & params,
MbTruncateShellResults & results );
//------------------------------------------------------------------------------
@@ -358,33 +301,6 @@ MATH_FUNC (MbResultType) ExtensionShell( MbSolid & solid,
c3d::SolidSPtr & result );
//------------------------------------------------------------------------------
/** \brief \ru Построить линейчатое незамкнутое тело.
\en Create an open ruled solid. \~
\details \ru Построить линейчатое незамкнутое тело по двум кривым, заданным в параметрах. \n
\en Create an open ruled solid from two curves specified in parameters. \n \~
\param[in,out] pars - \ru Параметры операции.
\en The operation parameters. \~
\param[in] operNames - \ru Именователь.
\en An object for naming the new objects. \~
\param[in] isPhantom - \ru Режим создания фантома.
\en Create in the phantom mode. \~
\param[out] result - \ru Результирующая оболочка.
\en The required shell. \~
\return \ru Возвращает код результата операции.
\en Returns operation result code. \~
\deprecated \ru Функция устарела, взамен использовать #RuledShell с набором параметров #MbRuledShellParams.
\en The function is deprecated, instead use #RuledShell with the parameter list #MbRuledShellParams. \~
\ingroup Shell_Modeling
*/
// ---
DEPRECATE_DECLARE_REPLACE( RuledShell with RuledShellParams )
MATH_FUNC (MbResultType) RuledShell( RuledSurfaceValues & pars,
const MbSNameMaker & operNames,
bool isPhantom,
MbSolid *& result );
//------------------------------------------------------------------------------
/** \brief \ru Построить линейчатое незамкнутое тело.
\en Create an open ruled solid. \~
@@ -455,81 +371,6 @@ MATH_FUNC (bool) CheckRuledParams( const MbCurve3D & curve,
bool isAscending );
//------------------------------------------------------------------------------
/** \brief \ru Построить тело соединения по двум кривым.
\en Create a joint solid from two curves. \~
\details \ru Построить незамкнутое тело соединения по двум кривым на поверхности. \n
\en Create an open joint solid from two curves on a surface. \n \~
\deprecated \ru Функция устарела, взамен использовать #JoinShell с набором параметров #MbJoinShellParams.
\en The function is deprecated, instead use #JoinShell with the parameter list #MbJoinShellParams. \~
\param[in] curve1 - \ru Первая поверхностная кривая.
\en The first curve on a surface. \~
\param[in] curve2 - \ru Вторая поверхностная кривая.
\en The second curve on a surface. \~
\param[in] parameters - \ru Параметры операции.
\en The operation parameters. \~
\param[in] operNames - \ru Именователь.
\en An object for naming the new objects. \~
\param[out] result - \ru Результирующая оболочка.
\en The required shell. \~
\return \ru Возвращает код результата операции.
\en Returns operation result code. \~
\ingroup Shell_Modeling
*/
//---
DEPRECATE_DECLARE_REPLACE( JoinShell with MbJoinShellParams )
MATH_FUNC (MbResultType) JoinShell( MbSurfaceCurve & curve1,
MbSurfaceCurve & curve2,
JoinSurfaceValues & parameters,
const MbSNameMaker & operNames,
MbSolid *& result );
//------------------------------------------------------------------------------
/** \brief \ru Построить тело соединения по двум множествам рёбер.
\en Create a joint solid from two sets of edges. \~
\details \ru Построить незамкнутое тело соединения по двум множествам ребер. \n
\en Create an open joint solid from two sets of edges. \n \~
\deprecated \ru Функция устарела, взамен использовать #JoinShell с набором параметров #MbJoinShellParams.
\en The function is deprecated, instead use #JoinShell with the parameter list #MbJoinShellParams. \~
\param[in] edges1 - \ru Первая группа ребер.
\en The first group of edges. \~
\param[in] orients1 - \ru Ориентации ребер в первой группе.
\en The edges senses in the first group. \~
\param[in] edges2 - \ru Вторая группа ребер.
\en The second group of edges. \~
\param[in] orients2 - \ru Ориентация ребер во второй группе.
\en The edges senses in the second group. \~
\param[in] matr1 - \ru Матрица преобразования первой группы ребер в единую систему координат.
\en The matrix of transformation of the first group of edges to the common coordinate system. \~
\param[in] matr2 - \ru Матрица преобразования второй группы ребер в единую систему координат.
\en The matrix of transformation of the second group of edges to the common coordinate system. \~
\param[in] parameters - \ru Параметры операции.
\en The operation parameters. \~
\param[in] operNames - \ru Именователь.
\en An object for naming the new objects. \~
\param[out] result - \ru Результирующая оболочка.
\en The required shell. \~
\param[in] isPhantom - \ru Режим фантома операции.
\en The operation phantom mode. \~
\return \ru Возвращает код результата операции.
\en Returns operation result code. \~
\ingroup Shell_Modeling
*/
//---
DEPRECATE_DECLARE_REPLACE( JoinShell with MbJoinShellParams )
MATH_FUNC (MbResultType) JoinShell( const RPArray<MbCurveEdge> & edges1,
const SArray<bool> & orients1,
const RPArray<MbCurveEdge> & edges2,
const SArray<bool> & orients2,
const MbMatrix3D & matr1,
const MbMatrix3D & matr2,
JoinSurfaceValues & parameters,
const MbSNameMaker & operNames,
MbSolid *& result,
bool isPhantom = false );
//------------------------------------------------------------------------------
/** \brief \ru Построить тело соединения по параметрам.
\en Create a joint solid from parameters. \~
@@ -548,36 +389,6 @@ MATH_FUNC (MbResultType) JoinShell( const MbJoinShellParams & parameters,
MbJoinShellResults & result );
//------------------------------------------------------------------------------
/** \brief \ru Разделить оболочку на части по заданному набору ребер.
\en Divide a shell into parts using a given set of edges. \~
\details \ru Разделить оболочку на части по заданному набору ребер. \n
\en Divide shell into parts using a given set of edges. \n \~
\param[in] solid - \ru Оболочка.
\en A shell. \~
\param[in] sameShell - \ru Режим копирования оболочки.
\en Whether to copy the shell. \~
\param[in] edges - \ru Набор ребер.
\en Set of edges. \~
\param[in] operNames - \ru Именователь.
\en An object for naming the new objects. \~
\param[out] result - \ru Результирующая оболочка.
\en The required shell. \~
\return \ru Возвращает код результата операции.
\en Returns operation result code. \~
\deprecated \ru Функция устарела, взамен использовать #DivideShell с набором параметров #MbDivideShellParams.
\en The function is deprecated, instead use #DivideShell with the parameter list #MbDivideShellParams. \~
\ingroup Shell_Modeling
*/
//---
DEPRECATE_DECLARE_REPLACE( DivideShell with MbDivideShellParams )
MATH_FUNC (MbResultType) DivideShell( MbSolid & solid,
MbeCopyMode sameShell,
const RPArray<MbCurveEdge> & edges,
const MbSNameMaker & operNames,
MbSolid *& result );
//------------------------------------------------------------------------------
/** \brief \ru Разделить оболочку на части по заданному набору ребер.
\en Divide a shell into parts using a given set of edges. \~
@@ -663,10 +474,10 @@ MATH_FUNC (bool) CheckJoinedParams( const MbCurve3D & curve,
\en Create a curve from a set of edges. \~
\details \ru Создать кривую для поверхности соединения по списку ребер. \n
\en Create a curve for a surface of the joint from a list of edges. \n \~
\param[in] edges - \ru Набор ребер.
\en A set of edges. \~
\param[in] orients - \ru Ориентации ребер.
\en Edges senses. \~
\param[in] edges - \ru Набор ребер (контейнер константных указателей на ребра).
\en A set of edges (container of constant pointers to edges). \~
\param[in] orients - \ru Ориентации ребер (контейнер булевых флагов).
\en Edges senses (boolean flags container). \~
\param[in] matr - \ru Матрица преобразования ребер.
\en Edges transformation matrix. \~
\param[out] res - \ru Результат операции.
@@ -680,46 +491,11 @@ MATH_FUNC (bool) CheckJoinedParams( const MbCurve3D & curve,
\ingroup Curve3D_Modeling
*/
//---
MATH_FUNC (MbCurve3D *) CreateJoinedCurve( const RPArray<MbCurveEdge> & edges,
const SArray<bool> & orients,
const MbMatrix3D & matr,
MbResultType & res );
//------------------------------------------------------------------------------
/** \brief \ru Построить тело сопряжения несвязанных граней.
\en Create a solid of two non-connected faces. \~
\details \ru Построить незамкнутое тело, состоящее из грани скругления между двумя несвязанными гранями. \n
\en Create an open solid that consists of a fillet face between two non-connected faces. \n \~
\param[in] solid1 - \ru Первое тело.
\en The first solid. \~
\param[in] face1 - \ru Сопрягаемая грань первого тела.
\en The first solid face to fillet. \~
\param[in] solid2 - \ru Второе тело.
\en The second solid. \~
\param[in] face2 - \ru Сопрягаемая грань второго тела.
\en The second solid face to fillet. \~
\param[in] params - \ru Параметры операции.
\en The operation parameters. \~
\param[in] names - \ru Именователь.
\en An object for naming the new objects. \~
\param[out] result - \ru Построенная оболочка (тело).
\en The resultant shell (solid). \~
\return \ru Возвращает код результата операции.
\en Returns operation result code. \~
\ingroup Shell_Modeling
\deprecated \ru Функция устарела, взамен использовать #FacesFillet с #MbFilletData.
\en The function is deprecated, use #FacesFillet with #MbFilletData instead. \~
*/
// ---
DEPRECATE_DECLARE_REPLACE( FacesFillet with MbFilletData )
MATH_FUNC (MbResultType) FacesFillet( const MbSolid & solid1,
const MbFace & face1,
const MbSolid & solid2,
const MbFace & face2,
const SmoothValues & params,
const MbSNameMaker & names,
MbSolid *& result );
template <typename ConstEdgeVector, typename OrientsVector>
MATH_FUNC (MbCurve3D *) CreateJoinedCurve( const ConstEdgeVector & edges,
const OrientsVector & orients,
const MbMatrix3D & matr,
MbResultType & res );
//------------------------------------------------------------------------------
@@ -736,7 +512,7 @@ MATH_FUNC (MbResultType) FacesFillet( const MbSolid & solid1,
\ingroup Shell_Modeling
*/
// ---
MATH_FUNC (MbResultType) FacesFillet( const MbFilletData & params,
MATH_FUNC (MbResultType) FacesFillet( const MbSectionData & params,
c3d::SolidSPtr & result );
@@ -765,9 +541,11 @@ MATH_FUNC (MbResultType) ElementaryShell( const MbSurface & surface,
/** \brief \ru Построить тело на базе поверхности.
\en Create a solid given a surface. \~
\details \ru Построить тело, состоящее из одной грани, на базе исходной поверхности.
Создаваемая грань использует переданную поверхность, не создавая ее копии.
Поверхность должна быть без самопересечений, с корректной ориентацией
ограничивающих кривых в случае поверхности MbCurveBoundedSurface. \n
\en Create a solid which consists of a face with the specified underlying surface.
The face uses the sent surface without creating a copy of it.
The surface should have no self-intersections,
the bounding curves should be correctly oriented in case of surface MbCurveBoundedSurface. \n \~
\param[in] surface - \ru Поверхность.
@@ -781,39 +559,33 @@ MATH_FUNC (MbResultType) ElementaryShell( const MbSurface & surface,
\ingroup Shell_Modeling
*/
// ---
// DEPRECATE_DECLARE_REPLACE( SurfaceShell with MbSurfaceShellParams )
MATH_FUNC (MbResultType) SurfaceShell( const MbSurface & surface,
const MbSNameMaker & names,
MbSolid *& result );
//------------------------------------------------------------------------------
/** \brief \ru Разрезать тело силуэтным контуром.
\en Cut a solid by a silhouette contour. \~
\details \ru Построить оболочки, полученные в результате разрезания тела его силуэтным контуром. \n
\en Create solids as a result of cutting a solids by its silhouette contour. \n \~
\param[in] solid - \ru Исходное тело.
\en The solid. \~
\param[in] sameShell - \ru Способ передачи данных при копировании оболочек.
\en Methods of transferring data while copying shells. \~
\param[in] eye - \ru Направление взгляда.
\en Eye's direction. \~
\param[in] operNames - \ru Именователь с версией.
\en An object defining the names with the version. \~
\param[out] outlineCurves - \ru Кривые, входящие в силуэтный контур.
- \en Curves of the silhouette contour. \~
\param[out] cutSolids - \ru Тела, полученные в результате применения операции.
- \en The resultant solids.\~
\return \ru Возвращает код результата операции.\~
/** \brief \ru Построить тело на базе поверхности.
\en Create a solid given a surface. \~
\details \ru Построить тело, состоящее из одной грани, на базе исходной поверхности.
Поверхность должна быть без самопересечений, с корректной ориентацией
ограничивающих кривых в случае поверхности MbCurveBoundedSurface. \n
\en Create a solid which consists of a face with the specified underlying surface.
The surface should have no self-intersections,
the bounding curves should be correctly oriented in case of surface MbCurveBoundedSurface. \n \~
\param[in] params - \ru Параметры построения оболочки по поверхности.
\en Parameters for creating the shell by a surface. \~
\param[out] result - \ru Построенная оболочка.
\en The resultant shell. \~
\return \ru Возвращает код результата операции.
\en Returns operation result code. \~
\ingroup Shell_Modeling
*/
// ---
DEPRECATE_DECLARE_REPLACE( CutShellSilhouetteContour with MbCutShellSilhouetteParams )
MATH_FUNC (MbResultType) CutShellSilhouetteContour( MbSolid & solid,
MbeCopyMode sameShell,
const MbVector3D & eye,
const MbSNameMaker & operNames,
c3d::SpaceCurvesSPtrVector & outlineCurves,
RPArray<MbSolid> & cutSolids );
MATH_FUNC (MbResultType) SurfaceShell( const MbSurfaceShellParams & params,
c3d::SolidSPtr & result );
//------------------------------------------------------------------------------
@@ -872,29 +644,6 @@ MATH_FUNC (MbResultType) LatheCurves( const MbLatheCurvesParams & params,
MbLatheCurvesResult & result );
//------------------------------------------------------------------------------
/** \brief \ru Определение оси токарного сечения и построение кривых сечения для тела.
\en Search for lathe axis and construction of lathe elements for the solid. \~
\details \ru Функция выполняет поиск токарной оси граней вращения и строит токарное сечение в некоторой плоскости. \n
\en The function searches for lathe axis of rotation faces and builds the curves of lathe-section in a plane. \n \~
\param[in] solid - \ru Тело. \en Solid. \~
\param[in] axis - \ru Ось токарного сечения может быть нуль). \en Lathe axis, may be null. \~
\param[in] angle - \ru Угол, управляющий построением перпендикулярных оси сечения отрезками, рекомендуется M_PI_4-M_PI. \en The angle, managing the construction of segments which perpendicular to the axis, recomended M_PI_4-M_PI. \~
\param[out] position - \ru Плоскость, в плоскости XY которой лежат кривые сечения, а ось X является осью токарного сечения. \en Plane position of section, axis X is a axis of section. \~
\param[out] curves - \ru Кривые токарного сечения располагаются в плоскости XY position. \en The curves of section located on plane XY of position. \~
\return \ru Возвращает код результата операции.
\en Returns operation result code. \~
\ingroup Shell_Modeling
*/
// ---
DEPRECATE_DECLARE_REPLACE( LatheCurves )
MATH_FUNC (MbResultType) LatheCurves( const MbSolid & solid,
const MbAxis3D * axis,
double angle,
MbPlacement3D & position,
RPArray<MbCurve> & curves );
//------------------------------------------------------------------------------
/** \brief \ru Построение следа кривой при её вращении вокруг оси токарного сечения.
\en Building of curves for lathe section for given curve. \~
@@ -965,52 +714,6 @@ MATH_FUNC (MbResultType) RectifyFace( const MbFace & face,
MbSolid *& result );
//------------------------------------------------------------------------------
/** \brief \ru Создать решетчатую оболочку.
\en Create a lattice shell. \~
\details \ru Создать решетчатую оболочку по трем управляющим точкам, параметрам решетки и количеству элементов. \n
\en Create a lattice shell on the three control points of the lattice parameters and the number of elements. \~
\deprecated \ru Функция устарела, взамен использовать #OctaLattice с набором параметров #MbOctaLatticeParams.
\en The function is deprecated, instead use #OctaLattice with the parameter list #MbOctaLatticeParams. \~
\param[in] point0 - \ru Точка, определяющая начало локальной системы координат поверхности.
\en The origin of the surface local coordinate system. \~
\param[in] point1 - \ru Точка, определяющая направление оси X локальной системы и размер элемента.
\en A point specifying the direction of X-axis of the local system and the size of element. \~
\param[in] point2 - \ru Точка, определяющая направление оси Y локальной системы.
\en A point specifying the direction of Y-axis of the local system. \~
\param[in] xRadius - \ru Шаг вдоль первой оси локальной системы координат.
\en The step along the first axis of the local coordinate system. \~
\param[in] yRadius - \ru Шаг вдоль второй оси локальной системы координат.
\en The step along the second axis of the local coordinate system. \~
\param[in] zRadius - \ru Шаг вдоль третьей оси локальной системы координат.
\en The step along the third axis of the local coordinate system. \~
\param[in] xCount - \ru Количество ячеек вдоль первой оси локальной системы координат.
\en The number of cells along a first axis of the local coordinate system. \~
\param[in] yCount - \ru Количество ячеек вдоль второй оси локальной системы координат.
\en The number of cells along a second axis of the local coordinate system. \~
\param[in] zCount - \ru Количество ячеек вдоль третьей оси локальной системы координат.
\en The number of cells along a third axis of the local coordinate system. \~
\param[out] result - \ru Построенное тело.
\en The constructed solid. \~
\result \ru Возвращает код результата операции.
\en Returns operation result code. \~
\ingroup Shell_Modeling
*/
// ---
DEPRECATE_DECLARE_REPLACE( OctaLattice with MbOctaLatticeParams )
MATH_FUNC (MbResultType) OctaLattice( const MbCartPoint3D & point0,
const MbCartPoint3D & point1,
const MbCartPoint3D & point2,
double xRadius,
double yRadius,
double zRadius,
size_t xCount,
size_t yCount,
size_t zCount,
const MbSNameMaker & names,
MbSolid *& result );
//------------------------------------------------------------------------------
/** \brief \ru Создать решетчатую оболочку.
\en Create a lattice shell. \~
@@ -1029,35 +732,6 @@ MATH_FUNC (MbResultType) OctaLattice( const MbOctaLatticeParams & params,
c3d::SolidSPtr & result );
//------------------------------------------------------------------------------
/** \brief \ru Построить оболочку на поверхности переменного сечения.
\en Create a shell on swept mutable section surface. \~
\details \ru Построить грань тела путём движения образующей кривой по направляющей кривой
и выполнить булеву операцию с оболочкой, если последняя задана. \n
Одновременно с построением оболочки функция создаёт её строитель.\n
\en Create a face of 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] solid - \ru Оболочка, к которой дополняется построение.
\en The shell the construction is complemented with respect to. \~
\param[in] sameShell - \ru Способ копирования граней оболочки.
\en The method of copying faces of shell. \~
\param[in] data - \ru Данные о поверхности переменного сечения.
\en Data about swept mutable section surface. \~
\param[out] result - \ru Построенная оболочка.
\en The constructed shell. \~
\result \ru Возвращает код результата операции.
\en Returns operation result code. \~
\ingroup Shell_Modeling
*/
// ---
DEPRECATE_DECLARE_REPLACE( SectionShell with 'MbSectionResults' argument )
MATH_FUNC( MbResultType ) SectionShell( const c3d::SolidSPtr & solid,
MbeCopyMode sameShell,
const MbSectionData & data,
c3d::SolidSPtr & result );
//------------------------------------------------------------------------------
/** \brief \ru Построить оболочку на поверхности переменного сечения.
\en Create a shell on swept mutable section surface. \~
@@ -1080,42 +754,12 @@ MATH_FUNC( MbResultType ) SectionShell( const c3d::SolidSPtr & solid,
\ingroup Shell_Modeling
*/
// ---
//DEPRECATE_DECLARE_REPLACE ( class MbFaceFilletMaker )
MATH_FUNC( MbResultType ) SectionShell( const c3d::SolidSPtr & solid,
MbeCopyMode sameShell,
const MbSectionData & data,
MbSectionResults & opResult );
//------------------------------------------------------------------------------
/** \brief \ru Построить оболочку на поверхности переменного сечения.
\en Create a shell on swept mutable section surface. \~
\details \ru Построить грань тела путём движения образующей кривой по направляющей кривой
и выполнить булеву операцию с оболочкой, если последняя задана. \n
Одновременно с построением оболочки функция создаёт её строитель.\n
\en Create a face of 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] solid - \ru Оболочка, к которой дополняется построение.
\en The shell the construction is complemented with respect to. \~
\param[in] sameShell - \ru Способ копирования граней оболочки.
\en The method of copying faces of shell. \~
\param[in] data - \ru Данные о поверхности переменного сечения.
\en Data about swept mutable section surface. \~
\param[in] operNames - \ru Именователь новой грани оболочки.
\en Generating face names. \~
\param[out] result - \ru Построенная оболочка.
\en The constructed shell. \~
\result \ru Возвращает код результата операции.
\en Returns operation result code. \~
\ingroup Shell_Modeling
*/
// ---
DEPRECATE_DECLARE_REPLACE( SectionShell with 'MbSectionResults' argument )
MATH_FUNC( MbResultType ) SectionShell( MbSolid * solid,
MbeCopyMode sameShell,
const MbSectionData & data,
const MbSNameMaker & operNames,
MbSolid *& result );
//------------------------------------------------------------------------------
/** \brief \ru Построить балочную модель с постоянным поперечным сечением на основе оболочки.
+26 -635
View File
@@ -41,73 +41,20 @@
#include <op_duplication_parameter.h>
class MATH_CLASS MbCurve;
class MATH_CLASS MbCurve3D;
class MATH_CLASS MbSurface;
class MATH_CLASS MbCurveEdge;
class MATH_CLASS MbFace;
class MATH_CLASS MbSolid;
class MATH_CLASS MbItem;
class MATH_CLASS MbSNameMaker;
class MATH_CLASS MbPartSolidIndices;
class MATH_CLASS MbSpine;
class MATH_CLASS MbMesh;
class MATH_CLASS MbGrid;
class MATH_CLASS MbCollection;
class MATH_CLASS IProgressIndicator;
//------------------------------------------------------------------------------
/** \brief \ru Создать элементарное тело.
\en Create an elementary solid. \~
\details \ru Создать одно из элементарных тел по заданным параметрам.\n
1. Создать одно из элементарных тел по заданным точкам и типу: \n
solidType = et_Sphere - шар (3 точки), \n
solidType = et_Torus - тор (3 точки), \n
solidType = et_Cylinder - цилиндр (3 точки), \n
solidType = et_Cone - конус (3 точки, если конус не усеченный),
(4 точки, если конус усеченный), \n
solidType = et_Block - блок (4 точки), \n
solidType = et_Wedge - клин (4 точки), \n
solidType = et_Prism - призма (количество вершин основания+1 точка), \n
solidType = et_Pyramid - пирамида (количество вершин основания+1 точка), \n
solidType = et_Plate - плита (4 точки),
solidType = et_Icosahedron - икосаэдр (3 точки), \n
solidType = et_Polyhedron - многогранник (3 точки), \n
solidType = et_Tetrapipe - тетра-труба (3 точки), \n
solidType = et_Octapipe - окта-труба (3 точки). \n
2. Создать тело по элементарной поверхности. \n
Допускается только тип поверхности - цилиндр, конус, сфера, тор. \n
\en Create one of the elementary solids according to the specified parameters.\n
1. Create one of elementary solids from the specified points and type: \n
solidType = et_Sphere - a sphere (3 points), \n
solidType = et_Torus - a torus (3 points), \n
solidType = et_Cylinder - a cylinder (3 points), \n
solidType = et_Cone - a cone (3 points), in the case of non-frustum cone,
(4 points), in the case of frustum cone, \n
solidType = et_Block - a block (4 points), \n
solidType = et_Wedge - a wedge (4 points), \n
solidType = et_Prism - a prism (points count is equal to the base vertices count + 1), \n
solidType = et_Pyramid - a pyramid (points count is equal to the base vertices count + 1), \n
solidType = et_Plate - a plate (4 points), \n
solidType = et_Icosahedron - an icosahedron (3 points), \n
solidType = et_Polyhedron - a polyhedron (3 points), \n
solidType = et_Tetrapipe - a tetra-pipe (3 points), \n
solidType = et_Octapipe - an octa-pipe (3 points). \n \~
2. Create a solid from an elementary surface. \n
The only acceptable surface types are cylinder, cone, sphere, torus. \~
\param[in] params - \ru Параметры операции.
\en Parameters of operation. ~
\param[out] result - \ru Построенное тело.
\en The resultant solid. \~
\return \ru Возвращает код результата операции.
\en Returns operation result code. \~
\ingroup Solid_Modeling
*/
// ---
DEPRECATE_DECLARE_REPLACE( ElementarySolid with 'MbElementarySolidResults' argument )
MATH_FUNC (MbResultType) ElementarySolid( const MbElementarySolidParams & params,
c3d::SolidSPtr & result );
class MbCurve;
class MbCurve3D;
class MbSurface;
class MbCurveEdge;
class MbFace;
class MbSolid;
class MbItem;
class MbSNameMaker;
class MbPartSolidIndices;
class MbSpine;
class MbMesh;
class MbGrid;
class MbCollection;
class IProgressIndicator;
//------------------------------------------------------------------------------
@@ -514,9 +461,18 @@ MATH_FUNC (MbResultType) ExtrusionSolid( const MbSweptData & sweptData
\param[in] axis - \ru Ось вращения.
\en Rotation axis. \~
\param[in, out] params - \ru Параметры вращения.
Возвращают информацию для построения элементов массива операций до поверхности.
Возвращают информацию для построения элементов массива операций до поверхности. \n
При построении операции вращения до конструктивной плоскости с вырожденной областью определения
оболочка будет построена до ближайшего пересечения с указанной плоскостью.
В случае, если плоскость имеет не вырожденные границы, часть плоскости, до которой будет построено вращение,
определяется по положению центра тяжести контура, ограничивающего плоскость, относительно проекции оси вращения на плоскость.
\en The revolution parameters.
Returns the information for construction of the up-to-surface operation array elements. \~
Returns the information for construction of the up-to-surface operation array elements. \n
When constructing a rotation operation to a constructive plane with a degenerate domain of definition
the shell will be constructed to the nearest intersection with the specified plane.
If the plane has non-degenerate boundaries, the part of the plane up to which the rotation will be constructed is
is selected according to the position of the center of gravity of the contour limiting the plane relative to the
projection of the axis of rotation onto the plane. \~
\param[in] operNames - \ru Именователь операции.
\en An object defining names generation in the operation. \~
\param[in] contoursNames - \ru Именователи сегментов образующего контура.
@@ -536,74 +492,6 @@ MATH_FUNC (MbResultType) RevolutionSolid( const MbSweptData & sweptDat
MbSolid *& result );
//------------------------------------------------------------------------------
/** \brief \ru Создать кинематическое тело.
\en Create a sweeping solid. \~
\details \ru Создать кинематическое тело путем движения образующей кривой вдоль направляющей кривой. \n
\en Create a sweeping solid by moving the generating curve along the guide curve. \n \~
\param[in] sweptData - \ru Данные об образующей.
\en The generating curve data. \~
\param[in] spine - \ru Направляющая кривая.
\en The spine curve. \~
\param[in] params - \ru Параметры операции.
\en The operation parameters. \~
\param[in] operNames - \ru Именователь операции.
\en An object defining names generation in the operation. \~
\param[in] contoursNames - \ru Именователь контуров образующей.
\en An object defining the names of generating curve contours. \~
\param[in] spineNames - \ru Именователь направляющей.
\en An object defining the name of a guide curve. \~
\param[out] result - \ru Построенная оболочка (тело).
\en The resultant shell (solid). \~
\return \ru Возвращает код результата операции.
\en Returns operation result code. \~
\ingroup Solid_Modeling
*/
// ---
DEPRECATE_DECLARE_REPLACE( EvolutionShell with 'MbEvolutionShellParams' argument )
MATH_FUNC (MbResultType) EvolutionSolid( const MbSweptData & sweptData,
const MbCurve3D & spine,
const EvolutionValues & params,
const MbSNameMaker & operNames,
const RPArray<MbSNameMaker> & contoursNames,
const MbSNameMaker & spineNames,
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] sweptData - \ru Данные об образующей.
\en The generating curve data. \~
\param[in] spine - \ru Направляющая кривая c дополнительной информацией.
\en The spine curve with additional data. \~
\param[in] params - \ru Параметры операции.
\en The operation parameters. \~
\param[in] operNames - \ru Именователь операции.
\en An object defining names generation in the operation. \~
\param[in] contoursNames - \ru Именователь контуров образующей.
\en An object defining the names of generating curve contours. \~
\param[in] spineNames - \ru Именователь направляющей.
\en An object defining the name of a guide curve. \~
\param[out] result - \ru Построенная оболочка (тело).
\en The resultant shell (solid). \~
\return \ru Возвращает код результата операции.
\en Returns operation result code. \~
\ingroup Solid_Modeling
*/
// ---
DEPRECATE_DECLARE_REPLACE( EvolutionShell with 'MbEvolutionShellParams' argument )
MATH_FUNC (MbResultType) EvolutionSolid( const MbSweptData & sweptData,
const MbSpine & spine,
const EvolutionValues & params,
const MbSNameMaker & operNames,
const RPArray<MbSNameMaker> & contoursNames,
const MbSNameMaker & spineNames,
MbSolid *& result );
//------------------------------------------------------------------------------
/** \brief \ru Создать кинематическое тело.
\en Create a sweeping solid. \~
@@ -640,129 +528,6 @@ MATH_FUNC( MbResultType ) LoftedSolid( const MbLoftedSolidParams & loftSolParams
c3d::SolidSPtr & result );
//------------------------------------------------------------------------------
/** \brief \ru Создать тело по плоским сечениям.
\en Create a solid from a planar sections. \~
\details \ru Создать тело по плоским сечениям c направляющей линией. \n
\en Create a solid from a planar sections with a guide curve. \n \~
\param[in] places - \ru Множество систем координат образующих контуров.
\en An array of generating contours coordinate systems. \~
\param[in] planeConours - \ru Множество образующих контуров.
\en An array of generating contours. \~
\param[in] spine - \ru Направляющая кривая (может быть nullptr).
\en A guide curve (can be nullptr). \~
\param[in] params - \ru Параметры операции.
\en The operation parameters. \~
\param[in] guidePoints - \ru Множество точек на образующих контурах, задающий их начальные точки.
\en A point array on the generating contours which determines the start points of the contours. \~
\param[in] operName - \ru Именователь операции.
\en An object defining names generation in the operation. \~
\param[in] contourNames - \ru Именователи образующих контуров.
\en The objects defining the names of generating contours. \~
\param[out] result - \ru Построенная оболочка (тело).
\en The resultant shell (solid). \~
\return \ru Возвращает код результата операции.
\en Returns operation result code. \~
\deprecated \ru Функция устарела, взамен использовать #LoftedSolid с набором параметров #MbLoftedSolidParams.
\en The function is deprecated, instead use #LoftedSolid with the parameter list #MbLoftedSolidParams. \~
\ingroup Solid_Modeling
*/
// ---
DEPRECATE_DECLARE_REPLACE( LoftedSolid with 'MbLoftedSolidParams' argument )
MATH_FUNC( MbResultType ) LoftedSolid( SArray<MbPlacement3D> & places,
RPArray<MbContour> & planeConours,
const MbCurve3D * spine,
const LoftedValues & params,
SArray<MbCartPoint3D> * guidePoints,
const MbSNameMaker & operName,
RPArray<MbSNameMaker> & contourNames,
MbSolid *& result );
//------------------------------------------------------------------------------
/** \brief \ru Создать тело по пространственным сечениям.
\en Create a solid from a space sections. \~
\details \ru Создать тело по пространственным сечениям c направляющей линией. \n
\en Create a solid from a space sections with a guide curve. \n \~
\param[in] places - \ru Множество систем координат образующих контуров.
\en An array of generating contours coordinate systems. \~
\param[in] planeConours - \ru Множество образующих контуров.
\en An array of generating contours. \~
\param[in] spine - \ru Осевая кривая (может быть nullptr).
\en A guide curve (can be nullptr). \~
\param[in] params - \ru Параметры операции.
\en The operation parameters. \~
\param[in] guideCurves - \ru Множество направляющих кривых, задающих траектории соответствующих точек контуров.
\en An array of the guide curves that determines the trajectories of the corresponding points of the contours. \~
\param[in] guidePoints - \ru Множество точек на образующих контурах, задающее соответствующие точки (цепочки точек).
\en A point array on the generating contours which determines the corresponding points of the contours (chains of points). \~
\param[in] operName - \ru Именователь операции.
\en An object defining names generation in the operation. \~
\param[in] contourNames - \ru Именователи образующих контуров.
\en The objects defining the names of generating contours. \~
\param[out] result - \ru Построенная оболочка (тело).
\en The resultant shell (solid). \~
\return \ru Возвращает код результата операции.
\en Returns operation result code. \~
\deprecated \ru Функция устарела, взамен использовать #LoftedSolid с набором параметров #MbLoftedSolidParams.
\en The function is deprecated, instead use #LoftedSolid with the parameter list #MbLoftedSolidParams. \~
\ingroup Solid_Modeling
*/
// ---
DEPRECATE_DECLARE_REPLACE( LoftedSolid with 'MbLoftedSolidParams' argument )
MATH_FUNC( MbResultType ) LoftedSolid( SArray<MbPlacement3D> & places,
RPArray<MbContour> & planeConours,
const MbCurve3D * spine, // осевая линия может быть nullptr
const LoftedValues & params,
RPArray<MbCurve3D> * guideCurves,
SArray<MbCartPoint3D> * guidePoints,
const MbSNameMaker & operName,
RPArray<MbSNameMaker> & contourNames,
MbSolid *& result );
//------------------------------------------------------------------------------
/** \brief \ru Создать тело по пространственным сечениям.
\en Create a solid from a space sections. \~
\details \ru Создать тело по пространственным сечениям c направляющей линией. \n
\en Create a solid from a space sections with a guide curve. \n \~
\param[in] surfaces - \ru Множество поверхностей образующих контуров.
\en An array of surfaces of generating contours. \~
\param[in] planeConours - \ru Множество образующих контуров.
\en An array of generating contours. \~
\param[in] spine - \ru Осевая кривая (может быть nullptr).
\en A guide curve (can be nullptr). \~
\param[in] params - \ru Параметры операции.
\en The operation parameters. \~
\param[in] guideCurves - \ru Множество направляющих кривых, задающих траектории соответствующих точек контуров.
\en An array of the guide curves that determines the trajectories of the corresponding points of the contours. \~
\param[in] guidePoints - \ru Множество точек на образующих контурах, задающее соответствующие точки (цепочки точек).
\en A point array on the generating contours which determines the corresponding points of the contours (chains of points). \~
\param[in] operName - \ru Именователь операции.
\en An object defining names generation in the operation. \~
\param[in] contourNames - \ru Именователи образующих контуров.
\en The objects defining the names of generating contours. \~
\param[out] result - \ru Построенная оболочка (тело).
\en The resultant shell (solid). \~
\return \ru Возвращает код результата операции.
\en Returns operation result code. \~
\deprecated \ru Функция устарела, взамен использовать #LoftedSolid с набором параметров #MbLoftedSolidParams.
\en The function is deprecated, instead use #LoftedSolid with the parameter list #MbLoftedSolidParams. \~
\ingroup Solid_Modeling
*/
// ---
DEPRECATE_DECLARE_REPLACE( LoftedSolid with 'MbLoftedSolidParams' argument )
MATH_FUNC( MbResultType ) LoftedSolid( RPArray<MbSurface> & surfaces,
RPArray<MbContour> & planeConours,
const MbCurve3D * spine, // осевая линия может быть nullptr
const LoftedValues & params,
RPArray<MbCurve3D> * guideCurves,
SArray<MbCartPoint3D> * guidePoints,
const MbSNameMaker & operName,
RPArray<MbSNameMaker> & contourNames,
MbSolid *& result );
//------------------------------------------------------------------------------
/** \brief \ru Создать тело выдавливания и выполнить булеву операцию.
\en Create an extrusion solid and perform a boolean operation. \~
@@ -921,57 +686,6 @@ MATH_FUNC (MbCurve3D *) TrimClosedSpine( const MbCurve3D & curve,
double t );
//------------------------------------------------------------------------------
/** \brief \ru Создать кинематическое тело и выполнить булеву операцию.
\en Create an evolution solid and perform a boolean operation. \~
\details \ru Создать кинематическое тело и выполнить булеву операцию типа oType с телом solid.
Принимаемые значения OperationType для тел: \n
bo_Union - объединение, \n
bo_Intersect - пересечение, \n
bo_Difference - вычитание.
\en Create an evolution solid and perform a boolean operation of type oType with solid 'solid'.
The possible values of 'OperationType' for solids: \n
bo_Union - union, \n
bo_Intersect - intersection, \n
bo_Difference - subtraction. \~
\param[in] solid - \ru Первое тело для булевой операции.
\en The first solid for a boolean operation. \~
\param[in] sameShell - \ru Режим копирования тела.
\en Whether to copy the solid. \~
\param[in] sweptData - \ru Данные об образующей.
\en The generating curve data. \~
\param[in] spine - \ru Направляющая кривая.
\en The spine curve. \~
\param[in] params - \ru Параметры кинематической операции.
\en Parameters of the sweeping operation. \~
\param[in] oType - \ru Тип булевой операции.
\en A boolean operation type. \~
\param[in] operNames - \ru Именователь.
\en An object for naming the new objects. \~
\param[in] contoursNames - \ru Именователь контуров образующей.
\en An object defining the names of generating curve contours. \~
\param[in] spineNames - \ru Именователь направляющей.
\en An object defining the name of a guide curve. \~
\param[out] result - \ru Построенное тело.
\en The resultant solid. \~
\return \ru Возвращает код результата операции.
\en Returns operation result code. \~
\ingroup Solid_Modeling
*/
// ---
DEPRECATE_DECLARE_REPLACE( EvolutionResult with 'MbEvolutionShellParams' argument )
MATH_FUNC(MbResultType) EvolutionResult( MbSolid & solid,
MbeCopyMode sameShell,
const MbSweptData & sweptData,
const MbCurve3D & spine,
const EvolutionValues & params,
OperationType oType,
const MbSNameMaker & operNames,
const RPArray<MbSNameMaker> & contoursNames,
const MbSNameMaker & spineNames,
MbSolid *& result );
//------------------------------------------------------------------------------
/** \brief \ru Создать кинематическое тело и выполнить булеву операцию.
\en Create an evolution solid and perform a boolean operation. \~
@@ -1039,121 +753,6 @@ MATH_FUNC( MbResultType ) LoftedResult( const c3d::SolidSPtr & srcSolid,
c3d::SolidSPtr & result );
//------------------------------------------------------------------------------
/** \brief \ru Создать тело по плоским сечениям и выполнить булеву операцию.
\en Create a solid from the planar sections and perform a boolean operation. \~
\details \ru Создать тело по плоским сечениям и выполнить булеву операцию типа oType с телом solid.
Принимаемые значения OperationType для тел: \n
bo_Union - объединение, \n
bo_Intersect - пересечение, \n
bo_Difference - вычитание.
\en Create a solid from a planar sections and perform a boolean operation of type oType with solid 'solid'.
The possible values of 'OperationType' for solids: \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] places - \ru Множество систем координат образующих контуров.
\en An array of generating contours coordinate systems. \~
\param[in] planeConours - \ru Множество образующих контуров.
\en An array of generating contours. \~
\param[in] spine - \ru Направляющая кривая (может быть nullptr).
\en A guide curve (can be nullptr). \~
\param[in] params - \ru Параметры операции.
\en The operation parameters. \~
\param[in] oType - \ru Тип булевой операции.
\en A boolean operation type. \~
\param[in] guidePoints - \ru Множество точек на образующих контурах, задающий их начальные точки.
\en A point array on the generating contours which determines the start points of the contours. \~
\param[in] operName - \ru Именователь операции.
\en An object defining names generation in the operation. \~
\param[in] contourNames - \ru Именователи образующих контуров.
\en The objects defining the names of generating contours. \~
\param[out] result - \ru Построенное тело.
\en The resultant solid. \~
\return \ru Возвращает код результата операции.
\en Returns operation result code. \~
\deprecated \ru Функция устарела, взамен использовать #LoftedResult с набором параметров #MbLoftedSolidParams.
\en The function is deprecated, instead use #LoftedResult with the parameter list #MbLoftedSolidParams. \~
\ingroup Solid_Modeling
*/
// ---
DEPRECATE_DECLARE_REPLACE( LoftedResult with 'MbLoftedSolidParams' argument )
MATH_FUNC( MbResultType ) LoftedResult( MbSolid & srcSolid,
MbeCopyMode copyMode,
SArray<MbPlacement3D> & places,
RPArray<MbContour> & planeConours,
const MbCurve3D * spine,
const LoftedValues & params,
OperationType oType,
SArray<MbCartPoint3D> * guidePoints,
const MbSNameMaker & operName,
RPArray<MbSNameMaker> & contourNames,
MbSolid *& result );
//------------------------------------------------------------------------------
/** \brief \ru Создать тело по пространственным сечениям и выполнить булеву операцию.
\en Create a solid from the space sections and perform a boolean operation. \~
\details \ru Создать тело по пространственным сечениям и выполнить булеву операцию типа oType с телом solid.
Принимаемые значения OperationType для тел: \n
bo_Union - объединение, \n
bo_Intersect - пересечение, \n
bo_Difference - вычитание.
\en Create a solid from a space sections and perform a boolean operation of type oType with solid 'solid'.
The possible values of 'OperationType' for solids: \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] surfaces - \ru Множество поверхностей контуров.
\en An array of generating contours surfaces. \~
\param[in] planeConours - \ru Множество образующих контуров.
\en An array of generating contours. \~
\param[in] spine - \ru Осевая кривая (может быть nullptr).
\en A guide curve (can be nullptr). \~
\param[in] params - \ru Параметры операции.
\en The operation parameters. \~
\param[in] oType - \ru Тип булевой операции.
\en A boolean operation type. \~
\param[in] guideCurves - \ru Массив направляющих кривых.
\en An array of the guide curves. \~
\param[in] guidePoints - \ru Множество точек на образующих контурах, задающий их начальные точки.
\en A point array on the generating contours which determines the start points of the contours. \~
\param[in] operName - \ru Именователь операции.
\en An object defining names generation in the operation. \~
\param[in] contourNames - \ru Именователи образующих контуров.
\en The objects defining the names of generating contours. \~
\param[out] result - \ru Построенное тело.
\en The resultant solid. \~
\return \ru Возвращает код результата операции.
\en Returns operation result code. \~
\deprecated \ru Функция устарела, взамен использовать #LoftedResult с набором параметров #MbLoftedSolidParams.
\en The function is deprecated, instead use #LoftedResult with the parameter list #MbLoftedSolidParams. \~
\ingroup Solid_Modeling
*/
// ---
DEPRECATE_DECLARE_REPLACE( LoftedResult with 'MbLoftedSolidParams' argument )
MATH_FUNC( MbResultType ) LoftedResult( MbSolid & srcSolid,
MbeCopyMode copyMode,
RPArray<MbSurface> & surfaces,
RPArray<MbContour> & planeConours,
const MbCurve3D * spine,
const LoftedValues & params,
OperationType oType,
RPArray<MbCurve3D> * guideCurves,
SArray<MbCartPoint3D> * guidePoints,
const MbSNameMaker & operName,
RPArray<MbSNameMaker> & contourNames,
MbSolid *& result );
//------------------------------------------------------------------------------
/** \brief \ru Выполнить булеву операцию.
\en Perform a Boolean operation. \~
@@ -1239,48 +838,6 @@ MATH_FUNC (MbResultType) SymmetrySolid( MbSolid & solid,
c3d::SolidSPtr & result );
//------------------------------------------------------------------------------
/** \brief \ru Создать тело с ребром жёсткости.
\en Create a solid with a rib. \~
\details \ru Создать тело с ребром жёсткости. \n
По заданному контуру функция строит ребро жёсткости и объединяет его с исходным телом.
Сегмент контура с указанным номером устанавливает вектор уклона. \n
\en Create a solid with a rib. \n
The function creates a rib from a given contour and unites it with the source solid.
The segment of the contour with the given number determines the slope vector. \n \~
\deprecated \ru Функция устарела, взамен использовать #RibSolid с набором параметров #MbRibSolidParameters.
\en The function is deprecated, instead use #RibSolid with the parameter list #MbRibSolidParameters. \~
\param[in] solid - \ru Исходное тело.
\en The source solid. \~
\param[in] sameShell - \ru Режим копирования входного тела.
\en Whether to copy the input solid. \~
\param[in] place - \ru Система координат образующего контура.
\en The generating contour coordinate system. \~
\param[in] contour - \ru Формообразующий контур на плоскости XY системы координат place.
\en The generating contour on XY-plane of coordinate system 'place'. \~
\param[in] index - \ru Номер сегмента в контуре.
\en The segment number in the contour. \~
\param[in] pars - \ru Параметры ребра жёсткости.
\en Parameters of a rib. \~
\param[in] names - \ru Именователь.
\en An object for naming the new objects. \~
\param[out] result - \ru Построенное тело.
\en The resultant solid. \~
\return \ru Возвращает код результата операции.
\en Returns operation result code. \~
\ingroup Solid_Modeling
*/ // ---
DEPRECATE_DECLARE_REPLACE( RibSolid with MbRibSolidParameters )
MATH_FUNC (MbResultType) RibSolid( MbSolid & solid,
MbeCopyMode sameShell,
const MbPlacement3D & place,
const MbContour & contour,
size_t index,
const RibValues & pars,
const MbSNameMaker & names,
MbSolid *& result );
//------------------------------------------------------------------------------
/** \brief \ru Создать тело с ребром жёсткости.
\en Create a solid with a rib. \~
@@ -1308,41 +865,6 @@ MATH_FUNC (MbResultType) RibSolid( MbSolid & solid,
c3d::SolidSPtr & result );
//------------------------------------------------------------------------------
/** \brief \ru Создать отдельное ребро жёсткости.
\en Create a separate rib. \~
\details \ru Создать отдельное ребро жёсткости для исходного тела без приклеивания. \n
\en Create a separate rib for source solid without gluing. \n \~
\deprecated \ru Функция устарела, взамен использовать #RibElement с набором параметров #MbRibSolidParameters.
\en The function is deprecated, instead use #RibElement with the parameter list #MbRibSolidParameters. \~
\param[in] solid - \ru Исходное тело.
\en The source solid. \~
\param[in] place - \ru Система координат образующего контура.
\en The generating contour coordinate system. \~
\param[in] contour - \ru Образующий контур.
\en The generating contour. \~
\param[in] index - \ru Номер сегмента в контуре.
\en The segment number in the contour. \~
\param[in] pars - \ru Параметры ребра жёсткости.
\en Parameters of a rib. \~
\param[in] names - \ru Именователь.
\en An object for naming the new objects. \~
\param[out] result - \ru Построенное тело.
\en The resultant solid. \~
\return \ru Возвращает код результата операции.
\en Returns operation result code. \~
\ingroup Solid_Modeling
*/ // ---
DEPRECATE_DECLARE_REPLACE( RibElement with MbRibSolidParameters )
MATH_FUNC (MbResultType) RibElement( const MbSolid & solid,
const MbPlacement3D & place,
MbContour & contour,
size_t index,
const RibValues & pars,
const MbSNameMaker & names,
MbSolid *& result );
//------------------------------------------------------------------------------
/** \brief \ru Создать отдельное ребро жёсткости.
\en Create a separate rib. \~
@@ -1656,71 +1178,6 @@ MATH_FUNC (MbResultType) SplitSolid( MbSolid & solid,
MbSolid *& result );
//------------------------------------------------------------------------------
/** \brief \ru Уклонить указанные грани тела.
\en Slope the specified faces of the solid. \~
\details \ru Уклонить указанные грани тела от нейтральной изоплоскости на заданный угол. \n
\en Slope the specified faces of the solid at the specified angle relative to the neutral isoplane. \n \~
\param[in] solid - \ru Исходное тело.
\en The source solid. \~
\param[in] sameShell - \ru Режим копирования входного тела.
\en Whether to copy the input solid. \~
\param[in] neutralPlace - \ru Нейтральная плоскость.
\en The neutral plane. \~
\param[in] angle - \ru Угол уклона.
\en The slope angle. \~
\param[in] faces - \ru Уклоняемые грани во входном теле.
\en The faces of input solid to be sloped. \~
\param[in] fp - \ru Признак захвата граней, гладко стыкующихся с уклоняемыми гранями.
\en Whether to capture the faces smoothly connected with the faces being sloped. \~
\param[in] reverse - \ru Флаг обратного направления уклона.
\en Whether to slope in the reverse direction. \~
\param[in] names - \ru Именователь.
\en An object for naming the new objects. \~
\param[out] result - \ru Построенное тело.
\en The resultant solid. \~
\return \ru Возвращает код результата операции.
\en Returns operation result code. \~
\ingroup Solid_Modeling
*/
// ---
DEPRECATE_DECLARE_REPLACE( DraftSolid with 'MbDraftSolidParams' argument )
MATH_FUNC (MbResultType) DraftSolid( MbSolid & solid,
MbeCopyMode sameShell,
const MbPlacement3D & neutralPlace,
double angle,
const RPArray<MbFace> & faces,
MbeFacePropagation fp,
bool reverse,
const MbSNameMaker & names,
MbSolid *& result );
//------------------------------------------------------------------------------
/** \brief \ru Уклонить указанные грани тела.
\en Slope the specified faces of the solid. \~
\details \ru Уклонить указанные грани тела от нейтральной изоплоскости или нейтральных ребер на заданный угол. \n
\en Slope the specified faces of the solid at the specified angle relative to the neutral isoplane or neutral edges. \n \~
\param[in] solid - \ru Исходное тело.
\en The source solid. \~
\param[in] sameShell - \ru Режим копирования входного тела.
\en Whether to copy the input solid. \~
\param[in] draftParams - \ru Параметры уклона.
\en Draft parameters. \~
\param[out] result - \ru Построенное тело.
\en The resultant solid. \~
\return \ru Возвращает код результата операции.
\en Returns operation result code. \~
\ingroup Solid_Modeling
*/
// ---
DEPRECATE_DECLARE_REPLACE( DraftSolid with 'MbDraftSolidResult' argument )
MATH_FUNC (MbResultType) DraftSolid( MbSolid & solid,
MbeCopyMode sameShell,
const MbDraftSolidParams & draftParams,
c3d::SolidSPtr & result );
//------------------------------------------------------------------------------
/** \brief \ru Уклонить указанные грани тела.
\en Slope the specified faces of the solid. \~
@@ -2206,7 +1663,7 @@ MATH_FUNC (MbResultType) ThinSolid( const MbSurface & surface,
//------------------------------------------------------------------------------
/** \brief \ru Создать отверстие, карман, фигурный паз в теле.
\en Create a hole, a pocket, a groove in the solid. \~
\details \ru Cоздать отверстие, карман, фигурный паз в теле или создать cверло, бобышку, если solid==nullptr. \n
\details \ru Создать отверстие, карман, фигурный паз в теле или создать сверло, бобышку, если solid==nullptr. \n
\en Create a hole, a pocket, a groove in the solid or create a drill, a boss if 'solid' == nullptr. \n \~
\param[in] solid - \ru Исходное тело.
\en The source solid. \~
@@ -2227,41 +1684,6 @@ MATH_FUNC (MbResultType) HoleSolid( const c3d::SolidSPtr & solid,
c3d::SolidSPtr & result );
//------------------------------------------------------------------------------
/** \brief \ru Выделить в отдельное тело указанную часть распадающегося на части тела.
\en Extract the specified part of decomposing solid to a separate solid. \~
\details \ru Создать тело, из указанной части тела, распадающегося на части.
Исходное тело должно состоять из отдельных частей. \n
\en Create a solid from the specified part of decomposing solid.
The source solid should consist of separate parts. \n \~
\deprecated \ru Функция устарела, взамен использовать #ShellPart с набором параметров #MbShellPartParams.
\en The function is deprecated, instead use #ShellPart with the parameter list #MbShellPartParams. \~
\param[in] solid - \ru Разделяемое на части тело.
\en A decomposing solid. \~
\param[in] id - \ru Номер выбранной части тела
\en The number of selected part of the solid. \~
\param[in] path - \ru Идентификатор для выбранной части.
\en An identifier for the selected part. \~
\param[in] names - \ru Именователь.
\en An object for naming the new objects. \~
\param[in,out] partIndices - \ru Индексы частей тела.
\en Indices of the parts of the solid. \~
\param[out] result - \ru Построенная оболочка (тело).
\en The resultant shell (solid). \~
\return \ru Возвращает код результата операции.
\en Returns operation result code. \~
\ingroup Solid_Modeling
*/
// ---
DEPRECATE_DECLARE_REPLACE( ShellPart with MbShellPartParams )
MATH_FUNC (MbResultType) ShellPart( const MbSolid & solid,
size_t id,
const MbPath & path,
const MbSNameMaker & names,
MbPartSolidIndices & partIndices,
MbSolid *& result );
//------------------------------------------------------------------------------
/** \brief \ru Выделить в отдельное тело указанную часть тела.
\en Extract the specified part of a decomposing solid. \~
@@ -2306,37 +1728,6 @@ MATH_FUNC (MbResultType) DuplicationSolid( const MbSolid & soli
c3d::SolidSPtr & result );
//------------------------------------------------------------------------------
/** \brief \ru Создать одно тело слиток из присланных объектов.
\en Create an ingot solid from the specified objects. \~
\details \ru Создать одно тело слиток из присланных объектов. \n
Среди присланных объектов используются тела, вставки тел и сборки тел, из которых строится одно тело,
которое по внешности совпадает с присланными телами и служит их упрощенным заменителем по внешним параметрам. \n
\en Create an ingot solid from the specified solids without the modification of the given solids. \n
Among the objects sent using the body, insert bodies and assembling bodies of which is built the same body,
which in appearance coincides with the bodies had been sent and serves as a substitute for their simplistic external parameters. \n \~
\deprecated \ru Метод устарел. Взамен использовать #IngotSolid с набором параметров #MbIngotSolidParams.
\en The method is deprecated. Use instead #IngotSolid with the parameters #MbIngotSolidParams.\~
\param[in] solids - \ru Множество тел.
\en An array of solids. \~
\param[in] names - \ru Именователь.
\en An object for naming the new objects. \~
\param[in] makeCopy - \ru Флаг копирования тел перед использованием: true - копировать, false - не копировать.
\en The flag of the copying solid before using: true - copy solid, false - not copy. \~
\param[out] result - \ru Построенное тело.
\en The resultant solid. \~
\return \ru Возвращает код результата операции.
\en Returns operation result code. \~
\ingroup Solid_Modeling
*/
// ---
DEPRECATE_DECLARE_REPLACE(IngotSolid with MbIngotSolidParams)
MATH_FUNC (MbResultType) IngotSolid( RPArray<MbItem> & solids,
bool makeCopy,
const MbSNameMaker & names,
MbSolid *& ingotResult );
//------------------------------------------------------------------------------
/** \brief \ru Создать тело-слиток из присланных объектов.
\en Create an ingot solid from the specified objects. \~
+9 -9
View File
@@ -22,13 +22,13 @@
#include <vector>
class MATH_CLASS MbCurve;
class MATH_CLASS MbCurve3D;
class MATH_CLASS MbSolid;
class MATH_CLASS MbSurfaceCurve;
class MATH_CLASS MbFunction;
class MATH_CLASS MbGrid;
class MATH_CLASS MbRegion;
class MbCurve;
class MbCurve3D;
class MbSolid;
class MbSurfaceCurve;
class MbFunction;
class MbGrid;
class MbRegion;
//------------------------------------------------------------------------------
@@ -89,7 +89,7 @@ MATH_FUNC (MbResultType) ElementarySurface( const MbCartPoint3D & point0,
\en Splines degree by U. \~
\param[in] vDegree - \ru Порядок сплайнов по V.
\en Splines degree by V. \~
\param[out] result - \ru Cплайновая поверхность.
\param[out] result - \ru Сплайновая поверхность.
\en The spline surface. \~
\result \ru Возвращает код результата операции.
\en Returns operation result code. \~
@@ -138,7 +138,7 @@ MATH_FUNC (MbResultType) SplineSurface( const MbCartPoint3D & pUMinVMin,
\en A knot vector by V. \~
\param[in] vClosed - \ru Замкнутость по V.
\en Closedness by V. \~
\param[out] result - \ru Cплайновая поверхность.
\param[out] result - \ru Сплайновая поверхность.
\en The spline surface. \~
\result \ru Возвращает код результата операции.
\en Returns operation result code. \~
+16 -93
View File
@@ -22,24 +22,23 @@
#include <mb_vector3d.h>
#include <space_item.h>
#include <wire_frame.h>
#include <mb_nurbs_function.h>
#include <mb_point_mating.h>
#include <mb_operation_result.h>
#include <op_curve_parameter.h>
class MATH_CLASS MbAxis3D;
class MATH_CLASS MbPlacement3D;
class MATH_CLASS MbCurve;
class MATH_CLASS MbCurve3D;
class MATH_CLASS MbContour3D;
class MATH_CLASS MbSurfaceCurve;
class MATH_CLASS MbSurface;
class MATH_CLASS MbElementarySurface;
class MATH_CLASS MbFace;
class MATH_CLASS MbSolid;
class MATH_CLASS MbWireFrame;
class MATH_CLASS MbSNameMaker;
class MbAxis3D;
class MbPlacement3D;
class MbCurve;
class MbCurve3D;
class MbContour3D;
class MbSurfaceCurve;
class MbSurface;
class MbElementarySurface;
class MbFace;
class MbSolid;
class MbWireFrame;
class MbSNameMaker;
//------------------------------------------------------------------------------
@@ -175,6 +174,7 @@ MATH_FUNC (MbResultType) OffsetCurve( const MbCurve3D & curve,
\ingroup Curve3D_Modeling
*/
// ---
//DEPRECATE_DECLARE_REPLACE ( ProjectionWireFrame with MbProjectionWireFrameParams and MbProjectionWireFrameResults )
MATH_FUNC (MbResultType) CurveProjection( const MbSurface & surface,
const MbCurve3D & curve,
MbVector3D * direction,
@@ -208,6 +208,7 @@ MATH_FUNC (MbResultType) CurveProjection( const MbSurface & surface,
\ingroup Curve3D_Modeling
*/
// ---
//DEPRECATE_DECLARE_REPLACE ( ProjectionWireFrame with MbProjectionWireFrameParams and MbProjectionWireFrameResults )
MATH_FUNC (MbResultType) CurveProjection( const MbSurface & surface,
const MbCurve3D & curve,
MbVector3D * direction,
@@ -275,6 +276,7 @@ MATH_FUNC (MbResultType) CurveByTwoProjections( const MbPlacement3D & place
\ingroup Curve3D_Modeling
*/
//---
//DEPRECATE_DECLARE_REPLACE ( ProjectionWireFrame with MbProjectionWireFrameParams and MbProjectionWireFrameResults )
MATH_FUNC (MbResultType) ProjectionCurve( const MbCurve3D & curve,
const RPArray<MbFace> & faces,
const MbVector3D * dir,
@@ -319,6 +321,7 @@ MATH_FUNC (MbResultType) ProjectionCurve( const MbCurve3D & curve,
\ingroup Curve3D_Modeling
*/
//---
//DEPRECATE_DECLARE_REPLACE ( ProjectionWireFrame with MbProjectionWireFrameParams and MbProjectionWireFrameResults )
MATH_FUNC (MbResultType) ProjectionCurve( const MbWireFrame & wireFrame,
const bool sameWireFrame,
const MbSolid & solid,
@@ -1208,86 +1211,6 @@ MATH_FUNC (MbResultType) CreateContourFillets( const MbContour3D & contour,
const MbeConnectingType type );
//-------------------------------------------------------------------------------
/** \brief \ru Построить кривые, оборачивающие поверхность.
\en Construct curves that wrap the surface. \~
\details \ru Построить кривые, оборачивающие поверхность. \n
\en Construction of curves that wrap the surface. \n \~
\param[in] parameters - \ru Параметры #MbCurvesWrappingParams для переноса копий двумерных кривых на другой носитель.
\en Parameters #MbCurvesWrappingParams for transferring copies of two-dimensional curves on another medium. \~
\param[out] surfaceCurves - \ru Построенные 2д-кривые.
\en Constructed 2d-curves. \~
\return \ru Возвращает код результата операции.
\en Returns operation result code. \~
\ingroup Curve3D_Modeling
\deprecated \ru Метод устарел. \en The method is deprecated. \~
*/
// ---
DEPRECATE_DECLARE_REPLACE( WrapCurve with MbCurvesWrappingResults )
MATH_FUNC (MbResultType) CurvesWrapping( const MbCurvesWrappingParams & parameters,
c3d::PlaneCurvesSPtrVector & surfaceCurves );
//-------------------------------------------------------------------------------
/** \brief \ru Построить кривые, оборачивающие поверхность.
\en Construct curves that wrap the surface. \~
\details \ru Построить кривые, оборачивающие поверхность. \n
\en Construction of curves that wrap the surface. \n \~
\param[in] parameters - \ru Параметры #MbCurvesWrappingParams для переноса копий двумерных кривых на другой носитель.
\en Parameters #MbCurvesWrappingParams for transferring copies of two-dimensional curves on another medium. \~
\param[out] resultCurves - \ru Построенные 3д-кривые на присланной поверхности.
\en Constructed 3d-curves based on the input surface. \~
\return \ru Возвращает код результата операции.
\en Returns operation result code. \~
\ingroup Curve3D_Modeling
\deprecated \ru Метод устарел. \en The method is deprecated. \~
*/
// ---
DEPRECATE_DECLARE_REPLACE( WrapCurve with MbCurvesWrappingResults )
MATH_FUNC (MbResultType) CurvesWrapping( const MbCurvesWrappingParams & parameters,
c3d::SpaceCurvesSPtrVector & resultCurves );
//-------------------------------------------------------------------------------
/** \brief \ru Построить развертку кривой/контура на плоскость.
\en Construct a unwrapping curve/contour. \~
\details \ru Построение развертки кривой/контура на плоскость. \n
\en Construction unwrapping of the curve/contour on a plane. \n \~
\param[in] params - \ru Параметры разворачивания #MbCurvesWrappingParams.
\en Unwrapping parameters #MbCurvesWrappingParams. \~
\param[in] resultCurves - \ru Развёрнутые 2д-кривые.
\en Unwrapped 2d-curves. \~
\return \ru Возвращает код результата операции.
\en Returns operation result code. \~
\ingroup Curve3D_Modeling
\deprecated \ru Метод устарел. \en The method is deprecated. \~
*/
// ---
DEPRECATE_DECLARE_REPLACE( UnwrapCurve with MbCurvesWrappingResults )
MATH_FUNC (MbResultType) CurvesUnwrapping( const MbCurvesWrappingParams & params,
c3d::PlaneCurvesSPtrVector & surfaceCurves );
//-------------------------------------------------------------------------------
/** \brief \ru Построить развертку кривой/контура на плоскость.
\en Construct a unwrapping curve/contour. \~
\details \ru Построение развертки кривой/контура на плоскость. \n
\en Construction unwrapping of the curve/contour on a plane. \n \~
\param[in] params - \ru Параметры разворачивания #MbCurvesWrappingParams.
\en Unwrapping parameters #MbCurvesWrappingParams. \~
\param[in] resultCurves - \ru Развёрнутые 3д-кривые на присланной плоскости.
\en Unwrapped 3d-curves on the input plane. \~
\return \ru Возвращает код результата операции.
\en Returns operation result code. \~
\ingroup Curve3D_Modeling
\deprecated \ru Метод устарел. \en The method is deprecated. \~
*/
// ---
DEPRECATE_DECLARE_REPLACE( UnwrapCurve with MbCurvesWrappingResults )
MATH_FUNC (MbResultType) CurvesUnwrapping( const MbCurvesWrappingParams & parameters,
c3d::SpaceCurvesSPtrVector & resultCurves );
//------------------------------------------------------------------------------
/** \brief \ru Создать кривую или контур на поверхности грани по заданным рёбрам.
\en Construct a curve or contour on the surface of a face along the specified edges. \~
+125 -5
View File
@@ -11,13 +11,17 @@
#include <wire_frame.h>
#include <wireframe_point.h>
class MATH_CLASS MbWireFrameFilletsParams;
class MATH_CLASS MbNurbsWireFrameParams;
class MATH_CLASS MbTrimmedWireFrameParams;
class MATH_CLASS MbWireFrameProjParams;
class MATH_CLASS MbWireFrameProjResult;
class MbWireFrameFilletsParams;
class MbNurbsWireFrameParams;
class MbTrimmedWireFrameParams;
class MbWireFrameProjParams;
class MbWireFrameProjResult;
class MbOffsetWireFrameParams;
class MbProjectionWireFrameParams;
class MbProjectionWireFrameResults;
//------------------------------------------------------------------------------
/** \brief \ru Создать скругленный каркас.
@@ -128,4 +132,120 @@ MATH_FUNC( MbResultType ) NearPointProjection( const MbWireFrame & wir
MbWireFrameProjResult & result );
//------------------------------------------------------------------------------
/** \brief \ru Найти точки пересечения двух проволочных каркасов.
\en Calculate intersection points of two wire frames. \~
\details \ru Найти параметры точек пересечения двух проволочных каркасов. \n
\en Calculate the parameters of intersection points of two wireframes. \n \~
\param[in] wireFrame1 - \ru Первый каркас.
\en The first wireframe. \~
\param[in] wireFrame2 - \ru Второй каркас.
\en The second wireframe. \~
\param[in] eps - \ru Возможная максимальная погрешность найденных пересечений.
\en The intersection tolerance. \~
\param[out] result - \ru Пары точек пересечения каркасов.
\en The intersection pairs of wire frames. \~
\return \ru Возвращает код результата операции.
\en Returns the code of the operation result.
\ingroup WireFrame_Modeling
*/
// ---
MATH_FUNC( MbResultType ) WireFramesIntersect( const MbWireFrame & wireFrame1,
const MbWireFrame & wireFrame2,
double eps,
c3d::WireFramePointsPairsVector & result );
//------------------------------------------------------------------------------
/** \brief \ru Найти точки пересечения двух ребер с учетом толерантности вершин.
\en Calculate intersection points of two edges, taking into account the tolerance of the vertices. \~
\details \ru Найти точки пересечения двух ребер с учетом толерантности вершин. \n
\en Calculate intersection points of two edges, taking into account the tolerance of the vertices. \n \~
\param[in] edge1 - \ru Первое ребро.
\en The first edge. \~
\param[in] edge2 - \ru Второе ребро.
\en The second edge. \~
\param[in] eps - \ru Возможная максимальная погрешность найденных пересечений кривых, лежащих под ребрами.
\en The intersection tolerance of edge's curves. \~
\param[out] result - \ru Пары точек пересечения ребер c учетом толерантности вершин.
\en The intersection points of two edges, taking into account the tolerance of the vertices. \~
\return \ru Возвращает количество точек пересечения.
\en Returns the number of intersection points.
\ingroup WireFrame_Modeling
*/
// ---
MATH_FUNC( size_t ) EdgesIntersect( const MbEdge & edge1,
const MbEdge & edge2,
double eps,
c3d::EdgePointsPairsVector & result );
//------------------------------------------------------------------------------
/** \brief \ru Продлить каркас.
\en Extend the wire frame. \~
\details \ru Продлить каркас в соответствии с параметрами. \n
\en Extend the wire frame according to the parameters. \~ \n
\param[in] wireframe - \ru Исходный (продлеваемый) каркас.
\en Source (extended) wire frame. \~
\param[in] sameEdges - \ru Режим копирования входного каркаса.
\en Whether to copy the input wire frame. \~
\param[in] params - \ru Параметры продления.
\en Parameters of extension. \~
\param[out] result - \ru Результирующий каркас.
\en Result wire frame. \~
\return \ru Возвращает код результата операции. В случае успеха всегда вернется ненулевой каркас (возможно, он будет совпадать с исходным каркасом).
\en Returns the code of the operation result. In case of success, the result wire frame cannot be nullptr (it will be possibly the same as the source one).
\ingroup Curve3D_Modeling
*/
// ---
MATH_FUNC( MbResultType ) ExtendWireFrame( c3d::WireFrameSPtr & wireframe,
MbeCopyMode sameEdges,
const MbCurveExtensionParameters3D & params,
c3d::WireFrameSPtr & result );
//------------------------------------------------------------------------------
/** \brief \ru Создать эквидистантный каркас.
\en Create an offset wire frame. \~
\details \ru Создать эквидистантный каркас смещением базового каркаса.
\en Create an offset wire frame by shifting the base wire frame. \~
\param[in] wireFrame - \ru Исходный каркас.
\en The initial wire frame. \~
\param[in] sameWire - \ru Режим копирования входного каркаса.
\en Whether to copy the input wire frame. \~
\param[in] params - \ru Параметры операции.
\en Operation parameters. \~
\param[out] result - \ru Эквидистантный каркас.
\en The offset wire frame. \~
\return \ru Возвращает код результата операции.
\en Returns operation result code. \~
\ingroup WireFrame_Modeling
*/
// ---
MATH_FUNC( MbResultType ) CreateOffsetWireFrame( c3d::WireFrameSPtr & wireFrame,
MbeCopyMode sameWire,
const MbOffsetWireFrameParams & params,
c3d::WireFrameSPtr & result );
//------------------------------------------------------------------------------
/** \brief \ru Операция построения проекционного проволочного каркаса.
\en Create a projection wireframe. \~
\details \ru Операция построения проекции набора кривых по нормали или по
направлению на тело, набор граней или поверхность. \n
\en Create a normal or vector projection of a set of curves to
a solid, set of faces or a surface. \n \~
\param[in] params - \ru Параметры операции.
\en Operation parameters. \~
\param[out] results - \ru Результаты операции.
\en Operation results. \~
\return \ru Возвращает код результата операции.
\en Returns operation result code. \~
\ingroup WireFrame_Modeling
\warning \ru В разработке.
\en Under development. \~
*/
// ---
MATH_FUNC (MbResultType) ProjectionWireFrame( const MbProjectionWireFrameParams & params,
MbProjectionWireFrameResults & results );
#endif // __ACTION_WIREFRAME_H
+5 -51
View File
@@ -23,8 +23,8 @@
#include <vector>
class MATH_CLASS MbCurve3D;
class MATH_CLASS MbMatrix3D;
class MbCurve3D;
class MbMatrix3D;
namespace c3d // namespace C3D
{
@@ -267,7 +267,7 @@ bool ArFind( const ParamsVector & arParam, double t, ptrdiff_t & id )
if ( arParam[idLeft] >= t ) { // \ru Если локальная левая не левая \en If the local left bound is not the left
idRight = idLeft; // \ru Установить новую правую \en Set new right bound
idLeft = 0; // \ru Установить левую минимальной \en Set the left bound to minimum
rangeId = idLeft; // \ru Вычислить новый диапазон \en Calculate the new range
rangeId = idRight - idLeft; // \ru Вычислить новый диапазон \en Calculate the new range
}
}
}
@@ -581,55 +581,9 @@ bool ArePointsOnLine( const PointsVector & pnts, double metricEps = METRIC_EPSIL
\en True if points lie on plane, \n otherwise false. \~
\ingroup Base_Algorithms
*/ // ---
template <class SpacePointsVector>
bool IsPlanar( const SpacePointsVector & pnts, MbPlacement3D * place, double mEps = METRIC_EPSILON )
{
bool isPlanar = false;
mEps = ::fabs( mEps );
const size_t pntsCnt = pnts.size();
template <class SpacePoints>
MATH_FUNC (bool) IsPlanar( const SpacePoints & pnts, MbPlacement3D * place, double mEps = METRIC_EPSILON );
if ( pntsCnt > 2 ) {
MbCartPoint3D pnt0( pnts[0] ), pnt_i, pnt_j;
MbVector3D vx, vy;
bool noPlace = true;
for ( size_t i = 1; i < pntsCnt && noPlace; i++ ) {
pnt_i = pnts[i];
if ( !c3d::EqualPoints( pnt_i, pnt0, mEps ) ) {
for ( size_t j = 1; j < pntsCnt && noPlace; j++ ) {
pnt_j = pnts[j];
if ( !c3d::EqualPoints( pnt_j, pnt0, mEps ) && !c3d::EqualPoints( pnt_j, pnt_i, mEps ) ) {
vx.Init( pnt0, pnt_i );
vy.Init( pnt0, pnt_j );
if ( !vx.Colinear( vy ) )
noPlace = false;
}
}
}
}
if ( !noPlace ) {
isPlanar = true;
MbPlacement3D wrkPlace( vx, vy, pnt0 );
if ( pntsCnt > 3 ) {
MbCartPoint3D pnt;
for ( size_t k = 1; k < pntsCnt; k++ ) {
pnt = pnts[k];
wrkPlace.PointProjection( pnt, pnt0 );
if ( !c3d::EqualPoints( pnt, pnt0, mEps ) ) {
isPlanar = false;
break;
}
}
}
if ( isPlanar && place != nullptr )
place->Init( wrkPlace );
}
}
return isPlanar;
}
//------------------------------------------------------------------------------
+3 -3
View File
@@ -15,9 +15,9 @@
#include <alg_curve_distance.h>
class MATH_CLASS MbCurve;
class MATH_CLASS MbLine;
class MATH_CLASS MbArc;
class MbCurve;
class MbLine;
class MbArc;
//------------------------------------------------------------------------------
+5 -5
View File
@@ -16,11 +16,11 @@
#include <templ_s_array.h>
class MATH_CLASS MbCurve;
class MATH_CLASS MbLineSegment;
class MATH_CLASS MbArc;
class MATH_CLASS MbLine;
class MATH_CLASS MbTempCircle;
class MbCurve;
class MbLineSegment;
class MbArc;
class MbLine;
class MbTempCircle;
//------------------------------------------------------------------------------
+14 -3
View File
@@ -13,9 +13,9 @@
#include <curve.h>
class MATH_CLASS MbLineSegment;
class MATH_CLASS MbArc;
class MATH_CLASS MbContour;
class MbLineSegment;
class MbArc;
class MbContour;
//------------------------------------------------------------------------------
@@ -189,4 +189,15 @@ MATH_FUNC (bool) Corner( MbCurve * crv1, MbCurve * crv2,
const MbCartPoint & p1, const MbCartPoint & p2 );
//------------------------------------------------------------------------------
// Скругление двух последовательных кривых curve1 и curve2 радиусом rad.
// Предполагается, что конец кривой curve1 совпадает с началом кривой curve2.
// ---
MbArc * FilletTwoCurves( const MbCurve & curve1,
const MbCurve & curve2,
double rad,
double & tCross1, // параметр, соответствующий точке касания curve1 и дуги окружности
double & tCross2 ); // параметр, соответствующий точке касания curve2 и дуги окружности
#endif // __ALG_CURVE_FILLET_H
+7 -7
View File
@@ -22,12 +22,12 @@
#include <surface.h>
class MATH_CLASS MbCartPoint3D;
class MATH_CLASS MbVector3D;
class MATH_CLASS MbPlacement3D;
class MATH_CLASS MbAxis3D;
class MATH_CLASS MbPlaneCurve;
class MATH_CLASS IProgressIndicator;
class MbCartPoint3D;
class MbVector3D;
class MbPlacement3D;
class MbAxis3D;
class MbPlaneCurve;
class IProgressIndicator;
////////////////////////////////////////////////////////////////////////////////
@@ -1004,7 +1004,7 @@ public:
public:
/// \ru Установить внешний индикатор прогресса выполнения. \en Set external progress indicator.
void SetProgressIndicator( IProgressIndicator * prog ) { progress = prog; }
/// \ru Установить внешний индикатор прогресса выполнения. \en Set external progress indicator.
/// \ru Взять внешний индикатор прогресса выполнения. \en Take external progress indicator.
IProgressIndicator * TakeProgressIndicator() const { return progress; }
OBVIOUS_PRIVATE_COPY( MbMinMaxGridDistancesParams )
+37 -30
View File
@@ -50,36 +50,36 @@
#define TRGB_SHOW TRGB_BLACK // \ru Показать \en Show
class MATH_CLASS MbSpaceItem;
class MATH_CLASS MbPlaneItem;
class MATH_CLASS MbTopItem;
class MATH_CLASS MbVertex;
class MATH_CLASS MbEdge;
class MATH_CLASS MbFace;
class MATH_CLASS MbCartPoint;
class MATH_CLASS MbPlaneItem;
class MATH_CLASS MbCartPoint;
class MATH_CLASS MbParamCurvePatch;
class MATH_CLASS MbMatrix3D;
class MATH_CLASS MbCartPoint3D;
class MATH_CLASS MbFloatPoint3D;
class MATH_CLASS MbMesh;
class MATH_CLASS MbCube;
class MATH_CLASS MbCurve3D;
class MATH_CLASS MbPolygon3D;
class MATH_CLASS MbVector3D;
class MATH_CLASS MbPlacement3D;
class MATH_CLASS MbVector;
class MATH_CLASS MbCartPoint;
class MATH_CLASS MbCurve;
class MATH_CLASS MbSurface;
class MATH_CLASS MbSurfaceCurve;
class MATH_CLASS MbContourOnSurface;
class MATH_CLASS MbSurfaceIntersectionCurve;
class MATH_CLASS MbCurveBoundedSurface;
class MATH_CLASS MbGrid;
class MATH_CLASS MbPlanarGrid;
class MATH_CLASS MbCollection;
class MbSpaceItem;
class MbPlaneItem;
class MbTopItem;
class MbVertex;
class MbEdge;
class MbFace;
class MbCartPoint;
class MbPlaneItem;
class MbCartPoint;
class MbParamCurvePatch;
class MbMatrix3D;
class MbCartPoint3D;
class MbFloatPoint3D;
class MbMesh;
class MbCube;
class MbCurve3D;
class MbPolygon3D;
class MbVector3D;
class MbPlacement3D;
class MbVector;
class MbCartPoint;
class MbCurve;
class MbSurface;
class MbSurfaceCurve;
class MbContourOnSurface;
class MbSurfaceIntersectionCurve;
class MbCurveBoundedSurface;
class MbGrid;
class MbPlanarGrid;
class MbCollection;
//------------------------------------------------------------------------------
@@ -198,6 +198,9 @@ public:
/// \ru Перерисовать модель. \en Redraw the model.
virtual void RedrawModel() = 0;
// Получить плейсмент активного окна (например для прорисовки плоской кривой).
virtual void GetWindowPlace( MbPlacement3D & place ) = 0;
OBVIOUS_PRIVATE_COPY( IfDrawGI )
};
@@ -1005,6 +1008,10 @@ public:
*/
static void RedrawModel();
/** \brief Получить плейсмент активного окна (например для прорисовки плоской кривой).
\ingroup Drawing
*/
static void GetWindowPlace( MbPlacement3D & place );
}; // class DrawGI
+5 -5
View File
@@ -19,11 +19,11 @@
#include <math_define.h>
class MATH_CLASS MbCartPoint;
class MATH_CLASS MbCartPoint3D;
class MATH_CLASS MbAxis3D;
class MATH_CLASS MbCurve3D;
class MATH_CLASS MbSurface;
class MbCartPoint;
class MbCartPoint3D;
class MbAxis3D;
class MbCurve3D;
class MbSurface;
//------------------------------------------------------------------------------
+13 -13
View File
@@ -21,18 +21,18 @@
#include <plane_item.h>
class MATH_CLASS MbVector;
class MATH_CLASS MbCurve;
class MATH_CLASS MbCartPoint;
class MATH_CLASS MbPlacement3D;
class MATH_CLASS MbBezier;
class MATH_CLASS MbNurbs;
class MATH_CLASS MbCurve3D;
class MATH_CLASS MbMatrix3D;
class MATH_CLASS MbNurbs3D;
class MATH_CLASS MbCurve3D;
class MATH_CLASS MbContour3D;
class MATH_CLASS MbCubicSpline3D;
class MbVector;
class MbCurve;
class MbCartPoint;
class MbPlacement3D;
class MbBezier;
class MbNurbs;
class MbCurve3D;
class MbMatrix3D;
class MbNurbs3D;
class MbCurve3D;
class MbContour3D;
class MbCubicSpline3D;
//-------------------------------------------------------------------------------
@@ -99,7 +99,7 @@ public:
/** \brief \ru Построить контур из отрезков по заданным точкам.
\en Construct a contour from segments by given points. \~
\details \ru Вершины сочленения скругляются. Каждой вершине соответствует радиус скругления. \n
Eсли две вершины совпадают, то одна из них и соответствующий ей радиус удаляются.
Если две вершины совпадают, то одна из них и соответствующий ей радиус удаляются.
\en Vertices of joint are rounded. Some fillet radius corresponds to every vertex. \n
If two vertices are coincident then one of them and the corresponding radius are deleted. \~
\param[out] contour - \ru Контур.
+5 -5
View File
@@ -16,11 +16,11 @@
#include <mb_variables.h>
class MATH_CLASS MbVector3D;
class MATH_CLASS MbPlacement3D;
class MATH_CLASS MbCurve;
class MATH_CLASS MbSurface;
class MATH_CLASS MbMesh;
class MbVector3D;
class MbPlacement3D;
class MbCurve;
class MbSurface;
class MbMesh;
//------------------------------------------------------------------------------
+6 -8
View File
@@ -17,14 +17,14 @@
class MbConstraintSystem;
class MATH_CLASS MtGeomArgument;
class MATH_CLASS MtGeomConstraint;
class MATH_CLASS MtConstraintIter;
class MtGeomArgument;
class MtGeomConstraint;
class MtConstraintIter;
struct ItAssemblyReactor;
struct ItAssemblyImportData;
struct ItModelVisitor;
class MbModelTreeReader;
class MATH_CLASS MbAssembly;
class MbAssembly;
namespace c3d // namespace C3D
{
@@ -114,10 +114,8 @@ public:
void GetBasisPoints( MbControlData3D & ) const override; // \ru Выдать контрольные точки объекта. \en Get control points of object.
void SetBasisPoints( const MbControlData3D & ) override; // \ru Изменить объект по контрольным точкам. \en Change the object by control points.
// \ru Выдать локальную систему координат объектов сборки. \en Get the local coordinate system of assembly items.
bool GetPlacement( MbPlacement3D & ) const override;
// \ru Установить локальную систему координат объектов сборки. \en Set coordinate system of assembly items.
bool SetPlacement( const MbPlacement3D & ) override;
// \ru Выдать локальную систему координат. Объект сборки не имеет локальной системы координат, для него всегда возвращается глобальная система координат. \en Get the local coordinate system. An assembly object does not have a local coordinate system, the global coordinate system is always returned for it.
bool GetPlacement( MbPlacement3D & p ) const override { p = MbPlacement3D::global; return true; }
// \ru Перестроить объект по журналу построения. \en Rebuild object according to the history tree.
bool RebuildItem( MbeCopyMode sameShell, RPArray<MbSpaceItem> * items, IProgressIndicator * progInd ) override;
// \ru Создать полигональный объект - упрощенную копию данного объекта. \en Create a polygonal object - a simplified copy of the given object.
+3 -3
View File
@@ -17,9 +17,9 @@
#include <math_define.h>
class MATH_CLASS MbCube;
class MATH_CLASS MbProperties;
class MATH_CLASS MbMesh;
class MbCube;
class MbProperties;
class MbMesh;
//------------------------------------------------------------------------------
+1 -1
View File
@@ -17,7 +17,7 @@
#include <templ_visitor.h>
class MATH_CLASS MbSolid;
class MbSolid;
//------------------------------------------------------------------------------
+43 -17
View File
@@ -120,6 +120,8 @@ public:
\en Color. \~
\details \ru Цвет. \n
\en Color. \n \~
\deprecated \ru Класс устарел и не рекомендуется к использованию. Взамен использовать класс #MbVisual.
\en The class is deprecated and not recommended for use. Instead use the class #MbVisual. \~
\ingroup Model_Attributes
*/
// ---
@@ -261,8 +263,22 @@ IMPL_PERSISTENT_OPS( MbStyle )
//------------------------------------------------------------------------------
/** \brief \ru Свойства материала.
\en Material properties. \~
\details \ru Свойства материала (свойства для OpenGL). \n
\en Material properties (properties for OpenGL). \n \~
\details \ru Свойства материала (свойства для OpenGL). Содержит цвет и коэффициенты. \n
Компонент _ambient хранит цвет RED, GREEN, BLUE и коэффициент общего фона в диапазоне 0.0 - 1.0 (0 - 255 в uint8). \n
Компонент _diffuse хранит цвет RED, GREEN, BLUE и коэффициент диффузного отражения в диапазоне 0.0 - 1.0 (0 - 255 в uint8). \n
Компонент _specular хранит цвет RED, GREEN, BLUE и коэффициент зеркального отражения света в диапазоне 0.0 - 1.0 (0 - 255 в uint8). \n
Компонент _emission хранит цвет RED, GREEN, BLUE и коэффициент излучения в диапазоне 0.0 - 1.0 (0 - 255 в uint8). \n
Компонент _shininess хранит блеск (показатель степени в законе зеркального отражения) в диапазоне 0 - 128 (uint8). \n
Компонент _opacity хранит коэффициент непрозрачности (коэффициент суммарного отражения) в диапазоне 0.0 - 1.0 (0 - 255 в uint8). \n
Компонент _chrom хранит коэффициент зеркального отражения объектов в диапазоне 0.0 - 1.0 (0 - 255 в uint8).
\en Material properties (properties for OpenGL). Contains color and coefficients. \n
Component _ambient contains RED, GREEN, BLUE of a color and background coefficient in range 0.0 - 1.0 (0 - 255 in uint8). \n
Component _diffuse contains RED, GREEN, BLUE of a color and coefficient of diffuse reflection in range 0.0 - 1.0 (0 - 255 in uint8). \n
Component _specular contains RED, GREEN, BLUE of a color and coefficient of specular reflection in range 0.0 - 1.0 (0 - 255 in uint8). \n
Component _emission contains RED, GREEN, BLUE of a color and emissivity coefficient in range 0.0 - 1.0 (0 - 255 in uint8). \n
Component _shininess contains shininess coefficient (index according to the law of specular reflection) in range 0 - 128 (in uint8). \n
Component _opacity contains opacity coefficient (coefficient of total reflection) in range 0.0 (transparent) - 1.0 (opaque) (range 0 - 255 in uint8). \n
Component _chrom contains coefficient of specular reflection in range 0.0 - 1.0 (0 - 255 in uint8). \~
\ingroup Model_Attributes
*/
// ---
@@ -270,10 +286,10 @@ class MATH_CLASS MbVisual : public MbElementaryAttribute {
private :
MbRGBA _ambient; ///< \ru Коэффициенты общего фона для трех цветов: RED, GREEN, BLUE. \en Coefficients of ambient background for colors: RED, GREEN, BLUE, range 0.0 - 1.0.
MbRGBA _diffuse; ///< \ru Коэффициенты диффузного отражения для трех цветов: RED, GREEN, BLUE. \en Coefficients of diffuse reflection for colors: RED, GREEN, BLUE, range 0.0 - 1.0.
MbRGBA _specularity; ///< \ru Коэффициенты зеркального отражения света трех цветов: RED, GREEN, BLUE. \en Coefficients of specular reflection for light colors: RED, GREEN, BLUE, range 0.0 - 1.0.
MbRGBA _specular; ///< \ru Коэффициенты зеркального отражения света трех цветов: RED, GREEN, BLUE. \en Coefficients of specular reflection for light colors: RED, GREEN, BLUE, range 0.0 - 1.0.
MbRGBA _emission; ///< \ru Коэффициент излучения. \en Emissivity coefficient, range 0.0 - 1.0.
uint8 _shininess; ///< \ru Блеск (показатель степени в законе зеркального отражения). \en Shininess (index according to the law of specular reflection), range 0 - 128.
uint8 _opacity; ///< \ru Коэффициент непрозрачности (коэффициент суммарного отражения). \en Opacity coefficient (coefficient of total reflection), range 0.0 (transparent) - 1.0(opaque).
uint8 _opacity; ///< \ru Коэффициент непрозрачности (коэффициент суммарного отражения). \en Opacity coefficient (coefficient of total reflection), range 0.0 (transparent) - 1. (opaque).
uint8 _chrom; ///< \ru Коэффициент зеркального отражения объектов. \en Coefficient of specular reflection for objects, range 0.0 - 1.0.
MbUuid _uuid; ///< \ru Идентификатор. \en Identifier.
@@ -283,7 +299,7 @@ protected :
public :
/// \ru Конструктор. \en Constructor.
MbVisual( float a = MB_AMBIENT, float d = MB_DIFFUSE, float s = MB_SPECULARITY,
float h = MB_SHININESS, float t = MB_OPACITY, float e = MB_EMISSION );
float h = MB_SHININESS, float t = MB_OPACITY, float e = MB_EMISSION );
/// \ru Конструктор. \en Constructor.
MbVisual( uint8 a, uint8 d, uint8 s, uint8 h, uint8 t, uint8 e );
/// \ru Деструктор. \en Destructor.
@@ -292,6 +308,12 @@ public :
/// \ru Создать по составляющей цвета. \en Create an object by a color component.
static SPtr<MbVisual> Create( uint32 c );
/// \ru Создать по составляющей цвета. \en Create an object by a color component.
static SPtr<MbVisual> Create( int iR, int iG, int iB );
/// \ru Создать по составляющей цвета. \en Create an object by a color component.
static SPtr<MbVisual> Create( const MbRGBA & c );
// \ru Общие функции объекта \en Common functions of object.
MbeAttributeType AttributeType() const override; // \ru Дать подтип атрибута. \en Get subtype of an attribute.
@@ -323,7 +345,7 @@ public :
/// \ru Дать отдельные свойства для OpenGL. \en Get some properties for OpenGL.
const MbRGBA & GetAmbient() const { return _ambient; } // \ru Дать коэффициент общего фона. \en Get a coefficient of ambient background.
const MbRGBA & GetDiffuse() const { return _diffuse; } // \ru Дать коэффициент диффузного отражения. \en Get a coefficient of diffuse reflection.
const MbRGBA & GetSpecularity() const { return _specularity; }// \ru Дать коэффициент зеркального отражения света. \en Get a coefficient of specular reflection for light.
const MbRGBA & GetSpecularity() const { return _specular; }// \ru Дать коэффициент зеркального отражения света. \en Get a coefficient of specular reflection for light.
const MbRGBA & GetEmission() const { return _emission; } // \ru Дать коэффициент излучения. \en Get a coefficient of emissivity.
const MbUuid & GetIdentifier() const { return _uuid; } // \ru Дать идентификатор. \en Get identifier.
uint8 GetShininess() const { return _shininess; } // \ru Дать блеск (показатель степени в законе зеркального отражения). \en Get shininess (index according to the law of specular reflection).
@@ -340,24 +362,28 @@ public :
void SetChrom ( float v ); // \ru Установить коэффициент зеркального отражения объектов. \en Set a coefficient of specular reflection for objects.
/// \ru Установить отдельные свойства для OpenGL. \en Set some properties for OpenGL.
void SetAmbient ( const MbRGBA & v ) { _ambient = v; } // \ru Установить коэффициент общего фона. \en Set a coefficient of ambient background.
void SetDiffuse ( const MbRGBA & v ) { _diffuse = v; } // \ru Установить коэффициент диффузного отражения. \en Set a coefficient of diffuse reflection.
void SetSpecularity ( const MbRGBA & v ) { _specularity = v; } // \ru Установить коэффициент зеркального отражения света. \en Set a coefficient of specular reflection for light.
void SetEmission ( const MbRGBA & v ) { _emission = v; } // \ru Установить коэффициент излучения. \en Set a coefficient of emissivity.
void SetIdentifier ( const MbUuid & v ) { _uuid = v; } // \ru Установить идентификатор. \en Set identifier.
void SetAmbient ( const MbRGBA & v ) { _ambient = v; } // \ru Установить коэффициент общего фона. \en Set a coefficient of ambient background.
void SetDiffuse ( const MbRGBA & v ) { _diffuse = v; } // \ru Установить коэффициент диффузного отражения. \en Set a coefficient of diffuse reflection.
void SetSpecularity ( const MbRGBA & v ) { _specular = v; } // \ru Установить коэффициент зеркального отражения света. \en Set a coefficient of specular reflection for light.
void SetEmission ( const MbRGBA & v ) { _emission = v; } // \ru Установить коэффициент излучения. \en Set a coefficient of emissivity.
void SetIdentifier ( const MbUuid & v ) { _uuid = v; } // \ru Установить идентификатор. \en Set identifier.
void SetShininessInt ( uint8 v ) { _shininess = v; } // \ru Установить блеск (показатель степени в законе зеркального отражения). \en Set shininess (index according to the law of specular reflection).
void SetOpacityInt ( uint8 v ) { _opacity = v; } // \ru Установить коэффициент непрозрачности. \en Set an opacity coefficient.
void SetChromInt ( uint8 v ) { _chrom = v; } // \ru Установить коэффициент зеркального отражения объектов. \en Set a coefficient of specular reflection for objects.
uint32 GetColor() const { return _diffuse.Get(); } // \ru Выдать составляющую цвета. \en Get a color component.
void SetColor( uint32 c ) { _diffuse.Init( c ); } // \ru Установить составляющую цвета. \en Set a color component.
/// \ru Методы работы с составляющей цвета (использовать в случае, если используется только цвет). \en Methods working with a color component (use in case only the color is used).
uint32 GetColor() const { return MbRGBA(_diffuse[0], _diffuse[1], _diffuse[2], 0).Get(); } // \ru Выдать составляющую цвета. \en Get a color component.
void SetColor( uint32 c ); // \ru Установить составляющую цвета. \en Set a color component.
void SetColor( const MbRGBA & c ); // \ru Установить составляющую цвета. \en Set a color component.
void SetColor( int iR, int iG, int iB ); // \ru Установить составляющую цвета. \en Set a color component.
void GetProperties( MbProperties & ) override; // \ru Выдать свойства объекта. \en Get properties of the object.
size_t SetProperties( const MbProperties & ) override; // \ru Установить свойства объекта. \en Set properties of object.
MbePrompt GetPropertyName() override; // \ru Выдать заголовок свойства объекта. \en Get a name of object property.
void GetProperties( MbProperties & ) override; // \ru Выдать свойства объекта. \en Get properties of the object.
size_t SetProperties( const MbProperties & ) override; // \ru Установить свойства объекта. \en Set properties of object.
MbePrompt GetPropertyName() override; // \ru Выдать заголовок свойства объекта. \en Get a name of object property.
private:
void operator = ( const MbVisual & ); // \ru Не реализовано \en Not implemented
bool IsConverted() const;
void operator = ( const MbVisual & ); // \ru Не реализовано \en Not implemented
DECLARE_PERSISTENT_CLASS_NEW_DEL( MbVisual )
}; // MbVisual
+67 -7
View File
@@ -1,8 +1,8 @@
////////////////////////////////////////////////////////////////////////////////
/**
\file
\brief \ru Геометрический атрибут.
\en Geometric attribute. \~
\brief \ru Атрибуты геометрического и ссылочного объектов.
\en Geometric object and reference-counted object attributes. \~
*/
////////////////////////////////////////////////////////////////////////////////
@@ -17,9 +17,9 @@
#include <creator.h>
class MATH_CLASS MbSpaceItem;
class MATH_CLASS MbProperty;
class MATH_CLASS MbProperties;
class MbSpaceItem;
class MbProperty;
class MbProperties;
class MbRegTransform;
class MbRegDuplicate;
@@ -27,7 +27,7 @@ class MbRegDuplicate;
//------------------------------------------------------------------------------
/** \brief \ru Геометрический атрибут.
\en Geometric attribute. \~
\details \ru Геометрический атрибут. \n
\details \ru Атрибут геометрического объекта. \n
\en Geometric attribute. \n \~
\ingroup Model_Attributes
*/
@@ -72,11 +72,12 @@ public:
void GetProperties( MbProperties & ) override; // \ru Выдать свойства объекта. \en Get properties of the object.
size_t SetProperties( const MbProperties & ) override; // \ru Установить свойства объекта. \en Set properties of object.
MbePrompt GetPropertyName() override; // \ru Выдать заголовок свойства объекта. \en Get a name of object property.
/// \ru Дать геометрический объект. \en Get geometric object.
const MbSpaceItem * GetSpaceItem() const { return spaceItem; }
MbSpaceItem * SetSpaceItem() { return spaceItem; }
/// \ru Заменить геометрический объект. \en Replace geometric object.
void ChangeSpaceItem( MbSpaceItem & init );
void ChangeSpaceItem( const MbSpaceItem & init );
/// \ru Дать тип операции. \en Get operation type.
MbeCreatorType GetOperationType() const { return type; }
@@ -86,4 +87,63 @@ OBVIOUS_PRIVATE_COPY( MbGeomAttribute )
IMPL_PERSISTENT_OPS( MbGeomAttribute )
//------------------------------------------------------------------------------
/** \brief \ru Атрибут ссылочного объекта.
\en Reference-counted object attribute. \~
\details \ru Атрибут объекта со счетчиком ссылок. \n
\en Reference-counted object attribute. \n \~
\ingroup Model_Attributes
*/
class MATH_CLASS MbRefItemAttribute : public MbCommonAttribute {
protected:
MbRefItem * _refItem; ///< \ru Объект со ссылками. \en Reference-counted object.
mutable bool _isTemporal; ///< \ru Временный объект (без сериализации, даже есть она возможна). \en Temporary object (without serialization, even if it is possible).
private:
// \ru Конструктор копирования. \en Copy constructor.
MbRefItemAttribute( const MbRefItemAttribute & init, MbRegDuplicate * iReg );
public:
/// \ru Конструктор. \en Constructor.
MbRefItemAttribute( const MbRefItem & item );
/// \ru Конструктор. \en Constructor.
MbRefItemAttribute( const MbRefItem & item, const c3d::string_t & itemPrompt );
/// \ru Деструктор. \en Destructor.
virtual ~MbRefItemAttribute();
public:
// \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 Determine whether objects are equal.
bool IsSame( const MbAttribute &, double accuracy ) const override;
// \ru Инициализировать данные по присланным. \en Initialize data.
bool Init( const MbAttribute & ) override;
void GetCharValue( TCHAR * v ) const override; // \ru Выдать строковое значение свойства. \en Get a string value of the property.
void GetProperties( MbProperties & ) override; // \ru Выдать свойства объекта. \en Get properties of the object.
size_t SetProperties( const MbProperties & ) override; // \ru Установить свойства объекта. \en Set properties of object.
MbePrompt GetPropertyName() override; // \ru Выдать заголовок свойства объекта. \en Get a name of object property.
/// \ru Дать ссылочный объект. \en Get reference-counted object.
const MbRefItem * GetRefItem() const { return _refItem; }
/// \ru Дать ссылочный объект. \en Get reference-counted object.
MbRefItem * SetRefItem() { return _refItem; }
/// \ru Заменить ссылочный объект. \en Replace reference-counted object.
bool ChangeRefItem( const MbRefItem & init );
/// \ru Является ли объект временным. \en Whether the object is temporary.
bool IsTemporal() const { return _isTemporal; }
/// \ru Является ли объект временным. \en Whether the object is temporary.
void SetTemporal( bool isTemp ) { _isTemporal = isTemp; }
/// \ru Можно ли сериализовать этот атрибут с содержимым. \en Whether object contents can be serialized?
const TapeBase * CanBeSerialized() const;
DECLARE_PERSISTENT_CLASS_NEW_DEL( MbRefItemAttribute )
OBVIOUS_PRIVATE_COPY( MbRefItemAttribute )
};
IMPL_PERSISTENT_OPS( MbRefItemAttribute )
#endif // __ATTR_GEOMETRIC_ATTRIBUTE_H
+11 -9
View File
@@ -14,7 +14,7 @@
#include <attr_common_attribute.h>
#include <mb_placement3d.h>
class MATH_CLASS MbBaseHotPointAttribute;
class MbBaseHotPointAttribute;
namespace c3d // namespace C3D
@@ -44,12 +44,14 @@ public:
*/
//---
enum class MbeHotPointType : uint16 {
undefinedHP = 0, ///< \ru Неопределенный тип. \en Undefined type.
draftHP, ///< \ru Хот-точка операции уклона. \en The draft operation hot point.
conicSectionHP, ///< \ru Хот-точка операции построения переменного конического сечения. \en The conic section operation hot point.
DMFilletRadiusSetHP, ///< \ru Хот-точка операции прямого моделирования по установке радиусов граням скругления. \en The direct modeling operation's hot point by set fillet face's radius.
elementaryHP, ///< \ru Хот-точка операции построения элементарного тела. \en The elementary solid operation hot point.
DMReplaceFacesHP, ///< \ru Хот-точка операции модифицирования граней. \en Hot point of the face modification operation.
undefinedHP = 0, ///< \ru Неопределенный тип. \en Undefined type.
draftHP, ///< \ru Хот-точка операции уклона. \en The draft operation hot point.
conicSectionHP, ///< \ru Хот-точка операции построения переменного конического сечения. \en The conic section operation hot point.
DMFilletRadiusSetHP, ///< \ru Хот-точка операции прямого моделирования по установке радиусов граням скругления. \en The direct modeling operation's hot point by set fillet face's radius.
elementaryHP, ///< \ru Хот-точка операции построения элементарного тела. \en The elementary solid operation hot point.
DMReplaceFacesHP, ///< \ru Хот-точка операции замены граней. \en Hot point of the face replacement operation.
DMOffsetFacesHP, ///< \ru Хот-точка операции замены граней на эквидистантные. \en Hot point of the operation of replacement faces with the offset ones.
DMReplaceFacesGroupHP, ///< \ru Хот-точка операции замены группы граней. \en Hot point of the operation of replacement faces group.
// \ru Вставлять новые типы перед этим типом. \en Insert new types before this type.
endHP = SYS_MAX_INT16
};
@@ -122,7 +124,7 @@ protected:
MbCartPoint3D _hotPoint; ///< \ru Хот-точка. \en Hot-point.
public:
/** \brief \ru Конструктор атрибута хот-точки.
\en Constructor of аttribute of hot-point. \~
\en Constructor of attribute of hot-point. \~
\details \ru Создается атрибут хот-точки содержащий трехмерную точку и трехмерную локальную систему координат.
\en Created attribute of hot-point contains three-dimensional point and three-dimensional coordinate system. \~
\param[in] place - \ru Локальная система координат хот-точки.
@@ -211,7 +213,7 @@ private:
public:
/** \brief \ru Конструктор атрибута хот-точки.
\en Constructor of аttribute of hot-point. \~
\en Constructor of attribute of hot-point. \~
\details \ru Создается атрибут хот-точки содержащий трехмерную точку и трехмерную локальную систему координат.
\en Created attribute of hot-point contains three-dimensional point and three-dimensional coordinate system. \~
\param[in] place - \ru Локальная система координат хот-точки.
+1 -1
View File
@@ -205,7 +205,7 @@ protected :
public :
MbProductInfo( c3d::StringTCRef initId, c3d::StringTCRef initName, c3d::StringTCRef initDesc, bool isAssm );
MbProductInfo( const TCHAR* initId, const TCHAR* initName, TCHAR* initDesc, bool isAssm );
MbProductInfo( const TCHAR* initId, const TCHAR* initName, const TCHAR* initDesc, bool isAssm );
MbProductInfo( bool isAssm, const std::string & initId, const std::string & initName, const std::string & initDesc );
// Деструктор.
+5 -3
View File
@@ -19,9 +19,9 @@
#include <tool_cstring.h>
#include <tool_mutex.h>
class MATH_CLASS MbExternalAttribute;
class MATH_CLASS MbUserAttribute;
class MATH_CLASS MbFixAttrSet;
class MbExternalAttribute;
class MbUserAttribute;
class MbFixAttrSet;
//------------------------------------------------------------------------------
@@ -40,6 +40,8 @@ class MATH_CLASS MbFixAttrSet;
class IAttrDefinition
{
public:
virtual ~IAttrDefinition() = default;
/// \ru Преобразовать из пользовательского в "системный". \en Convert user attribute to "system" one.
virtual MbUserAttribute * ReduceUserAttrib ( const MbExternalAttribute & source ) = 0;
+55 -17
View File
@@ -18,17 +18,18 @@
#include <attr_registry.h>
class MATH_CLASS reader;
class MATH_CLASS writer;
class MATH_CLASS MbVector3D;
class MATH_CLASS MbAxis3D;
class MATH_CLASS MbMatrix3D;
class MATH_CLASS MbAttribute;
class MATH_CLASS MbUserAttribute;
class MATH_CLASS MbExternalAttribute;
class MATH_CLASS MbProperties;
class MbRegDuplicate;
class MbRegTransform;
class reader;
class writer;
class MbVector3D;
class MbAxis3D;
class MbMatrix3D;
class MbAttribute;
class MbUserAttribute;
class MbExternalAttribute;
class MbRGBA;
class MbProperties;
class MbRegDuplicate;
class MbRegTransform;
//------------------------------------------------------------------------------
@@ -40,7 +41,7 @@ class MbRegTransform;
Наследники данного класса содержат атрибуты.\n
Методами данного класса выполняются действия над атрибутами объектов геометрического ядра.\n
Атрибут может влиять на состояние атрибута через его владельца,
тo есть геометрическое ядро предусматривает возможность передачи атрибутам информации об изменениях
то есть геометрическое ядро предусматривает возможность передачи атрибутам информации об изменениях
их владельцев посредством вызовов предопределенных функций у самого атрибута.\n
Кроме передачи самой информации об изменениях происходящих с владельцем,
предусмотрена возможность определять поведение атрибута при этих изменениях путем выбора
@@ -112,8 +113,16 @@ public:
/** \ru \name Общие функции над атрибутами
\en \name Common functions of attributes
\{ */
/// \ru ублировать атрибуты присланного объекта, свои отпустить. \en Duplicate attributes of a given object, release existing attributes.
void AttributesAssign( const MbAttributeContainer & );
/** \brief \ru Дублировать атрибуты присланного объекта, свои отпустить.
\en Duplicate attributes of a given object, release existing attributes. \~
\details \ru Дублировать атрибуты присланного объекта, свои отпустить. \n
\en Duplicate attributes of a given object, release existing attributes. \n \~
\param[in] src - \ru Присланный контейнер атрибутов для копирования.
\en Attribute container for copying to this attribute container . \~
\param[in] forcedAssign - \ru Если флаг равен false, то обобщенный атрибут не будет добавлен, если в настройках его поведения есть запрет на размножение.
\en If the flag is false, then the generic attribute will not be added if its behavior settings prohibit replication. \~
*/
void AttributesAssign( const MbAttributeContainer & src, bool forcedAssign = false );
/// \ru Выдать количество объектов. \en Get the number of objects.
size_t AttributesCount() const { return attributes.Count(); }
/// \ru Удалить все атрибуты из контейнера. \en Delete all attributes from container.
@@ -131,10 +140,12 @@ public:
\en Attribute. \~
\param[in] checkSame - \ru Флаг поиска такого же по содержанию атрибута в контейнере. Атрибут не будет добавлен, если найден такой же.
\en Search flag for an attribute containing the same content. Attribute will not be added if the same attribute is found. \~
\param[in] forcedAssign - \ru Если флаг равен false, то обобщенный атрибут не будет добавлен, если в настройках его поведения есть запрет на размножение.
\en If the flag is false, then the generic attribute will not be added if its behavior settings prohibit replication. \~
\return \ru Возвращает указатель на добавленный атрибут или нулевой указатель.
\en Returns a pointer to the added attribute or null pointer. \~
*/
MbAttribute * AddAttribute( MbAttribute * attr, bool checkSame = true );
MbAttribute * AddAttribute( MbAttribute * attr, bool checkSame = true, bool forcedAssign = false );
/** \brief \ru Добавить атрибут в контейнер (добавляет копию атрибута, если его можно добавить).
\en Add attribute in container (adds a copy of the attribute if it can be added). \~
@@ -146,10 +157,12 @@ public:
\en Attribute. \~
\param[in] checkSame - \ru Флаг поиска такого же по содержанию атрибута в контейнере. Атрибут не будет добавлен, если найден такой же.
\en Search flag for an attribute containing the same content. Attribute will not be added if the same attribute is found. \~
\param[in] forcedAssign - \ru Если флаг равен false, то обобщенный атрибут не будет добавлен, если в настройках его поведения есть запрет на размножение.
\en If the flag is false, then the generic attribute will not be added if its behavior settings prohibit replication. \~
\return \ru Возвращает указатель на добавленный атрибут или нулевой указатель.
\en Returns a pointer to the added attribute or null pointer. \~
*/
MbAttribute * AddAttribute( const MbAttribute & attr, bool checkSame = true );
MbAttribute * AddAttribute( const MbAttribute & attr, bool checkSame = true, bool forcedAssign = false );
/** \brief \ru Выдать атрибуты заданного типа или семейства.
\en Get attributes of a given type or family. \~
@@ -176,6 +189,24 @@ public:
\en A type of returned attributes. \~
*/
void GetAttributes( c3d::AttrVector & attrs, MbeAttributeType aType ) const;
/** \brief \ru Выдать атрибуты.
\en Get attributes. \~
\details \ru Выдать атрибуты.
\en Get attributes. \~
\param[out] attrs - \ru Массив возвращаемых атрибутов.
\en An array of returned attributes.\~
*/
template <class AttrVector>
void GetAttributes( AttrVector & attrs ) const
{
AttrMap_t::Iterator curIter = attributes.LowerBound( at_Undefined );
while ( !curIter.Empty() ) {
MbAttribute * attr = curIter.Value();
if ( attr != nullptr )
attrs.push_back( attr );
curIter++;
}
}
/// \ru Выдать атрибуты по строке описания. \en Get attributes using sample of description string.
void GetCommonAttributes( c3d::AttrVector &, const c3d::string_t & samplePrompt, MbeAttributeType subType = at_Undefined, bool firstFound = false ) const;
/// \ru Выдать строковые атрибуты по строке содержания. \en Get string attributes using sample of contents of the string.
@@ -245,6 +276,9 @@ public:
/// \ru Установить визуальные свойства объекта. \en Set visual properties of the object.
void SetVisual( float a, float d, float sp, float sh, float t, float e, uint rgb = 0 );
/// \ru Установить визуальные свойства объекта. \en Set visual properties of the object.
void SetVisual( const MbRGBA & ambient, const MbRGBA & diffuse, const MbRGBA & specular,
const MbRGBA & emission, uint8 shininess, uint8 opacity, uint8 chrom );
/** \brief \ru Выдать визуальные свойства объекта.
\en Get visual properties of the object. \~
\details \ru Выдать визуальные свойства объекта.
@@ -275,7 +309,7 @@ public:
\return \ru true если есть такой атрибут \n false в противном случае
\en True if there is the attribute MbColor \n otherwise false. \~
*/
bool IsColored() const { return (GetSimpleAttribute( at_Color ) != nullptr); }
bool IsColored() const { return (GetSimpleAttribute( at_Visual ) != nullptr); }
/// \ru Изменить цвет объекта. \en Change color of the object.
void SetColor( uint32 );
/// \ru Изменить цвет объекта (0-255). \en Change color of the object (0-255).
@@ -322,6 +356,10 @@ public:
/// \ru Установить свойства атрибутов. \en Set properties of attributes.
void SetProperties( const MbProperties & );
private:
MbAttribute * SetColorAttribute( MbAttribute * );
MbAttribute * SetColorAttribute( const MbAttribute & );
OBVIOUS_PRIVATE_COPY( MbAttributeContainer )
};
+25 -6
View File
@@ -17,16 +17,16 @@
#include <mb_property_title.h>
class MATH_CLASS MbVector3D;
class MATH_CLASS MbAxis3D;
class MATH_CLASS MbMatrix3D;
class MATH_CLASS MbProperties;
class MATH_CLASS MbAttributeContainer;
class MbVector3D;
class MbAxis3D;
class MbMatrix3D;
class MbProperties;
class MbAttributeContainer;
class MbRegDuplicate;
class MbRegTransform;
class MATH_CLASS MbAttribute;
class MbAttribute;
namespace c3d // namespace C3D
{
typedef SPtr<MbAttribute> AttrSPtr;
@@ -92,6 +92,7 @@ enum MbeAttributeType
at_HotPointAttribute = 216, ///< \ru Атрибут простой хот-точки. \en Attribute of the simple hot-point. \n
at_CompHotPointAttribute = 217, ///< \ru Композитный атрибут хот-точки. \en Composite attribute of the hot-point. \n
at_DoubleRangeAttribute = 218, ///< \ru Атрибут диапазона действительных чисел типа double. \en Double precision range attribute.
at_RefItemAttribute = 219, ///< \ru Атрибут ссылочного объекта. \en Reference-counted object attribute. \n
at_CommonLast = 300, ///< \ru Обобщенные атрибуты вставлять перед этим значением. \en Common attributes should be inserted before this value. \n
// \ru Типы связующих атрибутов. \en Types of linking attributes.
@@ -530,6 +531,8 @@ namespace c3d // namespace C3D
/// \ru Подсказка для удаляемой слипшейся грани. \en Hint for a deleted stuck face.
constexpr TCHAR c3dStr_StuckDelete[] = _T( "c3d_StuckDelete" );
/// \ru Подсказка для изначально граничного ребра. \en Hint for initially boundary edge.
constexpr TCHAR c3dStr_InitBoundaryEdge[] = _T( "c3d_InitBoundaryEdge" );
/// \ru Подсказка для расшивки граней по ребру. \en Hint for separation neighbour faces by an edge.
constexpr TCHAR c3dStr_UnstitchByEdge[] = _T( "c3d_UnstitchByEdge" );
/// \ru Подсказка для проверки идентификатора боковой грани. \en Hint for checking flank's identifier.
@@ -586,6 +589,22 @@ namespace c3d // namespace C3D
/// \ru Подсказка для атрибута имени ребра, используемого для восстановления имён скруглений. \en Hint for the edge name attribute used to recover fillet names.
constexpr TCHAR c3dStr_EdgeForFilletNamesRecover[] = _T( "c3d_EdgeEdgeForFilletNamesRecover" );
/// \ru Подсказки для сохраненного текущего вида. \en Hints for the saved current view.
/** \ru Подсказка для системы координат текущего вида.
Хранится в виде массива из 12 doubles (3D-точка начала координат, 3D-вектора осей X, Y, Z).
\en Hint for the local coordinate system of the current view.
Stored as an array of 12 doubles (3D-point of the coordinate system origin, 3D-vectors for X, Y, Z axes). \~ */
constexpr TCHAR c3dStr_SavedViewPlacement[] = _T( "c3d_SavedView_Placement" );
/** \ru Подсказка для вектора направления вверх текущего вида. Хранится в виде массива из 3 doubles.
\en Hint for the up-vector of the current view. Stored as an array of 3 doubles. \~*/
constexpr TCHAR c3dStr_SavedViewUpVector[] = _T( "c3d_SavedView_UpVector" );
/** \ru Подсказка для масштаба текущего вида. \en Hint for the scale of the current view. \~*/
constexpr TCHAR c3dStr_SavedViewScale[] = _T( "c3d_SavedView_Scale" );
/** \ru Подсказка для типа текущего вида (ортогональный/перспективный). Хранится в виде значения bool.
\en Hint for the type of the current view (orthogonal/perspective). Stored as a bool value. \~*/
constexpr TCHAR c3dStr_SavedViewPerspective[] = _T( "c3d_SavedView_Perspective" );
} // namespace C3D
+4 -4
View File
@@ -17,9 +17,9 @@
#include <vector>
class MATH_CLASS MbSolid;
class MATH_CLASS MbSNameMaker;
class MATH_CLASS MbCurveEdge;
class MbSolid;
class MbSNameMaker;
class MbCurveEdge;
//----------------------------------------------------------------------------------------
@@ -55,4 +55,4 @@ MATH_FUNC (MbResultType) InterferenceSolids( MbSolid & solid1, MbSolid & solid2,
#endif // __CDET_BOOL_H
// eof
// eof
+129 -93
View File
@@ -10,13 +10,11 @@
#define __CDET_DATA_H
#include <templ_sptr.h>
#include <mb_cart_point.h>
#include <mb_operation_result.h>
#include <mb_matrix3d.h>
#include <topology.h>
#include <set>
#include <map>
class MbHRepSolid;
class CdSceneItem;
/**
\addtogroup Collision_Detection
@@ -24,19 +22,44 @@ class MbHRepSolid;
*/
//----------------------------------------------------------------------------------------
/// \ru Объект из набора контроля столкновений. \en Object from the set of collision detection.
/** \brief \ru Код результата контроля столкновений или измерений.
\en Codes of collision detection or measuring query.
*/
//---
typedef const MbHRepSolid * cdet_item;
typedef MbResultType cdet_result; ///< \ru Код результата контроля столкновений. \en Result code of collision queries.
enum CDM_result
{
/*
Attention: (!) Dont reorder codes because they are sorted by priority.
*/
CDM_RESULT_None,
/// \ru Успешный результат измерительного запроса (например, запрос на минимальное расстояние).
/// \en Successful result of a measurement request (for example, a distance query).
CDM_RESULT_MeasuringSucceed,
/// \ru Столкновний не выявлено. Пересечений нет или поиск был прерван.
/// \en No collision was detected. There are no intersections or the search was aborted.
CDM_RESULT_NoCollisionDetected,
/// \ru Выявлено хотя бы одно объемное пересечение (коллизия).
/// \en Volume intersection (collision) detected.
CDM_RESULT_CollisionDetected,
/// \ru Неизвестная ошибка или внутрисистемная ошибка.
/// \en Unknown error or internal system error.
CDM_RESULT_Error,
};
//----------------------------------------------------------------------------------------
// \ru Код результата контроля столкновений. \en Codes of collision detection.
/// \ru Объект из набора контроля столкновений. \en Object from the set of collision detection.
//---
const cdet_result CDET_RESULT_Intersected = rt_Intersect;
const cdet_result CDET_RESULT_NoIntersection = rt_NoIntersect;
const cdet_result CDET_RESULT_Ok = rt_Success;
const cdet_result CDET_RESULT_None = rt_None;
const cdet_result CDET_RESULT_Error = rt_Error;
typedef const CdSceneItem * cdet_item;
typedef CDM_result cdet_result; ///< \ru Код результата контроля столкновений. \en Result code of collision queries.
//----------------------------------------------------------------------------------------
// Codes of collision detection. Deprecated values, use CDM_result instead.
//---
const CDM_result CDET_RESULT_Intersected = CDM_RESULT_CollisionDetected;
const CDM_result CDET_RESULT_NoIntersection = CDM_RESULT_NoCollisionDetected;
const CDM_result CDET_RESULT_Ok = CDM_RESULT_MeasuringSucceed;
const CDM_result CDET_RESULT_None = CDM_RESULT_None;
const CDM_result CDET_RESULT_Error = CDM_RESULT_Error;
//----------------------------------------------------------------------------------------
// \ru Геометрический объект пользователя. \en User geometric item.
@@ -67,28 +90,31 @@ struct MATH_CLASS cdet_query
enum cback_res ///< Result code of the callback function
{
CBACK_VOID
, CBACK_SUFFICIENT ///< This code means that an app stops collision query for given pair of lumps
, CBACK_SKIP ///< Skip testing a given pair of the lumps
, CBACK_NEED ///< Enable testing a given pair of the lumps
, CBACK_BREAK ///< Break search of all collisions of the set
, CBACK_SUFFICIENT ///< This code means that an app stops collision query for the given pair of geometric objects.
, CBACK_SKIP ///< Skip testing the given pair.
, CBACK_NEED ///< Enable testing the given pair.
, CBACK_BREAK ///< Break search of all collisions of the set.
, CBACK_SEARCH_MORE = CBACK_VOID ///< This code notifies a collision detector to continue working at cases CDET_INTERSECTED, CDET_TOUCHED.
};
enum message ///< Code of notification
{
CDET_QUERY_STARTED // The collision query is started for the all solids
, CDET_STARTED // The collision query is started for the given pair
, CDET_FINISHED // Collision detector complete searching a collisions for the given pair of lumps.
, CDET_INTERSECTED // The collided pair of objects founded.
, CDET_TOUCHED // Touched faces has been founded with no penetration of the solids.
, CDET_INCLUDED // The included pair of objects founded.
CDET_NONE ///< No messages.
, CDET_QUERY_STARTED ///< The collision query is started for the all objects of the scene set.
, CDET_STARTED ///< The collision query is started for the given pair of geometric objects.
, CDET_FINISHED ///< Collision detector complete searching collisions for the given pair of geometric objects.
// The codes below indicates the intersection state for a pair.
, CDET_NO_INTERSECTION ///< Definitely the pair has no intersection (this enum value for internal use only).
, CDET_TOUCHED ///< Touched faces has been founded with no penetration of the solids.
, CDET_INTERSECTED ///< The collided pair of objects founded.
, CDET_INCLUDED ///< The included pair of objects founded.
};
struct geom_element ///< Structure representing a collision detection geometry.
{
cdet_app_item appItem;
const MbRefItem * refItem;
const MbMatrix3D * wMatrix;
cdet_app_item appItem; ///< Application pointer to a geometric object.
const MbRefItem * refItem; ///< Pointer to the collided face or grid.
const MbMatrix3D * wMatrix; ///< Matrix mapping the collided item to The world CS of the scene.
geom_element()
: appItem( nullptr )
, refItem( nullptr )
@@ -97,7 +123,7 @@ struct MATH_CLASS cdet_query
struct cback_data ///< Data structure that notifies an app about collision detection event.
{
geom_element first, second; ///< Pair of geometric objects
geom_element first, second; ///< Pair of geometric objects.
cback_data(): first(), second() {}
};
@@ -126,7 +152,7 @@ struct MATH_CLASS cdet_query_result: public cdet_query
cdet_query_result()
: cdet_query( QueryFunc )
, result( CDET_RESULT_NoIntersection )
, result( CDM_RESULT_NoCollisionDetected )
{}
cdet_query_result( const cdet_query_result & cQuery )
@@ -144,16 +170,16 @@ private:
{
case CDET_QUERY_STARTED: // The collision query is started for all solids of the scene.
{
q->result = CDET_RESULT_NoIntersection;
q->result = CDM_RESULT_NoCollisionDetected;
return CBACK_VOID;
}
case CDET_INTERSECTED: // First intersection is founded.
{
q->result = CDET_RESULT_Intersected;
q->result = CDM_RESULT_CollisionDetected;
return CBACK_SUFFICIENT;
}
case CDET_FINISHED: // A pair of solids is finished.
return (q->result == CDET_RESULT_Intersected) ? CBACK_BREAK : CBACK_VOID;
return (q->result == CDM_RESULT_CollisionDetected) ? CBACK_BREAK : CBACK_VOID;
default:
return CBACK_VOID;
@@ -236,8 +262,8 @@ public:
*/
void Group( cdet_app_item fst, cdet_app_item snd )
{
fst = _Parent( fst );
snd = _Parent( snd );
fst = PivoteItem_( fst );
snd = PivoteItem_( snd );
if ( fst < snd )
{
std::swap( fst, snd );
@@ -253,7 +279,7 @@ public:
void ExludeGroup( cdet_app_item member )
{
if ( excluded == CDET_APP_NULL )
excluded = _Parent( member );
excluded = PivoteItem_( member );
else
Group( excluded, member );
}
@@ -310,7 +336,7 @@ private:
return CBACK_VOID;
}
cdet_app_item _Parent( cdet_app_item appItem ) const
cdet_app_item PivoteItem_( cdet_app_item appItem ) const
{
std::map<cdet_app_item,cdet_app_item>::const_iterator iter = groups.find( appItem );
if ( iter == groups.end() || (iter->second == iter->first) )
@@ -319,12 +345,12 @@ private:
}
C3D_ASSERT( iter->second < iter->first );
return _Parent( iter->second );
return PivoteItem_( iter->second );
}
bool _SameGroups( cdet_app_item fst, cdet_app_item snd ) const
{
return _Parent( fst ) == _Parent( snd );
return PivoteItem_( fst ) == PivoteItem_( snd );
}
OBVIOUS_PRIVATE_COPY( cdet_collided_faces );
@@ -338,17 +364,17 @@ typedef enum
CDET_EXAM_EnableComponentsOnly // Test collisions between components only.
, CDET_EXAM_Enabled // Enable the pair to test collisions.
, CDET_EXAM_Disabled // Reject the collision test of the pair.
} CDET_exam_status;
} CDM_exam_status;
//----------------------------------------------------------------------------------------
//
//---
struct MATH_CLASS CDET_item_data
struct MATH_CLASS CDM_item_data
{
cdet_item comp; // Descriptor of the component owning the inctance.
cdet_item inst; // Descriptor of the instance.
cdet_app_item appItem; // Application pointer for the instance or the component.
CDET_item_data()
cdet_item comp = CDET_NULL; // Descriptor of the component owning the inctance.
cdet_item inst = CDET_NULL; // Descriptor of the instance.
cdet_app_item appItem = CDET_APP_NULL; // Application pointer for the instance or the component.
CDM_item_data()
{
comp = inst = CDET_NULL;
appItem = CDET_APP_NULL;
@@ -358,105 +384,115 @@ struct MATH_CLASS CDET_item_data
//----------------------------------------------------------------------------------------
//
//---
typedef CDET_exam_status (*CDET_exam_func)( cdet_query *, const CDET_item_data &, const CDET_item_data & );
typedef CDM_exam_status (*CDM_exam_func)( cdet_query *, const CDM_item_data &, const CDM_item_data & );
typedef double (*CDM_tolerance_func)( cdet_query *, const CDM_item_data & );
/** \} */ // Collision_Detection
class TapeBase;
class MbFace;
//----------------------------------------------------------------------------------------
/* \brief \ru Грань столкновения. \en A face of collision. \~
/** \brief \ru Грань столкновения. \en Face of collision. \~
*/
// ---
class MATH_CLASS MbCollisionFace
class MATH_CLASS CdCollisionFace
{
cdet_item item; // The instance to witch the face belongs.
const MbFace * mathFace; // The topological face identified in the collision detection or proximity query.
TapeBase * partFace; // The face of the application representation.
cdet_item item; // The instance to witch the face belongs.
SPtr<const MbFace> mathFace; // The topological face identified in the collision detection or proximity query.
TapeBase* partFace; // The face of the application representation.
public:
MbCollisionFace( const MbFace & f )
CdCollisionFace();
CdCollisionFace(const MbFace& face)
: item( CDET_NULL )
, mathFace( &f )
, mathFace( &face )
, partFace( nullptr )
{}
const MbFace & Face() const { return *mathFace; }
cdet_item Item() const { return item; }
const MbFace & GetMathFace() const { return *mathFace; }
{}
CdCollisionFace(const CdCollisionFace&) = default;
CdCollisionFace(CdCollisionFace&& other);
public:
const MbFace& Face() const { return *mathFace; }
cdet_item Item() const { return item; }
const MbFace& GetMathFace() const { return Face(); }
// \ru Установка объекта модели. \en Setting an object of model.
void SetCollisionFaceObject( TapeBase * _partFace ) { partFace = _partFace; }
void SetCollisionFaceObject(TapeBase* _partFace) { partFace = _partFace; }
// \ru Выдача объекта модели. \en Getting an object of model.
TapeBase * GetCollisionFaceObject() const { return partFace; }
// \ru Задать грань и компонент-вставку, которой принадлежит. \en Set a face and its component-instance.
MbCollisionFace & SetFace( const MbFace * f, cdet_item inst )
CdCollisionFace & SetFace( const MbFace * f, cdet_item inst )
{
mathFace = f;
item = inst;
return *this;
}
MbCollisionFace & operator = ( const MbCollisionFace & other )
CdCollisionFace & operator = ( const CdCollisionFace & other )
{
item = other.item;
mathFace = other.mathFace;
partFace = other.partFace;
return *this;
}
bool operator > ( const MbCollisionFace & other ) const { return mathFace > other.mathFace; }
bool operator < ( const MbCollisionFace & other ) const { return mathFace < other.mathFace; }
bool operator == ( const MbCollisionFace & other ) const { return mathFace == other.mathFace; }
bool operator != ( const MbCollisionFace & other ) const { return !(*this == other); }
bool operator > ( const CdCollisionFace & other ) const { return mathFace > other.mathFace; }
bool operator < ( const CdCollisionFace & other ) const { return mathFace < other.mathFace; }
bool operator == ( const CdCollisionFace & other ) const { return mathFace == other.mathFace; }
bool operator != ( const CdCollisionFace & other ) const { return !(*this == other); }
private:
MbCollisionFace( const MbCollisionFace & ); // not implemented
};
//----------------------------------------------------------------------------------------
// \ru Параметры (характеристика) близости двух объектов. \en Parameters (characteristic) of proximity of two objects.
/** \brief \ru Параметры запроса и результат измерения расстояния между двух объектов.
\en Parameters and the result of the query to measure distance between geometric objects. \~
*/
// ---
class MATH_CLASS MbProximityParameters
class MATH_CLASS CdProximityParameters
{
MbCollisionFace * theFace1;
MbCollisionFace * theFace2;
SPtr<const MbFace> plane;
CdCollisionFace m_face1;
CdCollisionFace m_face2;
public:
MbCartPoint3D fstPnt, sndPnt; // \ru Пара точек близости, принадлежащие триангуляционным сеткам. \en The points of the proximity belonging to the triangulation grids.
MbCartPoint thePar1, thePar2; // \ru Пара точек близости, заданная в поверхностных координатах граней. \en The points of the proximity specified in the surface coordinates of the faces.
double theDistance; // \ru Расстояние. \en Distance.
double upperDist; // \ru Верхняя оценка для поиска минимальной дистанции. \en The upper bound of the minimal distance estimation.
public:
MbProximityParameters();
~MbProximityParameters();
protected:
MbProximityParameters( const MbFace & topoFace1
, const MbFace & topoFace2
, MbCartPoint & par1
, MbCartPoint & par2
, double dist );
CdProximityParameters();
CdProximityParameters(const CdProximityParameters&) = default;
CdProximityParameters(CdProximityParameters&&) = default;
CdProximityParameters& operator = (const CdProximityParameters&) = default;
~CdProximityParameters();
public:
const MbCollisionFace & FaceOne() const { return *theFace1; }
const MbCollisionFace & FaceTwo() const { return *theFace2; }
const CdCollisionFace & FaceOne() const { return m_face1; }
const CdCollisionFace & FaceTwo() const { return m_face2; }
void SetFacePair( const MbFace &, const MbFace & );
void SetFacePair( const MbFace *, cdet_item, const MbFace *, cdet_item );
private:
MbProximityParameters( const MbProximityParameters & ); // not implemented
MbProximityParameters & operator = ( const MbProximityParameters & ); // not implemented
/// \ru Сбросить результат измерения в неопределенное состояние. \en Reset the measured result to the undefined state.
CdProximityParameters & Reset(double _upperDistance = MB_MAXDOUBLE);
protected:
CdProximityParameters(const MbFace&, const MbFace&, const MbCartPoint& uv1, const MbCartPoint& uv2, double dist);
};
//----------------------------------------------------------------------------------------
// \ru Сбросить результат измерения в неопределенное состояние. \en Reset the measured result to the undefined state.
//---
inline CdProximityParameters& CdProximityParameters::Reset(double _upperDistance)
{
m_face1.SetFace(nullptr, CDET_NULL);
m_face2.SetFace(nullptr, CDET_NULL);
fstPnt = sndPnt = MbCartPoint3D::origin;
thePar1 = thePar2 = MbCartPoint::origin;
theDistance = -1.0;
upperDist = _upperDistance;
return *this;
}
// deprecated typenames.
using MbHRepSolid = CdSceneItem;
using MbCollisionFace = CdCollisionFace;
using MbProximityParameters = CdProximityParameters;
#endif // __CDET_DATA_H
// eof
// eof
+90 -67
View File
@@ -9,8 +9,9 @@
#ifndef __CDET_UTILITY_H
#define __CDET_UTILITY_H
#include <cdet_data.h>
#include <mt_ref_item.h>
#include <cdm_types.h>
#include <conv_res_type.h>
#include <tool_cstring.h>
class MtRefItem;
class MbItem;
@@ -18,7 +19,7 @@ class MbSolid;
class MbMesh;
class MbAssembly;
struct MbLumpAndFaces;
class MbCollisionDetector;
class CdCollisionManager; // Internal implementation of the collision detection module.
/**
\addtogroup Collision_Detection
@@ -26,8 +27,8 @@ class MbCollisionDetector;
*/
//----------------------------------------------------------------------------------------
/** \brief \ru Утилита расчета параметров пересечения и близости тел.
\en Utility for calculation of intersection and proximity parameters of solids. \~
/** \brief \ru Утилита для поиска столкновений и запросов на измерения расстояний.
\en Collision search and distance measurement query utility. \~
\details \ru Предоставляет функциональность Collision Detection для взаимодействия
с приложением САПР.
\en Provides facilities of The Collision Detection to interact with the CAD
@@ -41,13 +42,19 @@ class MbCollisionDetector;
state, i.e. from the beginning. \~
*/
// ---
class MATH_CLASS MbCollisionDetectionUtility
class MATH_CLASS CdCollisionDetection
{
MbCollisionDetector & detector;
CdCollisionManager * m_manager;
public:
MbCollisionDetectionUtility();
~MbCollisionDetectionUtility();
CdCollisionDetection();
~CdCollisionDetection();
public:
/** \brief \ru Выдать сцену геометрического поиска, которую обслуживает модуль столкновений.
\en Get a geometric search scene, which is served by the collision detection utility. \~
*/
cdet_scene Scene() const;
public:
/**
@@ -61,33 +68,25 @@ public:
\en Add a ray with given vertex, direction and placement to the collision detection set. \~
\return \ru Дескриптор объекта для контроля столкновений. \en Descriptor of object for collision detection. \~
*/
cdet_item AddRay( const MbCartPoint3D & vertex, const MbVector3D & direction, const MbPlacement3D & place, cdet_app_item appItem = CDET_APP_NULL );
cdet_item AddRay( const MbCartPoint3D & vertex, const MbVector3D & direction,
const MbPlacement3D & place, cdet_app_item appItem = CDET_APP_NULL );
/**
\brief \ru Добавить полигональный объект с заданным положением в набор для контроля столкновений.
\en Add a poligonal object with given placement to the collision detection set. \~
\return \ru Дескриптор объекта для контроля столкновений. \en Descriptor of object for collision detection. \~
*/
cdet_item AddMesh( const MbMesh & mesh
, const MbPlacement3D & place
, cdet_app_item appItem = CDET_APP_NULL
, double gap = 0. );
/**
\brief \ru Добавить новый компонент контроля соударений и параметров близости.
\brief \ru Добавить новый компонент контроля столкновений и параметров близости.
\en Add a new component to track collisions and proximity parameters. \~
\details \ru Компонент позволяет объединять тела в геометрически-жесткие множества.
\en Component is able to unite solids into the rigid geometric sets.
*/
cdet_item AddComponent( cdet_app_item );
/**
\brief \ru Добавить новый экземпляр тела в компонент контроля соударений.
\brief \ru Добавить новый экземпляр тела в компонент контроля столкновений.
\en Add a new instance of a reused solid into the component. \~
\param[in] compItem - \ru Компонент, которому будет принадлежать экземпляр.
\en A component to witch the instance will belong.
\param[in] solidItem - \ru Оригинальное тело, добавленное методом #AddSolid, по которому изготавливается экземпляр.
\en An original solid added by the method #AddSolid by witch the instance is made.
\param[in] solidItem - \ru Оригинальное тело, добавленное методом #AddItem, по которому изготавливается экземпляр.
\en An original solid added by the method #AddItem by which the instance is made.
\param[in] place - \ru Положение, которое занимает тело экземпляра в глобальной СК.
\en The placement that the instance solid takes in global space.
\return \ru Новый экземпляр тела, зарегистрированный в аппарате контроля соударений.
\return \ru Новый экземпляр тела, зарегистрированный в аппарате контроля столкновений.
\en The new solid instance registered in the detector.
\note \ru Значение compItem может быть нулевым. Значит просто вставка не будет
принадлежать ни одному компоненту.
@@ -95,6 +94,25 @@ public:
instance does not belong to any component.
*/
cdet_item AddInstance( cdet_item compItem, cdet_item solidItem, const MbPlacement3D & place );
/**
\brief \ru Добавить новый экземпляр тела по образцу в компонент контроля столкновений.
\en Add a new instance of a reused solid into the component. \~
\param[in] compItem - \ru Компонент, которому будет принадлежать экземпляр.
\en A component to witch the instance will belong.
\param[in] mbItem - \ru Оригинальное тело, по которому изготавливается экземпляр.
\en An original solid by which the instance is made.
\param[in] place - \ru Положение, которое занимает тело экземпляра в глобальной СК.
\en The placement that the instance solid takes in global space.
\param[in] appItem - \ru Геометрический объект пользователя. \en User geometric item.
\return \ru Новый экземпляр тела, зарегистрированный в сцене контроля столкновений.
\en The new solid instance registered in the detector.
\note \ru Значение compItem может быть нулевым. Значит просто вставка не будет
принадлежать ни одному компоненту.
\en The value compItem can be CDET_NULL. This just means that the
instance does not belong to any component.
*/
cdet_item AddInstance( cdet_item compItem, const MbItem* mbItem
, const MbPlacement3D & place, cdet_app_item appItem = CDET_APP_NULL );
/**
\brief \ru Удалить геометрический объект из набора для контроля столкновений.
\en Remove a geometric object from the set of collision detection. \~
@@ -106,26 +124,47 @@ public:
*/
void Reposition( cdet_item, const MbPlacement3D & );
/**
\brief \ru Проверить соударения между геометрическими объектами набора.
\brief \ru Проверить столкновения между геометрическими объектами набора.
\en Check collisions between geometric objects of the set. \~
\return \ru Функция вернет CDET_RESULT_Intersected при обранужении хотя бы одной коллизии.
\en The function will return CDET_RESULT_Intersected if it detects at least one collision.
\return \ru Функция вернет CDM_RESULT_CollisionDetected при обранужении хотя бы одной коллизии.
\en The function will return CDM_RESULT_CollisionDetected if it detects at least one collision.
*/
cdet_result CheckCollisions( cdet_query & );
/**
\brief \ru Проверить соударения между геометрическими объектами набора.
\brief \ru Проверить столкновения между геометрическими объектами набора.
\en Check collisions between geometric objects of the set. \~
\return \ru Функция вернет CDET_RESULT_Intersected при обранужении хотя бы одной коллизии.
\en The function will return CDET_RESULT_Intersected if it detects at least one collision.
\return \ru Функция вернет CDM_RESULT_CollisionDetected при обранужении хотя бы одной коллизии.
\en The function will return CDM_RESULT_CollisionDetected if it detects at least one collision.
*/
cdet_result CheckCollisions();
/**
\brief \ru Выдать дескриптор клиентского приложения по дескриптору контрольного набора столкновений.
\en Get an application pointer by descriptor of the collision detection set.
*/
cdet_app_item AppItem( cdet_item cdItem ) const;
/**
\brief \ru Задать отклонение размеров тела наружу либо внутрь оболочки на величину допуска.
\en Set the allowed deviation of the solid size inside or outside the shell. \~
\param[in] cqItem - \ru Экземпляр сцены, как объект проверки на столкновение с другими.
\en An scene instance as an object to check collisions with others.
\param[in] delta - \ru Предельное отклонение размеров геометрического объекта от своего номинального размера.
\en The maximum deviation of a geometric object size from its nominal size.
\details \ru Величина отклонения может быть положительной или отрицательной, и определяет допуск,
влияющий на результат метода #CheckCollisions. Отрицательное отклонение (delta < 0)
определяет максимальную глубину пересечения с телом, чтобы не засчитывать столкновение.
Положительное отклонение (delta>0) определяет минимальное расстояние до тела,
с которым не засчитывается столкновение.
\en The delta value can be positive or negative, and defines the tolerance that affects
the #CheckCollisions result. A negative delta (delta < 0) defines the maximum interference depth
with a solid to count a status "no collision".
A positive delta (delta>0) defines the minimum distance to an object to count a status "no collision".
\note \ru По умолчанию каждое тело имеет нулевое отклонение размеров (delta = 0).
\en By default, each body has a zero size deviation (delta = 0).
\return \ru Функция вернет CDM_PARAMETER_Changed при успешной смене параметра настройки.
\en The function returns CDM_PARAMETER_Changed if the tolerance parameter was successfully changed.
*/
cdet_setting_result SetToleranceDelta( cdet_item cqItem, double delta );
public: // the functions below can be deprecated in future version.
/*
@@ -134,8 +173,8 @@ public: // the functions below can be deprecated in future version.
\return \ru Внутренняя структура данных представляющая добавленную модель. \en Internal data structure representing added solid data. \~
*/
cdet_item AddSolid( const MbLumpAndFaces & );
/// \ru Добавить тело с заданным положением. \en Add a solid with a given placement.
cdet_item AddSolid( const MbSolid &, const MbPlacement3D &, cdet_app_item = CDET_APP_NULL, double gap = 0. );
/// \note \ru Вызов устарел. Вместо него используйте AddInstance. \en The call is deprecated. Use AddInstance instead. \~
cdet_item AddMesh( const MbMesh & mesh, const MbPlacement3D & place, cdet_app_item appItem = CDET_APP_NULL, double delta = 0. );
/// \ru Удалить твердотельную модель или луч из детектора столкновений. \en Remove a solid model or ray from a collision detector.
void RemoveSolid( cdet_item );
/// \ru Выдать количество добавленных твердотельных моделей или лучей. \en Get number of added solid models or rays.
@@ -143,13 +182,13 @@ public: // the functions below can be deprecated in future version.
/// \ru Номер твердотельной модели или луча, зарегистрированной в детекторе. \en An index of solid model or ray registered in the detector.
size_t SolidIndex( cdet_item cItem ) const;
/// \ru Вычисление минимального расстояния между объектами (см.функцию #SetDistanceTracking) \en Calculation of minimal distance between objects (see the function #SetDistanceTracking)
cdet_result DistanceQuery( MbProximityParameters & ) const;
/// \ru Вычисление минимального расстояния между объектами
cdet_result DistanceQuery( cdet_item, cdet_item, MbProximityParameters & ) const;
cdet_result DistanceQuery( CdProximityParameters & ) const;
/// \ru Вычисление минимального расстояния между объектами \en Calculation of minimal distance between objects. \~
cdet_result DistanceQuery( cdet_item, cdet_item, CdProximityParameters & ) const;
/// \ru Выключить из рассмотрения все модели. \en Exclude all models from consideration.
void FlushSolids();
/// \ru Выдать иерархическое представление тела (CDET_NULL = отсутствие такового в списке). \en Get the hierarchical representation of the solid (CDET_NULL means that the solid is not in the list).
cdet_item GetHRepSolid ( const MbLumpAndFaces & ) const;
cdet_item GetHRepSolid( const MbLumpAndFaces & ) const;
/// \ru Задать барьер для отличия касания от пересечения. \en Set the barrier for the difference between the touch and the intersection.
void SetTouchTolerance( double lTol );
/// \ru Вкл./выкл. приближенного вычисления пересечений тел \en On/off approximated calculation of intersections of solids
@@ -160,49 +199,30 @@ public: // the functions below can be deprecated in future version.
void SetDistanceTracking( const MbLumpAndFaces &, const MbLumpAndFaces & );
/// \ru Обновить текущее положение тела или луча с индексом solIdx. \en Update current placement of solid or ray with index solIdx.
void SetPlacement( size_t solIdx, const MbPlacement3D & );
// \ru Объявление конструктора копирования и оператора присваивания без реализации, чтобы не было присваивания по умолчанию. \en The declaration without implementation of the copy-constructor and assignment operator to prevent an assignment by default.
OBVIOUS_PRIVATE_COPY( MbCollisionDetectionUtility );
/// \ru Экспортировать сцену поиска столкновений в модель C3D. \en Export collision detection scene into C3D model.
MbeConvResType ExportToC3D(const TCHAR * c3dFile);
public: /*
Deprecated and testing functions
*/
void SetCallback( CDET_exam_func );
void SetCallback( CDM_exam_func );
// Use AppItem() insead this
cdet_app_item Component( size_t solIdx ) const;
// The func is deprecated. Instead, use CheckCollisions
cdet_result InterferenceDetect( void * formalPar = nullptr ) const;
/*DEPRECATE_DECLARE*/ cdet_app_item Component(size_t solIdx) const; // It in use yet.
// The func is deprecated. Use SetDistanceTracking instead.
void SetDistanceComputationObjects( const MbLumpAndFaces &, const MbLumpAndFaces & );
void SetDistanceComputationObjects( const MbLumpAndFaces &, const MbLumpAndFaces & );
// The func is deprecated. Use AddSolid/AddItem instead.
size_t AddLump( const MbLumpAndFaces & );
size_t AddLump( const MbLumpAndFaces & );
// For testing purposes
bool IsEmpty( cdet_item ) const;
bool IsEmpty( cdet_item ) const;
// For testing purposes
const MtRefItem * _ComputeBVTree( cdet_item );
private:
/*
\brief \ru Добавить объект геометрической модели в набор для контроля столкновений.
\en Add an object of geometric model to the set of collision detection control. \~
\return \ru Объект в наборе для контроля столкновений. \en Object of the set of collision detection. \~
*/
cdet_item AddItem( const MbItem & );
// Set an assembly to detect collisions between its elements
void SetAssembly( const MbAssembly & );
void UpdateGeometry();
OBVIOUS_PRIVATE_COPY( CdCollisionDetection );
};
//----------------------------------------------------------------------------------------
// Default implemention of the call CheckCollisions.
//---
inline cdet_result MbCollisionDetectionUtility::CheckCollisions()
{
cdet_query_result defaultQuery;
return CheckCollisions( defaultQuery );
}
/// \ru Узел дерева объемов. \en A node of the bounding volume tree.
typedef const MtRefItem * cdet_bvt_node;
/// \ru Пустое дерево объемов. \en An empty bounding volume tree.
@@ -225,8 +245,11 @@ MATH_FUNC(cdet_bvt_pair) BvtSubNodes( cdet_item, cdet_bvt_node );
//---
MATH_FUNC(void) GetOrientedBox( cdet_item, cdet_bvt_node, MbMatrix3D & );
// deprecated typename since 2025.05. Use CdCollisionDetection instead.
using MbCollisionDetectionUtility = struct {};
#endif // __CDET_UTILITY_H
/** \} */
// eof
// eof
+196
View File
@@ -0,0 +1,196 @@
//////////////////////////////////////////////////////////////////////////////////////////
/**
\file
\brief \ru Программный интерфейс модуля обнаружения столкновений.
\en Program interface of collision detection module. \~
*/
//////////////////////////////////////////////////////////////////////////////////////////
#ifndef __CDM_API_H
#define __CDM_API_H
#include <cdm_types.h>
#include <solid.h>
#include <conv_res_type.h>
class MtRefItem;
/**
\addtogroup Collision_Detection
\{
*/
/*
Creation and removing a scene of collision detection.
*/
//----------------------------------------------------------------------------------------
/**
\brief \ru Создать пустую сцену детектора столкновений.
\en Create an empty collision detection scene. \~
\return \ru Дескриптор сцены детектора столкновений и запросов на близость тел.
\en Descriptor of collision detection scene and proximity queries. \~
*/
//---
MATH_FUNC(cdet_scene) CDM_CreateScene();
//----------------------------------------------------------------------------------------
/**
\brief \ru Удалить сцену детектора столкновений.
\en Delete collision detection scene. \~
\details \ru Данный метод освобождает память от внутренних структур данных, обслуживающих
детектор столкновений. Удаляемая сцена становится недействительной после
данного вызова.
\en This method releases memory from internal data structures maintaining
the collision detector. The removed collision scene is invalidated after this call. \~
\param[in] scn - \ru Сцена запросов на столкновения и близость тел.
\en Scene of the collision and proximity queries. \~
*/
//---
MATH_FUNC(void) CDM_RemoveScene( cdet_scene scn );
//---------------------------------------------------------------------------------------
/**
\brief \ru Добавить новый компонент в сцену детектора столкновений и задать параметры близости.
\en Add a new component to the collision detector scene and set proximity parameters. \~
\param[in] comp - \ru Компонент, являющийся геометрическим объединением тел или
полигональных объектов, наделенный собственной локальной системой координат.
\en A component that is a geometric union of bodies or polygonal objects. It have
its own local coordinate system. \~
\return \ru Новый компонет, зарегистрированный в сцене детектора столкновений.
\en New component registered in the collision detector scene. \~
\details \ru Компонент позволяет объединять тела в геометрически-жесткие множества.
\en Component is able to unite solids into the rigid geometric sets. \~
*/
//---
MATH_FUNC(cdet_item) CDM_AddComponent( cdet_scene scn, const CDM_component & comp );
//---------------------------------------------------------------------------------------
/**
\brief \ru Добавить экземпляр тела с заданным положением в сцену для детектора столкновений.
\en Add a solid with given placement to the collision detection scene. \~
\param[in] inst - \ru Запись экземпляра геометрического объекта (полигональное или граничное представление).
\en The instance record of geometric object (polygonal or boundary representation). \~
\return \ru Дескриптор объекта для детектора столкновений.
\en Descriptor of object for collision detection. \~
\details
\par \ru Повторно-используемые элементы сцены
\en Reused scene elements. \~
\ru Один и тот же экземпляр класса 'MbItem' может быть добавлен в сцену сколько угодно раз с помощью данного вызова.
При многократном добавлении одного и того же геометрического объекта детектор столкновений создает только одну
поисковую структуру данных (BVT). Ресурсы памяти и времени вычислений, потраченные на создание такой структуры,
повторно используется для всех экземпляров сцены, основанные на одном и том же объекте 'MbItem'. \~
\en The same instance of the 'MbItem' class can be added to the scene as many times as necessary using this call.
When the same geometric object is added multiple times, the collision detector creates only one
search data structure (BVT). The memory and computation time resources spent to create this structure,
are reused for all scene instances based on the same 'MbItem' object. \~
*/
//---
MATH_FUNC(cdet_item) CDM_AddInstance( cdet_scene scn, const CDM_instance & inst );
//---------------------------------------------------------------------------------------
/**
\brief \ru Добавить новый экземпляр тела в компонент детектора столкновений.
\en Add a new instance of a reused solid into the component of the collision detector. \~
\param[in] compItem - \ru Компонент, которому будет принадлежать экземпляр.
\en A component to witch the instance will belong. \~
\param[in] inst - \ru Запись экземпляра геометрического объекта (полигональное или граничное представление).
\en The instance record of geometric object (polygonal or boundary representation). \~
\return \ru Дескриптор экземпляра тела, зарегистрированный в сцене детектора столкновений.
\en Descriptor of solid instance registered in the detector. \~
\note \ru Значение compItem может быть нулевым. Значит просто вставка не будет
принадлежать ни одному компоненту.
\en The value compItem can be CDM_NULL. This just means that the
instance doesn't belong to any component. \~
*/
//---
MATH_FUNC(cdet_item) CDM_AddInstance( cdet_scene scn, cdet_item compItem, const CDM_instance & inst );
//---------------------------------------------------------------------------------------
/**
\brief \ru Удалить геометрический объект из сцены детектора столкновений.
\en Remove a geometric object from the scene of collision detector. \~
\param[in] scnItem - \ru Дескриптор объекта в сцене детектора столкновений.
\en Decriptor of object in collision detector scene. \~
*/
//---
MATH_FUNC(void) CDM_RemoveItem( cdet_scene scn, cdet_item scnItem );
//---------------------------------------------------------------------------------------
/**
\brief \ru Поменять текущее положение геометрического объекта в сцене.
\en Change current position of a geometric object. \~
\param[in] scnItem - \ru Дескриптор объекта в сцене детектора столкновений.
\en Decriptor of object in collision detector scene. \~
\param[in] place - \ru Положение, которое занимает объект в глобальной СК.
\en The placement that the object takes in global space. \~
*/
//---
MATH_FUNC(void) CDM_Reposition( cdet_scene scn, cdet_item scnItem, const MbPlacement3D & place );
//---------------------------------------------------------------------------------------
/**
\brief \ru Запросить поиск столкновений между элементами сцены.
\en Request a collision search between scene elements. \~
\return \ru Коды результата детектора столкновений и измерение расстояния.
\en Collision control result codes and distance measurement. \~
\details
\ru Осуществляется поиск столкновения между элементами сцены согласно запроса `cdQuery`,
а именно проверяются пары, как на уровне сборки, включая компоненты целиком, так и
на уровне отдельных компонент. Клиентское приложение имеет возможность настроить запрос
так, чтобы искать столкновения не всех со всеми, а только между группами объектов.
\en The search for collisions between scene elements is performed according to the `cdQuery`
structure, namely, pairs are checked both at the root level, including entire components,
and at the level within a component. The client application has the ability to configure
the query so as to search not for collisisons "all with all", but only between groups of objects. \~
*/
//---
MATH_FUNC(cdet_result) CDM_CheckCollisions( cdet_scene scn, cdet_query & cdQuery );
//---------------------------------------------------------------------------------------
/**
\brief \ru Проверить столкновения между геометрическими объектами сцены.
\en Check collisions between geometric objects of the scene. \~
\return \ru Коды результата детектора столкновений и измерение расстояния.
\en Collision control result codes and distance measurement. \~
*/
//---
MATH_FUNC(cdet_result) CDM_CheckCollisions( cdet_scene scn );
//---------------------------------------------------------------------------------------
/**
\brief \ru Выдать дескриптор клиентского приложения по дескриптору объекта сцены детектора столкновений.
\en Get an application pointer by object descriptor of the collision detector scene. \~
\param[in] scnItem - \ru Дескриптор объекта в сцене детектора столкновений.
\en Object descriptor in the collision detector scene. \~
\return \ru Дескриптор клиентского приложения.
\en Descriptor of client application. \~
*/
//---
MATH_FUNC(cdet_app_item) CDM_AppItem( cdet_scene scn, cdet_item scnItem );
//---------------------------------------------------------------------------------------
/**
\brief \ru Экспортировать сцену детектора столкновений в модель C3D.
\en Export collision detector scene into C3D model. \~
\param[in] c3dFile - \ru Имя файла.
\en The name of the file. \~
\return \ru Результат конвертирования.
\en Result of converting operation. \~
*/
//---
MATH_FUNC(MbeConvResType) CDM_ExportToC3D( cdet_scene scn, const TCHAR * c3dFile );
//---------------------------------------------------------------------------------------
/**
\brief \ru Исключить из рассмотрения все модели.
\en Exclude all models from consideration. \~
*/
//---
MATH_FUNC(void) CDM_ClearScene( cdet_scene scn );
/** \} */ // Collision_Detection
#endif // __CDM_API_H
// eof
+118
View File
@@ -0,0 +1,118 @@
//////////////////////////////////////////////////////////////////////////////////////////
/**
\file
\brief \ru Типы данных модуля обнаружения столкновений.
\en Data types of collision detection module. \~
*/
//////////////////////////////////////////////////////////////////////////////////////////
#ifndef __CDM_TYPES_H
#define __CDM_TYPES_H
#include <cdet_data.h>
#include <model_item.h>
class CdCollisionManager;
/**
\addtogroup Collision_Detection
\{
*/
/*
Data structures of Collision Detection Basic API.
*/
typedef CdCollisionManager * cdet_scene;
//----------------------------------------------------------------------------------------
/** \brief \ru Результат смены настроек алгоритма поиска столкновений.
\en The result of changing the collision search settings. \~
*/
enum cdet_setting_result
{
/// \ru Параметр настройки изменен успешно.
/// \en The setting parameter was applied successfully.
CDM_PARAMETER_Applied = 1
/// \ru Параметр не удается сменить, поскольку он определяется функцией обратного вызова.
/// \en The parameter cannot be changed because it is defined by a callback function.
, CDM_PARAMETER_NotChanged
};
//---------------------------------------------------------------------------------------
// \ru Структура, определяющая экземпляр геометрического объекта (полигональное или граничное представление).
// \en The structure specifing the instance of geometric object (polygonal or boundary representation).
//---
struct CDM_instance
{
SPtr<const MbItem> sample = nullptr; // \ru Геометрический объект, являющийся образцом экземпляра. \en The geometric object that is a sample of the instance.
MbPlacement3D place = MbPlacement3D::global; // \ru Локальная система координат, указанная в компоненте-владельце экземпляра. \en The local coordinate system specified in the owning component of the instance.
cdet_app_item appItem = CDET_APP_NULL; // \ru Инстанс, представляющий экземпляр на стороне приложения. \en Application-side instance representative.
CDM_instance() = default;
CDM_instance(const CDM_instance & ) = default;
CDM_instance & operator= (const CDM_instance&) = default;
CDM_instance(const SPtr<MbItem> & mbItem, const MbPlacement3D & lcs, cdet_app_item aItem) : sample(mbItem), place(lcs), appItem(aItem) {};
};
//---------------------------------------------------------------------------------------
// \ru Компонентом является геометрическое объединение тел или полигональных объектов,
// наделенных собственной локальной системой координат.
// \en A component is a geometric union of bodies or polygonal objects which have their
// own local coordinate system.
struct CDM_component
{
MbPlacement3D place = MbPlacement3D::global; // \ru Локальная система координат, позиционирующая компонент. \en The local coordinate system positioning the component.
cdet_app_item appItem = CDET_APP_NULL; // \ru Инстанс, представляющий экземпляр на стороне приложения. \en Application-side instance representative.
CDM_component() = default;
CDM_component(const CDM_component & ) = default;
CDM_component & operator= (const CDM_component & ) = default;
CDM_component(const MbPlacement3D & lcs, cdet_app_item aItem) : place(lcs), appItem(aItem) {};
};
//---------------------------------------------------------------------------------------
// \ru Структура, определяющая луч в сцене детектора столкновений.
// \en The structure defining the ray in the collision detector scene.
struct CDM_ray
{
MbCartPoint3D origin = MbCartPoint3D::origin; // \ru Вершина луча. \en Vertex of ray.
MbVector3D axisZ = MbVector3D::zAxis; // \ru Направление луча. \en Direction of ray.
MbPlacement3D place = MbPlacement3D::global; // \ru Положение, которое занимает луч в глобальной СК. \en The placement that the ray takes in global space.
cdet_app_item appItem = CDET_APP_NULL; // \ru Геометрический объект пользователя. \en User geometric item.
CDM_ray() = default;
CDM_ray(const CDM_ray &) = default;
CDM_ray(const MbCartPoint3D & vertex, const MbVector3D & direction, const MbPlacement3D & lcs, cdet_app_item aItem)
: origin(vertex), axisZ(direction), place(lcs), appItem(aItem) {};
};
//---------------------------------------------------------------------------------------
// Callback enquiries
//---
typedef SPtr<MbItem> (*CDM_item_registered)( cdet_app_item appItem ); ///< Application item was registered in the scene.
typedef void (*CDM_item_unregistered)( cdet_app_item appItem ); ///< Application item was unregistered in the scene.
typedef bool (*CDM_abort)(); ///< Query to interrupt calculations
//----------------------------------------------------------------------------------------
/** \brief \ru Структура, объединяющая обратные вызовы детектора столкновений.
\en The structure uniting collision detection callbacks.
*/
//---
typedef struct
{
/*
General system callbacks;
*/
CDM_item_registered gRegister;
CDM_item_unregistered gUnregister;
CDM_abort abortFunc;
/*
Geometry properties
*/
} CDM_callback_table;
/** \} */ // Collision_Detection
#endif // __CDM_DATA_H
// eof
+343
View File
@@ -18,8 +18,10 @@
#include <topology.h>
#include <solid.h>
#include <point_frame.h>
#include <templ_dptr.h>
#include <vector>
#include <iterator>
#include <curve3d.h>
#include <utility>
@@ -1067,6 +1069,19 @@ MATH_FUNC (bool) RemoveEdgeSmoothnessAttributes( MbFaceShell & shell );
*/ //---
MATH_FUNC (const MbDoubleRangeAttribute *) GetEdgeSmoothnessAttribute( const MbCurveEdge & edge );
//------------------------------------------------------------------------------
/** \brief \ru Обновить атрибут гладкости ребра.
\en Update edge smoothness attribute. \~
\details \ru Обновить атрибут гладкости ребра.
\en Update edge smoothness attribute. \~
\param[in] edge - \ru Ребро, которое проверяем.
\en Edge to check. \~
\return \ru Возвращает true, если атрибут есть в ребре и обновлен.
\en Returns true if this attribute is present in the edge and is updated.\~
\ingroup Algorithms_3D
*/ //---
MATH_FUNC( bool ) UpdateEdgeSmoothnessAttribute( MbCurveEdge & edge );
//------------------------------------------------------------------------------
/** \brief \ru Проверить, вырожденная ли поверхность.
@@ -1091,4 +1106,332 @@ MATH_FUNC (const MbDoubleRangeAttribute *) GetEdgeSmoothnessAttribute( const MbC
*/ //---
MATH_FUNC (MbResultType) IsDegeneratedElementary( const MbSurface & inputSurface, double accuracy = Math::metricPrecision );
//------------------------------------------------------------------------------
/** \brief \ru Параметры проверки на самопересечение поверхности.
\en Parameters for checking surface self-intersection. \~
\details \ru Параметры проверки на самопересечение поверхности. \n
\en Parameters for checking surface self-intersection. \n \~
\warning \ru В разработке.
\en Under development. \~
\ingroup Algorithms_3D
*/
//---
class MATH_CLASS MbSurfaceSelfIntParams {
public:
/// \ru Метод проверки самопересечений. \en Method of self intersection checking.
enum class MbeCheckSelfIntMethod {
csim_Auto , ///< \ru Автоматический режим. \en Auto mode.
csim_UVLine , ///< \ru Вдоль uv линий. \en Along uv lines.
csim_SegmIntersect ///< \ru Сегментированное пересечение. \en Segmented intersection.
};
private:
MbeCheckSelfIntMethod _method; ///< \ru Метод проверки самопересечений. \en Method of self intersection checking.
c3d::DoubleVector _uParams; ///< \ru Набор u параметров поверхности. \en Set of u parameters of surface.
c3d::DoubleVector _vParams; ///< \ru Набор v параметров поверхности. \en Set of v parameters of surface.
bool _ext; ///< \ru Опция проверки на расширенной поверхности. \en Extended surface option.
const MbRect2D * _uvRange; ///< \ru Область uv для проверки. \en uv surface range for checking.
VERSION _version; ///< \ru Версия алгоритма. \en Algorithm version.
public:
mutable IProgressIndicator * _progress; ///< \ru Индикатор прогресса выполнения операции. \en A progress indicator of the operation.
public:
/// \ru Конструктор по умолчанию(автоматический режим). \en Default constructor(auto mode).
MbSurfaceSelfIntParams();
/** \brief \ru Конструктор проверки на самопересечение поверхности в автоматическом режиме.
\en Constructor of checking for self-intersection of surface automatically. \~
\details \ru Конструктор проверки на самопересечение поверхности в автоматическом режиме.
\en Constructor of checking for self-intersection of surface automatically. \~
\param[in] version - \ru Версия алгоритма.
\en Algorithm version. \~
\param[in] prog - \ru Индикатор прогресса выполнения операции.
\en A progress indicator of the operation.
*/
MbSurfaceSelfIntParams( VERSION version, IProgressIndicator * prog = nullptr );
/** \brief \ru Конструктор проверки на самопересечение поверхности вдоль вдоль uv линий.
\en Constructor of checking for self-intersection of surface along uv lines. \~
\details \ru Конструктор проверки на самопересечение поверхности вдоль вдоль uv линий.
\en Constructor of checking for self-intersection of surface along uv lines. \~
\param[in] uParams - \ru Набор u параметров поверхности.
\en Set of u parameters of surface. \~
\param[in] vParams - \ru Набор v параметров поверхности.
\en Set of v parameters of surface. \~
\param[in] ext - \ru Опция проверки на расширенной поверхности.
\en Extended surface option. \~
\param[in] uvRange - \ru Область uv для проверки.
\en uv surface range for checking \~
\param[in] version - \ru Версия алгоритма.
\en Algorithm version. \~
\param[in] prog - \ru Индикатор прогресса выполнения операции.
\en A progress indicator of the operation.
*/
MbSurfaceSelfIntParams( const c3d::DoubleVector & uParams,
const c3d::DoubleVector & vParams,
bool ext,
const MbRect2D * uvRange,
VERSION version,
IProgressIndicator * prog = nullptr );
/** \brief \ru Конструктор проверки на самопересечение поверхности путем сегментированного пересечения.
\en Constructor of checking for self-intersection of surface by segmented intersection. \~
\details \ru Конструктор проверки на самопересечение поверхности путем сегментированного пересечения.
\en Constructor of checking for self-intersection of surface by segmented intersection. \~
\param[in] umin - \ru Минимальный u параметр поверхности.
\en Minimal u parameter of surface. \~
\param[in] umax - \ru Максимальный u параметр поверхности.
\en Maximal u parameter of surface. \~
\param[in] vmin - \ru Минимальный v параметр поверхности.
\en Minimal v parameter of surface. \~
\param[in] vmax - \ru Максимальный v параметр поверхности.
\en Maximal v parameter of surface. \~
\param[in] prog - \ru Индикатор прогресса выполнения операции.
\en A progress indicator of the operation.
*/
MbSurfaceSelfIntParams( double umin, double umax, double vmin, double vmax, IProgressIndicator * prog = nullptr );
/// \ru Деструктор. \en Destructor.
~MbSurfaceSelfIntParams() {}
public:
/// \ru Получить метод проверки самопересечений. \en Get the method of self intersection checking.
MbeCheckSelfIntMethod GetMethod() const { return _method; }
/// \ru Получить набор u параметров поверхности. \en Get the set of u parameters of surface.
const c3d::DoubleVector & GetUParams() const { return _uParams; }
/// \ru Получить набор v параметров поверхности. \en Get the set of v parameters of surface.
const c3d::DoubleVector & GetVParams() const { return _vParams; }
/// \ru Получить опцию проверки на расширенной поверхности. \en Get the extended surface option.
bool GetExt() const { return _ext; }
/// \ru Получить uv область для проверки. \en Get uv surface range for checking.
const MbRect2D * GetUVRange() const { return _uvRange; }
/// \ru Получить версию алгоритма. \en Get the algorithm version.
VERSION GetVersion() const { return _version; }
OBVIOUS_PRIVATE_COPY( MbSurfaceSelfIntParams )
};
//------------------------------------------------------------------------------
/** \brief \ru Проверить, имеет ли поверхность самопересечения.
\en Check whether the surface is self-intersected. \~
\details \ru Проверить, имеет ли поверхность самопересечения.
\en Check whether the surface is self-intersected.\~
\param[in] surface - \ru Проверяемая поверхность.
\en Surface to check.\~
\param[in] params - \ru Параметры проверки на самопересечение.
\en Self-intersection checking parameters.\~
\return \ru Возвращает true, если поверхность имеет самопересечения.
\en Returns true if surface self-intersection is found. \~
\warning \ru В разработке.
\en Under development. \~
\ingroup Algorithms_3D
*/ //---
MATH_FUNC( bool ) IsSelfIntersectSurface( const MbSurface & surface,
const MbSurfaceSelfIntParams & params );
//------------------------------------------------------------------------------
/** \brief \ru Параметры проверки на самопересечение оболочки.
\en Parameters for checking shell self-intersection. \~
\details \ru Параметры проверки на самопересечение оболочки. \n
\en Parameters for checking shell self-intersection. \n \~
\warning \ru В разработке.
\en Under development. \~
\ingroup Algorithms_3D
*/
//---
class MATH_CLASS MbShellSelfIntParams {
public:
/// \ru Режим проверки самопересечений. \en Mode of self intersection checking.
enum class MbeCheckSelfIntMode
{
Auto , /// \ru Автоматический режим (проверять пересечение граней, включая самопересечения). \en Auto mode (check intersection of faces including self-intersections).
SelfIntFacesOnly , /// \ru Проверять только самопересечение граней. \en Check only self-intersection of faces.
IntDfferentFacesOnly /// \ru Проверять только пересечение различных граней. \en Check only the intersection of different faces.
};
private:
MbeCheckSelfIntMode _mode; ///< \ru Режим проверки самопересечений. \en Mode of self intersection checking.
VERSION _version; ///< \ru Версия алгоритма. \en Algorithm version.
std::unique_ptr<MbStepData> _stepData; ///< \ru Данные для вычисления шага при триангуляции. \en Data for step calculation during triangulation.
public:
mutable IProgressIndicator * _progress; ///< \ru Индикатор прогресса выполнения операции. \en A progress indicator of the operation.
public:
/// \ru Конструктор по умолчанию. \en Default constructor.
MbShellSelfIntParams();
/** \brief \ru Конструктор проверки на самопересечение оболочки.
\en Constructor of checking for self-intersection of shell. \~
\details \ru Конструктор проверки на самопересечение оболочки.
\en Constructor of checking for self-intersection of shell. \~
\param[in] version - \ru Версия алгоритма.
\en Algorithm version. \~
\param[in] prog - \ru Индикатор прогресса выполнения операции.
\en A progress indicator of the operation.
*/
MbShellSelfIntParams( VERSION version, IProgressIndicator * prog = nullptr );
/** \brief \ru Конструктор проверки на самопересечение оболочки.
\en Constructor of checking for self-intersection of shell. \~
\details \ru Конструктор проверки на самопересечение оболочки.
\en Constructor of checking for self-intersection of shell. \~
\param[in] mode - \ru Режим проверки самопересечений.
\en Mode of self intersection checking. \~
\param[in] version - \ru Версия алгоритма.
\en Algorithm version. \~
\param[in] prog - \ru Индикатор прогресса выполнения операции.
\en A progress indicator of the operation.
*/
MbShellSelfIntParams( MbeCheckSelfIntMode mode, VERSION version, IProgressIndicator * prog = nullptr );
/** \brief \ru Конструктор проверки на самопересечение оболочки с помощью анализа сеток.
\en Constructor of checking for self-intersection of shell by meshes check. \~
\details \ru Конструктор проверки на самопересечение оболочки с помощью анализа сеток.
\en Constructor of checking for self-intersection of shell by meshes check. \~
\param[in] stepData - \ru Данные для вычисления шага при триангуляции.
\en Data for step calculation during triangulation. \~
\param[in] version - \ru Версия алгоритма.
\en Algorithm version. \~
\param[in] prog - \ru Индикатор прогресса выполнения операции.
\en A progress indicator of the operation.
\warning \ru Пока не готово. \en Not yet ready.
*/
MbShellSelfIntParams( const MbStepData & stepData, VERSION version = Math::DefaultMathVersion(), IProgressIndicator * prog = nullptr );
/// \ru Деструктор. \en Destructor.
~MbShellSelfIntParams() {}
public:
/// \ru Получить режим проверки самопересечений. \en Get the mode of self intersection checking.
MbeCheckSelfIntMode GetMode() const { return _mode; }
/// \ru Установить режим проверки самопересечений. \en Set the mode of self intersection checking.
void SetMode( MbeCheckSelfIntMode mode ) { _mode = mode; }
/// \ru Получить версию алгоритма. \en Get the algorithm version.
VERSION GetVersion() const { return _version; }
// \ru Получить данные для расчета шага. \en Get data for the step calculation. \~
const MbStepData * GetStepData() const { return _stepData.get(); }
OBVIOUS_PRIVATE_COPY( MbShellSelfIntParams )
};
//------------------------------------------------------------------------------
/** \brief \ru Результаты проверки на самопересечение оболочки.
\en Results for checking sell self-intersection. \~
\details \ru Результаты проверки на самопересечение оболочки. \n
\en Results for checking sell self-intersection. \n \~
\warning \ru В разработке.
\en Under development. \~
\ingroup Algorithms_3D
*/
//---
class MATH_CLASS MbShellSelfIntResults {
private:
/** \brief \ru Результат пересечения/самопересечения граней.
\en Result of intersection/self-intersection of faces. \~
\details \ru Результат пересечения/самопересечения граней. Если '_facesIndices' содержат
одинаковые индексы, значит грань с данным индексом самопересекается.
Кривые пересечения не вычисляются для самопересечения и '_curves' будет пустым. \n
\en The result of intersection/self-intersection of edges. If '_facesIndices' contains
identical indices, which means the face with this index intersects itself.
Intersection curves are not calculated for self-intersection and '_curves' will be empty. \n \~
*/
struct SelfIntResult {
c3d::IndicesPair _facesIndices; ///< \ru Индексы пересекающихся/самопересекающихся граней. \en Indices of intersecting/self-intersecting faces.
c3d::SpaceCurvesSPtrVector _curves; ///< \ru Кривые пересечения граней. \en Face intersection curves.
/// \ru Конструктор по умолчанию. \en Default constructor.
SelfIntResult() {};
/// \ru Конструктор по копирования. \en Copy constructor.
SelfIntResult( const SelfIntResult & other );
/// \ru Оператор присваивания. \en Assignment operator.
SelfIntResult & operator =( const SelfIntResult & other );
/** \brief \ru Конструктор результата проверки на самопересечение пары граней.
\en Constructor of the result of checking for self-intersection of a pair of faces. \~
\details \ru Конструктор результата проверки на самопересечение пары граней.
\en Constructor of the result of checking for self-intersection of a pair of faces. \~
\param[in] faceIndex1 - \ru Индекс первой грани.
\en First face index. \~
\param[in] faceIndex2 - \ru Индекс второй грани.
\en Second face index. \~
\param[in] intCurves - \ru Указатель на вектор кривых пересечения двух граней.
\en Pointer to a vector of curves where two faces intersect. \~
*/
SelfIntResult( size_t faceIndex1, size_t faceIndex2, c3d::SpaceCurvesSPtrVector * intCurves = nullptr );
/// \ru Обмен. \en Swap.
void Swap( SelfIntResult & other );
};
private:
std::vector<SelfIntResult> _selfIntResults;
public:
/// \ru Конструктор по умолчанию. \en Default constructor.
MbShellSelfIntResults() {};
/// \ru Деструктор. \en Destructor.
~MbShellSelfIntResults() {};
public:
/// \ru Добавить результат самопересечения оболочки для пары граней. \en Add the result of self-intersection processing for a pair of faces.
void AddResult( size_t faceIndex1, size_t faceIndex2, c3d::SpaceCurvesSPtrVector * intersectionCurves = nullptr );
/** \brief \ru Получить результат самопересечения оболочки для пары граней по индексу.
\en Get the result of self-intersection processing for a pair of faces. \~
\details \ru Получить индексы пересекающихся/самопересекающихся граней и кривые пересечения
(для пары различных граней) по индексу. Если параметр 'intersectionCurves' - nullptr,
кривые пересечения не возвращаются. Если faceIndex1 == faceIndex2 значит грань
с индексом faceIndex1 самопересекается. Кривые пересечения не вычисляются и
'intersectionCurves' будет пустым.
\en Get indices of intersecting/self-intersecting faces and intersection curves
(for a pair of different faces) by index. If the 'intersectionCurves' parameter is nullptr,
intersection curves are not returned. If faceIndex1 == faceIndex2 means face
with the index faceIndex1 self-intersects. Intersection curves are not calculated and
'intersectionCurves' will be empty. \~
\param[in] index - \ru Индекс результата для пары граней.
\en Result index for a pair of faces. \~
\param[out] faceIndex1 - \ru Индекс первой грани.
\en First face index. \~
\param[out] faceIndex2 - \ru Индекс второй грани.
\en Second face index. \~
\param[out] intersectionCurves - \ru Указатель на вектор кривых пересечения двух граней.
Если intersectionCurves = nullptr - кривые пересечения
не возвращаются.
\en Pointer to a vector of curves where two faces intersect.
If intersectionCurves = nullptr - intersection curves
do not return. \~
\return \ru Возвращает:
false, если результата с заданным индексом не содержится;
true, если результата с заданным индексом найден;
\en Returns:
false, if there is no result with the given index;
true, if a result with the given index is found; \~
*/
bool GetResult( size_t index, size_t & faceIndex1, size_t & faceIndex2, c3d::SpaceCurvesSPtrVector * intersectionCurves ) const;
/// \ru Получить количество пар пересекающихся и самопересекающихся граней. \en Get the number of pairs of intersecting and self-intersecting faces.
size_t Count() const { return _selfIntResults.size(); }
/// \ru Установить значения по умолчанию. \en Set defaults.
void Reset() { _selfIntResults.clear(); };
/// \ru Зарезервировать размер массива пар пересекающихся и самопересекающихся граней. \en Reserve the size the array of pairs of intersecting and self-intersecting faces.
void ReserveResult( size_t count ) { _selfIntResults.reserve( count ); }
OBVIOUS_PRIVATE_COPY( MbShellSelfIntResults )
};
//------------------------------------------------------------------------------
/** \brief \ru Проверить оболочку на наличие самопересечений.
\en Check shell for self-intersections. \~
\details \ru Проверить оболочку на наличие самопересечений. Находит все кривые самопересечения оболочки.
\en Check shell for self-intersections. Finds all shell self-intersection curves.\~
\param[in] shell - \ru Оболочка, которую проверяем.
\en Shell to check.\~
\param[in] params - \ru Параметры проверки на самопересечение.
\en Self-intersection checking parameters.\~
\param[out] results - \ru Результаты проверки на самопересечение.
\en Self-intersection checking results.\~
\return \ru Возвращает:
false, если оболочка не имеет самопересечений;
true, если оболочка имеет самопересечения;
\en Returns:
false, if shell has no self-intersections;
true, if shell has self-intersections.\~
\warning \ru В разработке.
\en Under development. \~
\ingroup Algorithms_3D
*/ //---
MATH_FUNC( bool ) IsSelfIntersectShell( const MbFaceShell & shell,
const MbShellSelfIntParams & params,
MbShellSelfIntResults & results );
#endif // __CHECK_GEOMETRY_H
+3 -3
View File
@@ -19,8 +19,8 @@
#include <vector>
class MATH_CLASS MbMesh;
class MATH_CLASS MbGrid;
class MbMesh;
class MbGrid;
class MbGridTopology;
@@ -244,7 +244,7 @@ public:
/// \ru Выдать полигон с номером i. \en Get i-th polygon.
//const MbExactGrid & GetGrid ( size_t i ) const { return *grids[i]; }
/// \ru Удалить все xтреугольники. \en Delete all triangles.
/// \ru Удалить все треугольники. \en Delete all triangles.
void TrianglesDelete() { triangles.clear(); }
/// \ru Удалить все четырехугольники. \en Delete all quadrangles.
void QuadranglesDelete() { quadrangles.clear(); }
+2 -2
View File
@@ -17,8 +17,8 @@
#include <map>
class MATH_CLASS MpEdge;
class MATH_CLASS ProgressBarWrapper;
class MpEdge;
class ProgressBarWrapper;
class IProgressIndicator;
+39 -24
View File
@@ -13,6 +13,7 @@
#include <mb_placement.h>
#include <mb_placement3d.h>
#include <mb_pmi.h>
#include <conv_pmi_depricated_convert.h>
#include <vector>
#include <set>
@@ -541,30 +542,6 @@ typedef std::vector< SPtr<MaTextItem> > vector_of_text;
//------------------------------------------------------------------------------
/** \brief \ru Преобразовать элемент аннотации.
\en Transform annotation item. \~
*/
// ---
CONV_FUNC( SPtr<MbPMI> ) ConvertPMI( const MaAnnotationItem& it );
//------------------------------------------------------------------------------
/** \brief \ru Преобразовать элемент технического требования.
\en Transform technical requirements. \~
*/
// ---
CONV_FUNC( SPtr<MbPMI> ) ConvertTechnicalRequirements( const MaAnnotationItem& it );
//------------------------------------------------------------------------------
/** \brief \ru Преобразовать элемент аннотации.
\en Transform annotation item. \~
*/
// ---
CONV_FUNC( SPtr<MaAnnotationItem> ) ConvertPMI( const MbPMI& it );
//------------------------------------------------------------------------------
/** \brief \ru Размер - родоначальник классов для размеров различных типов.
\en Dimension is the parent of all classes for dimensions of different types. \~
@@ -854,6 +831,10 @@ public:
virtual Mae_AnnotationType IsA() const;
/// \ru Получить групповой тип объекта. \en Get the group type of the object.
virtual Mae_AnnotationType Type() const;
/// \ru Получить значение. \en Get the value.
double GetValue() const { return value; }
/// \ru Задать значение. \en Set the value.
void SetValue( const double val ) { value = val; }
OBVIOUS_PRIVATE_COPY( MaSurfaceCondition )
};
@@ -878,6 +859,10 @@ public:
virtual Mae_AnnotationType IsA() const;
/// \ru Получить групповой тип объекта. \en Get the group type of the object.
virtual Mae_AnnotationType Type() const;
/// \ru Получить значение. \en Get the value.
double GetValue() const { return value; }
/// \ru Задать значение. \en Set the value.
void SetValue( const double val ) { value = val; }
OBVIOUS_PRIVATE_COPY(MaShapeTolerance)
};
@@ -920,5 +905,35 @@ void MaAnnotationItem::GetAnnotationText( Out dest ) const {
std::copy( annotationText.begin(), annotationText.end(), dest );
}
//------------------------------------------------------------------------------
// Получить геометрию PMI
// ---
c3d::ItemsSPtrVector GetPMIGeometry( const MbPMI & it );
//------------------------------------------------------------------------------
// Получить строковое название спецсимвола
// ---
c3d::string_t PredefinedSymbolToString( const MbeDefinedDimensionSymbol & symb );
//------------------------------------------------------------------------------
// Получить спецсимвол из строки
// ---
bool StringToPredefinedSymbol( const c3d::string_t & txt, MbeDefinedDimensionSymbol & predefSymb );
//------------------------------------------------------------------------------
// Получить строковое название тэга форматирования
// ---
c3d::string_t TextTagToString( const MaeTextFormatTag & tag );
//------------------------------------------------------------------------------
// Получить тэг форматирования из строки
// ---
MaeTextFormatTag StringToTextTag( const c3d::string_t & txt );
//------------------------------------------------------------------------------
// Получить строковое название типа терминатора
// ---
c3d::string_t GetTerminatorTypeStr( const MbeDefinedTerminatorSymbol termTrype );
#endif // __CONV_ANNOTATION_ITEM_H
+157 -54
View File
@@ -14,8 +14,11 @@
#include <math_define.h>
#include <mb_placement3d.h>
#include <mb_data.h>
#include <op_mesh_parameter.h>
#include <conv_predefined.h>
#include <reference_item.h>
#include <conv_requestor.h>
#include <attribute_item.h>
#include <tool_cstring.h>
#include <map>
@@ -126,7 +129,11 @@ enum MbeIOPermiss {
iop_rValidationProperties, ///< \ru Разрешение на чтение контрольных параметров - объёма, площади поверхности, центра масс. \en Import validation properties - volume, surface area, centroid.
iop_wValidationProperties, ///< \ru Разрешение на запись контрольных параметров - объёма, площади поверхности, центра масс. \en Export validation properties - volume, surface area, centroid.
iop_rStyle, ///< \ru Разрешение на чтение элементов оформления (цвет, начертание, и т.п.). \en Import appearance.
iop_wStyle, ///< \ru Разрешение на запись элементов оформления (цвет, начертание, и т.п.). \en Export appearance.
iop_wStyle, ///< \ru Разрешение на запись элементов оформления (цвет, начертание, и т.п.). \en Export appearance
iop_rCS, ///< \ru Разрешение на чтение систем координат. \en Import coordinate sistems.
iop_wCS, ///< \ru Разрешение на запись систем координат. \en Export coordinate sistems.
iop_rBounds, ///< \ru Разрешение на чтение объектов, ограничивающих объем или площадь. \en Import items that is the boundary of an area or volume.
iop_wBounds, ///< \ru Разрешение на запись объектов, ограничивающих объем или площадь. \en Export items that is the boundary of an area or volume.
iop_END
};
@@ -283,7 +290,8 @@ enum eMsgDetail {
emd_PluginGeneralProblem, ///< \ru Сбой общего характера в плагине. \en General plugin fault.
emd_PluginLicenceProblem, ///< \ru Ошибка активации плагина. \en Plugin couldn't be activated.
emd_PluginFunctionalityLimitation ///< \ru Плагин не обладает требуемой функциональностью. \en Plugin' funtionality doesn't cover the required case.
emd_PluginFunctionalityLimitation, ///< \ru Плагин не обладает требуемой функциональностью. \en Plugin' funtionality doesn't cover the required case.
emd_PluginImportPartialSuccess /// \ru Модель частично импортирована через плагин. \en Model was partially imported via the plugin.
};
@@ -309,11 +317,11 @@ enum eMsgDetail {
*/
struct C3DConverterDebugSettings {
/// \ru Включить вывод отладочной информации в CERR. \en Enable debug info out into the CERR stream.
bool enableCERRout;
bool enableCERRout { false };
/// \ru Включить вывод обхода дерева модели, реализованной на стороне пользователя. \en Enable logging the traverse of the user-implemented model tree.
bool cerrOutUserTreeTraverse;
bool cerrOutUserTreeTraverse { false };
/// \ru Включить вывод обхода промежуточного дерева модели. \en Enable logging the traverse of the intermediate model tree.
bool cerrOutIntermediateTreeTraverse;
bool cerrOutIntermediateTreeTraverse { false };
/** \brief \ru Сохранить двойник модели.
\en Save the twin of the model. \~
@@ -323,41 +331,29 @@ struct C3DConverterDebugSettings {
the original implementation of the model document.\~
*/
bool saveModelTwin;
bool saveModelTwin { false };
/// \ru Включить вывод статистики импортируемых объектов. \en Enable logging the statistic of imported objects.
bool cerrOutImportStatistic;
bool cerrOutImportStatistic { false };
/// \ru Добавлять целочисленный атрибут со значением id элемента из обменного файла. \en Attach int attribute which's value based on id from exchange file.
bool attachThisIdAttribute;
bool attachThisIdAttribute { false };
/// \ru Идентификатор элемента, для которого сделать вывод информации для тонкой отладки. \en Id of element for each save data for fine debugging.
ptrdiff_t elementIdFineDebug;
ptrdiff_t elementIdFineDebug { -1 };
/// \ru Путь для сохранения информации для тонкой отладки. \en Fine for saving data for fine debugging.
c3d::string_t pathFineDebug;
c3d::string_t pathFineDebug {};
/// \ru Режим логирования. \en Logging mode.
eLoggingMode loggingMode;
eLoggingMode loggingMode { elm_LoggingOff };
/// \ru Идентификатор для логирования. \en Id for logging.
ptrdiff_t idForLogging;
ptrdiff_t idForLogging { -1 };
/// \ru Конструктор. \en Conctuctor.
C3DConverterDebugSettings()
: enableCERRout( false )
, cerrOutUserTreeTraverse( false )
, cerrOutIntermediateTreeTraverse( false )
, cerrOutImportStatistic( false )
, saveModelTwin( false )
, attachThisIdAttribute( false )
, elementIdFineDebug( -1 )
, pathFineDebug()
, loggingMode( elm_LoggingOff )
, idForLogging( -1 )
{
}
~C3DConverterDebugSettings() {}
C3DConverterDebugSettings() = default;
~C3DConverterDebugSettings() = default;
};
@@ -368,9 +364,10 @@ struct C3DConverterDebugSettings {
\en Demanded for export to formats having one string field for product inetifier. \~
\ingroup Exchange_Interface
*/
struct IProductIdMaker : public MbRefItem
struct CONV_CLASS IProductIdMaker : public MbRefItem
{
virtual c3d::string_t operator()( const MbProductInfo& ) const = 0;
virtual c3d::string_t operator()( const c3d::AttrSPtrVector& ) const = 0;
};
//------------------------------------------------------------------------------
@@ -411,20 +408,22 @@ public:
*/
class CONV_CLASS IConvertorProperty3D {
public :
virtual ~IConvertorProperty3D() {}
virtual ~IConvertorProperty3D() = default;
public:
/// \ru Получить имя документа. \en Get document's name.
virtual const std::string GetDocumentName () const = 0; //{ return std::string( GetDocName().get_str() ); };
/// \ru Получить имя файла для конвертирования. \en Get file name for converting.
virtual const c3d::path_string FullFilePath () const = 0 ;//{ return c3d::path_string( GetFileName().c_str() ); };
/// \ru Является ли файл текстовым. \en Whether the file is a text file.
/// \ru Получить имя файла для конвертирования. \en Get file name for converting.
//DEPRECATE_DECLARE
virtual const c3d::path_string FullFilePath() const = 0;//{ return c3d::path_string( GetFileName().c_str() ); };
/// \ru Является ли файл текстовым. \en Whether the file is a text file.
virtual bool IsFileAscii () const = 0;
/// \ru Получить версию формата при экспорте. \en Get the version of format for export.
virtual long int GetFormatVersion () const { return EXPORT_DEFAULT; };
/// \ru Следует ли экспортировать только поверхности ( введено для работы конвертера IGES ). \en Whether to export only surfaces (introduced for work with converter IGES ).
virtual bool IsOutOnlySurfaces() const = 0;
/// \ru Является ли экспортируемый документ сборкой. \en Whether the document for export is an assembly.
DEPRECATE_DECLARE
virtual bool IsAssembling () const = 0;
/// \ru Получить значение разрешения на импорт экспорт объектов определенного типа. \en Get the value of permission for import-export of objects of a certain type.
virtual bool GetIoPermission( MbeIOPermiss nPermission ) const = 0;
@@ -432,17 +431,19 @@ public:
virtual void GetIoPermissions( std::vector<bool>& ioPermissions ) const = 0;
/// \ru Установить разрешение на импорт экспорт объектов определенного типа. \en Set permission for import-export of objects of a certain type.
virtual void SetIoPermission( MbeIOPermiss nPermission, bool set ) = 0;
/// \ru Получить значение специфичной строки для конвертера. \en Get the value of a certain string for the converter.
/// \ru Получить строку заголовка файла. \en Get file header string.
virtual bool GetPropertyString ( MbeConverterStrings nString, std::string & propertyString ) const = 0;
/// \ru Установить значение специфичной строки для конвертера. \en Set the value of a certain string for the converter.
/// \ru Установить строку заголовка файла. \en Set file header string.
virtual void SetPropertyString ( MbeConverterStrings nString, const std::string & propertyString ) = 0;
/// \ru Представление текста в аннотационных объектах. \en Text representation in annotation objects.
DEPRECATE_DECLARE
virtual eTextForm GetAnnotationTextRepresentation () const { return exf_TextOnly; }
/** \brief \ru Следует ли компоненты экспортировать в разные файлы (если позволяет формат).
\en Export components into separate files ( if provided in format). \~
\note \ru ЭКСПЕРИМЕНТАЛЬНАЯ.
\en EXPEREIMENTAL \~.
*/
DEPRECATE_DECLARE
virtual bool ExportComponentsSeparately() const { return false; }
/// \ru Получить ЛСК, относительно которой позиционирована модель. \en Get the location, the model is placed in.
virtual MbPlacement3D GetOriginLocation() const = 0;
@@ -500,24 +501,48 @@ public:
// \return \ru true - обычная работа, false - через API. \en true - ordinary work, false - via API. \~
// */
virtual bool CanShowMessages() const = 0;
/// \ru Дать данные вычисления триангуляции (для конвертера JT, STL и VRML). \en Get data for step calculation during triangulation (for JT, STL, VRML only).
virtual MbStepData TesselationParameters() const { return MbStepData(); }
/// \ru Дать данные вычисления триангуляции уровня детализации (для конвертера JT). \en Get data for step calculation during triangulation of LOD0 (for JTonly).
virtual MbStepData LOD0TesselationParameters() const { return TesselationParameters(); }
/// \ru Флаг сохранения совпадающих точек швов. (для конвертера STL и VRML). \en Whether to keep coincident points of seams (for STL, VRML only).
virtual bool DualSeams() const { return true; }
/// \ru Выполнять ли слияние подобных граней. \en Whether to join similar faces.
virtual bool JoinSimilarFaces() const { return true; }
/// \ru Добавлять ли удаленные грани в качестве оболочек. \en Whether to add removed faces as shells.
virtual bool AddRemovedFacesAsShells() const { return false; }
/// \ru Получить запросчик масштабного коэффициента единиц длины. \en Get scale requester.
virtual SPtr<IScaleRequestor> GetScaleRequester() const { return SPtr<IScaleRequestor>{}; }
/// \ru Получить запросчик сшивки. \en Get stitch requester.
virtual SPtr<IStitchRequestor> GetStitchRequester() const { return SPtr<IStitchRequestor>{}; }
/// \ru Получить генератор однострочного идентификтора изделия. \en Get generator of one-line product identifier.
virtual SPtr<IProductIdMaker> ProductIdentifierGenerator() const { return SPtr<IProductIdMaker>(); }
/// \ru Получить настройки для выдачи отладочной информации. \en Get the settings of debug info.
virtual C3DConverterDebugSettings GetDebugSettings() const { return C3DConverterDebugSettings(); };
/// \ru Получить пользовательский преобразователь строк. \en Get user string transformer.
virtual SPtr<IC3DCharEncodingTransformer> GetUserCharEncodingTransformer() const { return SPtr<IC3DCharEncodingTransformer>( nullptr ); }
/// \ru Создавать раскрашенные копии компонент при импорте. \en Create colored replicas of components on import.
DEPRECATE_DECLARE virtual bool ImportComponentsWithColoredReplica() { return false; }
virtual bool ImportComponentsWithColoredReplica() { return false; }
/// \ru Определить способ формирования визуальных свойст при чтении из C3D. \en Specify the way how visual properties form while reading from C3D.
virtual ColorProcessing GetC3DVisualPropertiesResolutionStrategy() const { return ColorProcessing::cr_Both; }
/// \ru Импортировать полигональные объекты как объекты с топологической информацией. \en Import polygonal objects as objects with topological information.
virtual bool ImportMeshesWithTopology() const { return false; }
/// \ru Лечить ли неправильные сетки, и параметры для лечения. \en Whether to repair inconsistent meshes, and parameters for repairing.
virtual bool RepairInconsistentMesh( MbRepairInconsistentMeshParams & ) const { return false; }
}; // IConvertorProperty3D
@@ -531,6 +556,7 @@ public:
struct NameProductIdMaker : public IProductIdMaker
{
virtual c3d::string_t operator()( const MbProductInfo& ) const;
virtual c3d::string_t operator()( const c3d::AttrSPtrVector& ) const;
};
@@ -562,8 +588,13 @@ public:
bool addRemovedFacesAsShells; ///< \ru Добавлять ли удаленные грани в качестве отдельных оболочек. \en Whether to add removed faces as shells.
double lengthUnitsFactor; ///< \ru Единицы длины модели. \en Length units of the model.
double appUnitsFactor; ///< \ru Единицы длины модели пользовательского приложения. \en Length units of the model used in user application.
bool attatchIdAttributes; ///< \ru Следует ли формировать атрибут на основе идентификатора элемнта в файле. \en Whether to attatch the element's id in file as attribute.
bool auditEnabled;
bool importMeshesWithTopology; ///< \ru Сохранять сетки в MbMesh (false) или в MbPolymesh (true). \en Save meshes to MbMesh (false) or to MbPolymesh (true).
bool repairInconsistentMesh; /// \ru Лечить ли неправильные сетки. \en Whether to repair inconsistent meshes.
MbRepairInconsistentMeshParams repairInconsistentMeshParams; /// \ru Параметры для лечения неправильных сеток. \en Parameters for repairing inconsistent meshes.
ColorProcessing visualPropertiesFormation; ///< \ru Способ формирования визуальных свойст при чтении из C3D. \en The way how visual properties form while reading from C3D.
SPtr<IProductIdMaker> pruductIdMaker; ///< \ru Генератор однострочного идентификатора по данным об изделии. \en Generator of a single-line id based on product information attribute.
SPtr<IScaleRequestor> scaleRequester; /// \ru Запросчик масштабного коэффициента единиц длины. \en Scale requester.
SPtr<IStitchRequestor> stitchRequester; /// \ru Запросчик сшивки. \en Stitch requester.
C3DConverterDebugSettings debugSettings;
/// \ru Сведения о сообщениях конвертера. \en Converter message data.
@@ -578,50 +609,68 @@ public:
public:
ConvConvertorProperty3D(); ///< \ru Конструктор. \en Constructor.
~ConvConvertorProperty3D() override {};///< \ru Деструктор. \en Destructor.
~ConvConvertorProperty3D() override = default;///< \ru Деструктор. \en Destructor.
/// \ru Получить имя документа. \en Get document's name.
const std::string GetDocumentName () const override { return docName; };
/// \ru Получить имя файла для конвертирования. \en Get file name for converting.
//DEPRECATE_DECLARE
const c3d::path_string FullFilePath () const override { return fileName; };
/// \ru Является ли файл текстовым. \en Whether the file is a text file.
bool IsFileAscii () const override;
/// \ru Получить версию формата при экспорте. \en Get the version of format for export.
long int GetFormatVersion () const override;
/// \ru Следует ли экспортировать только поверхности ( введено для работы конвертера IGES ). \en Whether to export only surfaces (introduced for work with converter IGES ).
bool IsOutOnlySurfaces() const override;
/// \ru Является ли экспортируемый документ сборкой. \en Whether the document for export is an assembly.
bool IsAssembling () const override { return true; };
DEPRECATE_DECLARE
bool IsAssembling () const override { return true; };
/// \ru Получить значение разрешения на импорт экспорт объектов определенного типа. \en Get the value of permission for import-export of objects of a certain type.
bool GetIoPermission( MbeIOPermiss nPermission ) const override;
/// \ru Получить значения разрешений на импорт экспорт объектов определенных типов. \en Get values of permission for import-export of objects of certain types.
void GetIoPermissions( std::vector<bool>& ioPermissions ) const override;
void GetIoPermissions( std::vector<bool>& ioPermissions ) const override;
/// \ru Установить разрешение на импорт экспорт объектов определенного типа. \en Set permission for import-export of objects of a certain type.
void SetIoPermission( MbeIOPermiss nPermission, bool isSet ) override;
/// \ru Получить значение специфичной строки для конвертера. \en Get the value of a certain string for the converter.
bool GetPropertyString ( MbeConverterStrings nString, std::string & propertyString ) const override;
/// \ru Установить значение специфичной строки для конвертера. \en Set the value of a certain string for the converter.
/// \ru Получить строку заголовка файла. \en Get file header string.
bool GetPropertyString ( MbeConverterStrings nString, std::string & propertyString ) const override;
/// \ru Установить строку заголовка файла. \en Set file header string.
void SetPropertyString ( MbeConverterStrings nString, const std::string & propertyString ) override;
/// \ru Представление текста в аннотационных объектах. \en Text representation in annotation objects.
DEPRECATE_DECLARE
eTextForm GetAnnotationTextRepresentation () const override;
/** \brief \ru Следует ли компоненты экспортировать в разные файлы (если позволяет формат).
\en Export components into separate files ( if provided in format). \~
\note \ru ЭКСПЕРИМЕНТАЛЬНАЯ.
\en EXPEREIMENTAL \~.
*/
DEPRECATE_DECLARE
bool ExportComponentsSeparately() const override;
/// \ru Получить ЛСК, относительно которой позиционирована модель. \en Get the location, the model is placed in.
MbPlacement3D GetOriginLocation() const override;
/// \ru Заменять ли принудительно СК компонент на правые. \en Replace components' placements to right-oriented.
bool ReplaceLocationsToRight() const override;
/** \brief \ru Сшивать ли поверхности автоматически.
\en If surfaces should be stitched automatically. \~
\return \ru true - Сшивать поверхности автоматически, false - Спросить пользователя, сшивать ли поверхности.
\en true - Stitch surfaces automatically, false - Ask user first time. \~
\param[out] stitchPrecision - \ru Точность сшивки.
\en Stitch precision. \~
*/ bool EnableAutoStitch( double& /*stitchPrecision*/ ) const override;
*/
bool EnableAutoStitch( double& /*stitchPrecision*/ ) const override;
/// \ru Получить множитель единиц длины по отношению к миллиметру. \en Get the factor of the length units to millimeters.
double LengthUnitsFactor() const override;
@@ -650,25 +699,53 @@ public:
/// \ru Дать данные вычисления триангуляции (для конвертера STL и VRML). \en Get data for step calculation during triangulation (for STL, VRML only).
MbStepData TesselationParameters() const override;
/// \ru Дать данные вычисления триангуляции уровня детализации (для конвертера JT). \en Get data for step calculation during triangulation of LOD0 (for JTonly).
MbStepData LOD0TesselationParameters() const override;
/// \ru Получить флаг сохранения совпадающих точек швов. (для конвертера STL и VRML). \en Whether to keep coincident points of seams (for STL, VRML only).
bool DualSeams() const override;
/// \ru Задать флаг сохранения совпадающих точек швов. (для конвертера STL и VRML). \en Whether to keep coincident points of seams (for STL, VRML only).
void DualSeams( bool );
/// \ru Получить настройки для выдачи отладочной информации. \en Get the settings of debug info.
C3DConverterDebugSettings GetDebugSettings() const override;
/// \ru Выполнять ли слияние подобных граней. \en Whether to join similar faces.
bool JoinSimilarFaces() const override { return joinSimilarFaces; }
bool JoinSimilarFaces() const override;
/// \ru Добавлять ли удаленные грани в качестве оболочек. \en Whether to add removed faces as shells.
bool AddRemovedFacesAsShells() const override { return addRemovedFacesAsShells; }
bool AddRemovedFacesAsShells() const override;
/// \ru Получить генератор однострочного идентификтора изделия. \en Get generator of one-line product identifier.
SPtr<IProductIdMaker> ProductIdentifierGenerator() const override { return SPtr<IProductIdMaker>( new NameProductIdMaker() ); }
SPtr<IProductIdMaker> ProductIdentifierGenerator() const override;
/// \ru Получить запросчик масштабного коэффициента единиц длины. \en Get scale requester.
SPtr<IScaleRequestor> GetScaleRequester() const override;
/// \ru Получить запросчик сшивки. \en Get stitch requester.
SPtr<IStitchRequestor> GetStitchRequester() const override;
/// \ru Получить пользовательский преобразователь строк. \en Get user string transformer.
SPtr<IC3DCharEncodingTransformer> GetUserCharEncodingTransformer() const override;
OBVIOUS_PRIVATE_COPY( ConvConvertorProperty3D )
/// \ru Определить способ формирования визуальных свойст при чтении из C3D. \en Specify the way how visual properties form while reading from C3D.
ColorProcessing GetC3DVisualPropertiesResolutionStrategy() const override;
/// \ru Импортировать полигональные объекты как объекты с топологической информацией. \en Import polygonal objects as objects with topological information.
bool ImportMeshesWithTopology() const override { return importMeshesWithTopology; }
/// \ru Получить параметры для лечения неправильных сеток. \en Get parameters for repairing inconsistent meshes.
bool RepairInconsistentMesh( MbRepairInconsistentMeshParams &params ) const override;
/// \ru Обновить значения свойств, за исключением: GetPropertyString() и LogReport(). \en Update properties, exept : GetPropertyString() и LogReport()
void Update( IConvertorProperty3D const & init );
private:
ConvConvertorProperty3D ( ConvConvertorProperty3D const & ) = delete;
ConvConvertorProperty3D & operator = ( ConvConvertorProperty3D const & ) = delete;
ConvConvertorProperty3D ( ConvConvertorProperty3D && ) = delete;
}; // IConvertorProperty3D
@@ -710,21 +787,21 @@ public:
class CONV_CLASS IC3DCharEncodingTransformerStep : public IC3DCharEncodingTransformer
{
public:
virtual ~IC3DCharEncodingTransformerStep() {}
~IC3DCharEncodingTransformerStep() override = default;
//------------------------------------------------------------------------------
/** \brief \ru Преобразовать строку C3D в строку STD.
\en Transform C3D string to the STD one. \~
\ingroup Base_Tools_String
*/
virtual bool C3DToStd( const c3d::string_t& from, std::string & to );
bool C3DToStd( const c3d::string_t& from, std::string & to ) override;
//------------------------------------------------------------------------------
/** \brief \ru Преобразовать строку STD в строку C3D.
\en Transform STD string to the C3D one. \~
\ingroup Base_Tools_String
*/
virtual bool StdToC3D( const std::string & from, c3d::string_t& to );
bool StdToC3D( const std::string & from, c3d::string_t& to ) override;
};
@@ -739,21 +816,47 @@ public:
class CONV_CLASS IC3DCharEncodingTransformerUTF8 : public IC3DCharEncodingTransformer
{
public:
virtual ~IC3DCharEncodingTransformerUTF8() {}
~IC3DCharEncodingTransformerUTF8() override = default;
//------------------------------------------------------------------------------
/** \brief \ru Преобразовать строку C3D в строку STD.
\en Transform C3D string to the STD one. \~
\ingroup Base_Tools_String
*/
virtual bool C3DToStd( const c3d::string_t& from, std::string & to );
bool C3DToStd( const c3d::string_t& from, std::string & to ) override;
//------------------------------------------------------------------------------
/** \brief \ru Преобразовать строку STD в строку C3D.
\en Transform STD string to the C3D one. \~
\ingroup Base_Tools_String
*/
virtual bool StdToC3D( const std::string & from, c3d::string_t& to );
bool StdToC3D( const std::string & from, c3d::string_t& to ) override;
};
//------------------------------------------------------------------------------
/** \brief \ru Преобразование строк с использованием кодировки Windows-1251.
\en Transform strings using the Windows-1251 encoding.
\ingroup Base_Tools_String
*/
class CONV_CLASS IC3DCharEncodingTransformerWindows1251 : public IC3DCharEncodingTransformer
{
public:
~IC3DCharEncodingTransformerWindows1251() override = default;
//------------------------------------------------------------------------------
/** \brief \ru Преобразовать строку C3D в строку STD.
\en Transform C3D string to the STD one. \~
\ingroup Base_Tools_String
*/
bool C3DToStd( const c3d::string_t& from, std::string & to ) override;
//------------------------------------------------------------------------------
/** \brief \ru Преобразовать строку STD в строку C3D.
\en Transform STD string to the C3D one. \~
\ingroup Base_Tools_String
*/
bool StdToC3D( const std::string & from, c3d::string_t& to ) override;
};
#endif // __CONV_EXCHANGE_SETTINGS_H
+317 -136
View File
@@ -13,16 +13,21 @@
#include <model_item.h>
#include <attribute_item.h>
#include <instance_item.h>
#include <conv_annotation_item.h>
#include <conv_predefined.h>
#include <conv_requestor.h>
#include <tool_cstring.h>
#include <assisting_item.h>
#include <vector>
#include <map>
//class IConverterMetadataReceiver;
class MbPlacement3D;
class MbName;
class MbModel;
class MbAttributeContainer;
@@ -49,16 +54,16 @@ class CONV_CLASS ItModelDocument : public MbRefItem
public:
/// \ru Это сборка? \en Is it an assembly?
virtual bool IsAssembly() const = 0;
/// \ru Это ни сборка, ни деталь? \en Is it neither an assembly nor a part?
/// \ru Модельный документ не содержит данных. \en There is no data.
virtual bool IsEmpty() const = 0;
/** \brief \ru Прообраз новой интерфейсной функции - задать модель ЛСК, относительно которой позиционируется модель.
\en Prototype of a new interface function - get the placement the model is defined in. \~
\en Prototype of a new interface function - get the placement the model is defined in. \~
*/
//virtual MbPlacement3D GetOriginLocation() const = 0;
/** \brief \ru Прообраз новой интерфейсной функции - задать модель для наполнения.
\en Prototype of a new interface function - set a model to fill. \~
\en Prototype of a new interface function - set a model to fill. \~
*/
virtual void SetContent( MbItem* /*content*/) = 0;
@@ -68,73 +73,86 @@ public:
virtual MbItem * GetContent() /*{ return nullptr; }*/ = 0;
/** \brief \ru Создать документ с новой сборкой при импорте.
\en Create a document with a new assembly while importing. \~
\en Create a document with a new assembly while importing. \~
\details \ru Увеличить счётчик ссылок результирующего документа на 1.
\en Increase the reference counter of the resultant document by 1. \~
\param[in] fileName - \ru Имя сборки.
\en Assembly name. \~
\param[in] solids - \ru Тела, добавляемые в сборку.
\en Solids to add into the assembly. \~
\en Increase the reference counter of the resultant document by 1. \~
\param[in] componentItems - \ru Элементы, добавляемые в сборку.
\en Items to add into the assembly. \~
\param[in] fileName - \ru Имя сборки.
\en Assembly name. \~
\return \ru Экземпляр сборки, если операция прошла успешно, nullptr в противном случае.
\en Instance of an assembly if the operation succeeded, nullptr - otherwise. \~
\en Instance of an assembly if the operation succeeded, nullptr - otherwise. \~
*/
virtual ModelAssemblyPtr CreateAssembly( const c3d::ItemsSPtrVector & componentItems, const c3d::string_t& fileName ) = 0;
/** \brief \ru Создать документ с новой деталью при импорте.
\en Create a document with a new part while importing. \~
\en Create a document with a new part while importing. \~
\details \ru Увеличить счётчик ссылок результирующего документа на 1.
\en Increase the reference counter of the resultant document by 1. \~
\param[in] solids - \ru Тела, добавляемые в деталь.
\en Solids to add into a part. \~
\param[in] fileName - \ru Имя детали.
\en A part name. \~
\en Increase the reference counter of the resultant document by 1. \~
\param[in] componentItems - \ru Элементы, добавляемые в сборку.
\en Items to add into the assembly. \~
\param[in] fileName - \ru Имя детали.
\en A part name. \~
\return \ru Экземпляр детали, если операция прошла успешно, nullptr в противном случае.
\en Instance of the part if the operation succeeded, nullptr - otherwise. \~
\en Instance of the part if the operation succeeded, nullptr - otherwise. \~
*/
virtual ModelPartPtr CreatePart( const c3d::ItemsSPtrVector & componentItems, const c3d::string_t& fileName ) = 0;
/** \brief \ru Получить сборку для экспорта.
\en Get an assembly for export. \~
\en Get an assembly for export. \~
\details \ru Увеличить счётчик ссылок результирующей сборки на 1.
\en Increase the reference counter of the resultant assembly by 1. \~
\en Increase the reference counter of the resultant assembly by 1. \~
\return \ru Экземпляр сборки, если операция прошла успешно, nullptr в противном случае.
\en Instance of an assembly if the operation succeeded, nullptr - otherwise. \~
\en Instance of an assembly if the operation succeeded, nullptr - otherwise. \~
*/
virtual ModelAssemblyPtr GetInstanceAssembly( ) = 0;
/** \brief \ru Получить деталь для экспорта.
\en Get the detail for export. \~
\details \ru Увеличить счётчик ссылок результирующей детали на 1.
\en Increase the reference counter of the resultant part by 1. \~
\return \ru Экземпляр детали, если операция прошла успешно, nullptr в противном случае.
\en Instance of the part if the operation succeeded, nullptr - otherwise. \~
\en Get the detail for export. \~
\details \ru Увеличить счётчик ссылок результирующей детали на 1.
\en Increase the reference counter of the resultant part by 1. \~
\return \ru Экземпляр детали, если операция прошла успешно, nullptr в противном случае.
\en Instance of the part if the operation succeeded, nullptr - otherwise. \~
*/
virtual ModelPartPtr GetInstancePart( ) = 0;
/** \brief \ru Получить обработчик метаданных.
\en Get metadata provider. \~
\details \ru Метаданные используются в тех случаях, когда не вписываются не в геометрическую, ни в атрибутивную модели.
\en Metadata are used in cases they don't fin in neigher geometric nor attribute-based models. \~
\return \ru Реализацию для приема метаданных с целью дальнейшей обработки.
\en Implementation of metadata processor. \~
*/
virtual SPtr<IConverterMetadataReceiver> GetMetadataReceiver() { return {}; };
/** \brief \ru Завершить импорт и сохранить документ.
\en Complete the import and save the document. \~
\en Complete the import and save the document. \~
\return \ru true, если операция прошла успешно, false в противном случае.
\en true if the operation succeeded, false - otherwise. \~
\en true if the operation succeeded, false - otherwise. \~
\param[in] \ru indicator Объект для отображения хода процесса.
\en indicator An object indicating a process progress. \~
\en indicator An object indicating a process progress. \~
*/
virtual bool FinishImport( IProgressIndicator * indicator ) = 0;
/** \brief \ru Получить элементы аннотации, соответствующие элементам геометрической модели.
\en Get elements of annotation, corresponding items of geometric model. \~
\en Get elements of annotation, corresponding items of geometric model. \~
\param[in] eTextForm - \ru Форма представления текста.
\en Text representation form. \~
\en Text representation form. \~
\return \ru Контейнер объектов аннотации.
\en Vector of annotation objects. \~
\en Vector of annotation objects. \~
*/
DEPRECATE_DECLARE
virtual map_of_visual_items GetAnnotationItems( eTextForm ) const = 0;
/// \ru Задать размеры. \en Set sizes.
DEPRECATE_DECLARE
virtual void SetAnnotationItems( const map_of_visual_items& ) = 0;
/// \ru Открыть документ. \en Open a document.
DEPRECATE_DECLARE
virtual void OpenDocument() = 0;
};
@@ -192,47 +210,64 @@ public:
// ---
class CONV_CLASS C3dModelDocument: public ItModelDocument {
ModelPartPtr part; ///< \ru Представление в виде детали. \en Representation as detail.
ModelAssemblyPtr assembly; ///< \ru Представление в виде сборки. \en Representation as assembly.
map_of_visual_items visualItems; ///< \ru Элементы аннотации. \en Annotation items.
c3d::ItemSPtr rawContent; ///< \ru Передаваемый модельный элемент. \en Converted model item.
SPtr<C3DPmiToItem> pmiToItem; ///< \ru Включены ли элементы аннотации непосредственно в модельный элемент. \en Model item contains PMI.
ModelPartPtr m_part{}; ///< \ru Представление в виде детали. \en Representation as detail.
ModelAssemblyPtr m_assembly{}; ///< \ru Представление в виде сборки. \en Representation as assembly.
map_of_visual_items m_visualItems{}; ///< \ru Элементы аннотации. \en Annotation items.
c3d::ItemSPtr m_rawContent{}; ///< \ru Передаваемый модельный элемент. \en Converted model item.
SPtr<C3DPmiToItem> m_pmiToItem{}; ///< \ru Включены ли элементы аннотации непосредственно в модельный элемент. \en Model item contains PMI.
SPtr<IConverterMetadataReceiver> m_metadataReceiver{}; ///< \ru Обработчик метаданных. \en Metadata provider.
public:
C3dModelDocument( SPtr<C3DPmiToItem> pmiToContent = SPtr<C3DPmiToItem>() ); ///< \ru Конструктор. \en Conscructor.
virtual ~C3dModelDocument(); ///< \ru Деструктор. \en Descructor.
~C3dModelDocument() override; ///< \ru Деструктор. \en Descructor.
// Является ли сборкой.
virtual bool IsAssembly() const;
// Является ли сборкой.
bool IsAssembly() const override;
// Пуст ли.
virtual bool IsEmpty() const;
bool IsEmpty() const override;
// Задать модель напрямую.
virtual void SetContent( MbItem* /*content*/);
void SetContent( MbItem* /*content*/) override;
// Выдать модель напрямую.
virtual MbItem * GetContent();
MbItem * GetContent() override;
// Создать сборку.
virtual ModelAssemblyPtr CreateAssembly( const c3d::ItemsSPtrVector & componentItems, const c3d::string_t& fileName );
ModelAssemblyPtr CreateAssembly( const c3d::ItemsSPtrVector & componentItems, const c3d::string_t& fileName ) override;
// Создать деталь.
virtual ModelPartPtr CreatePart( const c3d::ItemsSPtrVector & componentItems, const c3d::string_t& fileName );
ModelPartPtr CreatePart( const c3d::ItemsSPtrVector & componentItems, const c3d::string_t& fileName ) override;
// Выдать сборку.
virtual ModelAssemblyPtr GetInstanceAssembly( );
ModelAssemblyPtr GetInstanceAssembly( ) override;
// Выдать деталь.
virtual ModelPartPtr GetInstancePart( );
ModelPartPtr GetInstancePart( ) override;
// Завершить импорт.
virtual bool FinishImport( IProgressIndicator * );
bool FinishImport( IProgressIndicator * ) override;
// Выдать элементы аннотации.
virtual map_of_visual_items GetAnnotationItems( eTextForm ) const;
DEPRECATE_DECLARE
map_of_visual_items GetAnnotationItems( eTextForm ) const override;
// Задать элементы аннотации.
virtual void SetAnnotationItems( const map_of_visual_items& vi );
DEPRECATE_DECLARE
void SetAnnotationItems( const map_of_visual_items& vi ) override;
// Открыть документ.
virtual void OpenDocument();
DEPRECATE_DECLARE
void OpenDocument() override;
// Получить интерфейс передачи метаданных.
SPtr<IConverterMetadataReceiver> GetMetadataReceiver() override;
/// \ru Включены ли PMI в элемент модели. \en If PMI is included into model item.
SPtr<C3DPmiToItem> PmiInContent() const;
/// \ru Зарегистрировать элемент аннотации. \en Register annotation object.
DEPRECATE_DECLARE
void RegisterAnnotation( c3d::ItemSPtr component, const AnnotationSptrVector& annotation, const AnnotationSptrVector& requirements );
/// \ru Сбросить итераторы вставок. \en Reset instances itrerators.
void ResetInstanceIterators();
/// \ru Задать особенный обработчик метаданных. \en Set specific metadata provider.
void SetMetadataReceiver( SPtr<IConverterMetadataReceiver> const & );
/// \ru Инициализировать документ по двойнику. \en Build document by twin.
void InitDocumentByTwin( MbModel const& );
};
@@ -249,22 +284,19 @@ typedef C3dModelDocument ConvModelDocument;
class ItModelInstanceProperties : public MbRefItem
{
public:
/// \ru Атрибуты. \en Attributes.
/// \ru Задать атрибуты. \en Set attributes.
virtual bool SetAttributes( const c3d::AttrSPtrVector& /*attributes*/ ) = 0;
/// \ru Получить атрибуты. \en Get attributes.
virtual c3d::AttrSPtrVector GetAttributes( ) const = 0;// { return c3d::AttrSPtrVector(); }
virtual c3d::AttrSPtrVector GetAttributes() const = 0;// { return c3d::AttrSPtrVector(); }
/// \ru Технические требования. \en Technical requirements.
/// \ru Получить технические требования. \en Get technical requirements.
virtual void GetRequirements( AnnotationSptrVector &, eTextForm ) const = 0;
/// \ru Технические требования. \en Technical requirements.
/// \ru Получить технические требования. \en Get technical requirements.
DEPRECATE_DECLARE
virtual void GetRequirements( AnnotationSptrVector &, eTextForm ) const = 0;
/// \ru Задать технические требования. \en Set technical requirements.
DEPRECATE_DECLARE
virtual void SetRequirements( const AnnotationSptrVector & ) = 0;
};
@@ -289,65 +321,67 @@ public:
virtual bool IsEmpty() const = 0;
/** \brief \ru Создать пустую сборку при импорте и увеличить счётчик ссылок на 1.
\en Create an empty assembly while importing and increase the reference counter by 1. \~
\param[in] place - \ru ЛСК сборки в родительской модели.
\en LCS of the assembly in the parent's model. \~
\param[in] fileName - \ru Имя сборки.
\en Assembly name. \~
\en Create an empty assembly while importing and increase the reference counter by 1. \~
\param[in] place - \ru ЛСК сборки в родительской модели.
\en LCS of the assembly in the parent's model. \~
\param[in] componentItems - \ru Элементы, добавляемые в сборку.
\en Items to add into the assembly. \~
\param[in] fileName - \ru Имя сборки.
\en Assembly name. \~
\return \ru Экземпляр сборки, если операция прошла успешно, nullptr в противном случае.
\en Instance of an assembly if the operation succeeded, nullptr - otherwise. \~
\en Instance of an assembly if the operation succeeded, nullptr - otherwise. \~
*/
virtual ModelAssemblyPtr CreateAssembly( const MbPlacement3D &place, const c3d::ItemsSPtrVector & componentItems, const c3d::string_t& fileName ) = 0;
/** \brief \ru Создать деталь при импорте.
\en Create a part while importing. \~
\en Create a part while importing. \~
\details \ru Увеличить счётчик ссылок детали на 1.
\en Increase the reference counter of a part by 1. \~
\param[in] place - \ru ЛСК детали.
\en LCS of a part. \~
\param[in] solids - \ru Тела, включаемые в деталь.
\en Solids included in the part. \~
\param[in] fileName - \ru Название детали.
\en Solid's name. \~
\en Increase the reference counter of a part by 1. \~
\param[in] place - \ru ЛСК детали.
\en LCS of a part. \~
\param[in] componentItems - \ru Элементы, добавляемые в сборку.
\en Items to add into the assembly. \~
\param[in] fileName - \ru Имя детали.
\en A part name. \~
\return \ru Экземпляр детали, если операция прошла успешно, nullptr в противном случае.
\en Instance of the part if the operation succeeded, nullptr - otherwise. \~
\en Instance of the part if the operation succeeded, nullptr - otherwise. \~
*/
virtual ModelPartPtr CreatePart( const MbPlacement3D &place, const c3d::ItemsSPtrVector & componentItems, const c3d::string_t& fileName ) = 0;
/** \brief \ru Получить сборку для экспорта.
\en Get an assembly for export. \~
\en Get an assembly for export. \~
\return \ru Экземпляр сборки, если операция прошла успешно, nullptr в противном случае.
\en Instance of an assembly if the operation succeeded, nullptr - otherwise. \~
\en Instance of an assembly if the operation succeeded, nullptr - otherwise. \~
*/
virtual ModelAssemblyPtr GetInstanceAssembly( ) = 0;
/** \brief \ru Получить деталь для экспорта.
\en Get the detail for export. \~
\en Get the detail for export. \~
\return \ru Экземпляр детали, если операция прошла успешно, nullptr в противном случае.
\en Instance of the part if the operation succeeded, nullptr - otherwise. \~
\en Instance of the part if the operation succeeded, nullptr - otherwise. \~
*/
virtual ModelPartPtr GetInstancePart( ) = 0;
/** \brief \ru Создать подсборку при импорте, и её вставку.
\en Create a subassembly and its instance while importing. \~
\param[in] place - \ru ЛСК сборки в родительской модели.
\en LCS of the assembly in the parent's model. \~
\en Create a subassembly and its instance while importing. \~
\param[in] place - \ru ЛСК сборки в родительской модели.
\en LCS of the assembly in the parent's model. \~
\param[in] existing - \ru Сборка, подлежащая вставке.
\en An assembly to insert. \~
\en An assembly to insert. \~
\return \ru true, если операция прошла успешно, false в противном случае.
\en true if the operation succeeded, false - otherwise. \~
\en true if the operation succeeded, false - otherwise. \~
*/
virtual bool SetAssembly( const MbPlacement3D & place, const ItModelAssembly * existing ) = 0;
/** \brief \ru Создать деталь при импорте, и её вставку.
\en Create a part while importing and its instance. \~
\param[in] place - \ru ЛСК детали в родительской модели.
\en LCS of a part in the parent's model. \~
\en Create a part while importing and its instance. \~
\param[in] place - \ru ЛСК детали в родительской модели.
\en LCS of a part in the parent's model. \~
\param[in] existing - \ru Деталь, подлежащая вставке.
\en Detail to insert. \~
\en Detail to insert. \~
\return \ru true, если операция прошла успешно, false в противном случае.
\en true if the operation succeeded, false - otherwise. \~
\en true if the operation succeeded, false - otherwise. \~
*/
virtual bool SetPart( const MbPlacement3D & place, const ItModelPart * existing ) = 0;
@@ -370,7 +404,9 @@ enum MbeGettingItemType {
git_AssociatedGeometry, ///< \ru Получить ассоциированные геометрические объекты (резьбы). \en Get associated geometry objects (threads).
git_Polygonal, ///< \ru Получить полгональные объекты (MbMesh). !!! ЭКСПЕРИМЕНТАЛЬНЫЙ ФУНКЦИОНАЛ !!! \en Get polygonal objects (MbMesh). !!! EXPEREIMENTAL FUNCTIONALITY !!!
git_PMI, ///< \ru Получить размеры и иные элементы аннотации. \en Get dimensions and other annotation items.
git_TechnicalRquirments ///< \ru Получить технические требования. \en Get thecnical requirements.
git_TechnicalRquirments, ///< \ru Получить технические требования. \en Get thecnical requirements.
git_Placement, ///< \ru Получить системы координат. \en Get placements.
git_Count ///< \ru Счетчик типов. \en Types counter.
};
@@ -390,25 +426,25 @@ class ItModelAssembly : public ItModelInstanceProperties
{
public:
/** \brief \ru Получить имя файла сборки без пути и расширения для экспорта.
\en Get the file name of an assembly without the path and the extension for export. \~
\en Get the file name of an assembly without the path and the extension for export. \~
\return \ru Имя файла сборки.
\en An assembly file name. \~
\en An assembly file name. \~
*/
virtual c3d::path_string PureFileName() const = 0;
/** \brief \ru Получить пустой интерфейс вставки для создания подсборки или детали при импорте.
\en Get an empty interface of the insertion for creation of subassembly or a part while importing. \~
\en Get an empty interface of the insertion for creation of subassembly or a part while importing. \~
\details \ru Увеличить счётчик ссылок на 1.
\en Increase the reference counter by 1. \~
\en Increase the reference counter by 1. \~
\return \ru Интерфейс вставки, если операция прошла успешно или nullptr в противном случае.
\en Interface of the instance if the operation succeeded and nullptr otherwise. \~
\en Interface of the instance if the operation succeeded and nullptr otherwise. \~
*/
virtual ModelInstancePtr PrepareInstance() = 0;
/** \brief \ru Получить интерфейс следующей вставки для создания подсборки или детали при экспорте.
\en Get the interface of the next insertion for creation of a subassembly or a part while exporting. \~
\return \ru Интерфейс вставки, если операция прошла успешно или nullptr в противном случае.
\en Interface of the insertion if the operation succeeded and nullptr otherwise. \~
\en Get the interface of the next insertion for creation of a subassembly or a part while exporting. \~
\return \ru Интерфейс вставки, если операция прошла успешно или nullptr в противном случае.
\en Interface of the insertion if the operation succeeded and nullptr otherwise. \~
*/
virtual ModelInstancePtr NextInstance( bool includeInvisible ) = 0;
@@ -416,41 +452,107 @@ public:
virtual bool GetPlacement( MbPlacement3D & ) const { return false; };
/** \brief \ru Получить объекты из корня сборки при экспорте.
\en Get objects from the assembly root while exporting. \~
\param[out] items - \ru Наполняемый массив (состоит из объектов классов MbSolid, MbCurve3D, MbCartPoint3D).
\en Array to fill (consist of objects of classes MbSolid, MbCurve3D, MbCartPoint3D). \~
\en Get objects from the assembly root while exporting. \~
\param[out] items - \ru Наполняемый массив (состоит из объектов классов MbSolid, MbCurve3D, MbCartPoint3D).
\en Array to fill (consist of objects of classes MbSolid, MbCurve3D, MbCartPoint3D). \~
\param[in] includeInvisible - \ru Если true, то выдаются все тела, включая невидимые, если false - только видимые.
\en If true, then all the solids are returned, including invisible ones, if false - only visible ones. \~
\en If true, then all the solids are returned, including invisible ones, if false - only visible ones. \~
*/
virtual void GetItems( c3d::ItemsSPtrVector & items, MbeGettingItemType itemType, bool includeInvisible ) const = 0;
/** \brief \ru Добавить объекты в корень сборки при импорте.
\en Add objects to the assembly root while importing. \~
\en Add objects to the assembly root while importing. \~
\param[in] items - \ru Объекты, добавляемые в модель (тела, кривые и точки).
\en Objects to add to the model (solids, curves and points). \~
\en Objects to add to the model (solids, curves and points). \~
*/
virtual void AddItems( const c3d::ItemsSPtrVector & items ) = 0;
/** \brief \ru Получить элементы аннотации из сборки.
\en Get elements of annotation from the assembly. \~
\en Get elements of annotation from the assembly. \~
\param[in] eTextForm - \ru Форма представления текста.
\en Text representation form. \~
\en Text representation form. \~
\param[in] includeInvisible - \ru Если true, то выдаются все объекты аннотации, включая невидимые, если false - только видимые.
\en If true, all the annotation objects are returned, including invisible ones, if false - only visible ones. \~
\en If true, all the annotation objects are returned, including invisible ones, if false - only visible ones. \~
\return \ru Контейнер объектов аннотации.
\en Vector of annotation objects. \~
\en Vector of annotation objects. \~
*/
DEPRECATE_DECLARE
virtual AnnotationSptrVector GetAnnotationItems( eTextForm, bool ) const { return AnnotationSptrVector(); }; // Реализация будет удалена после того, как она будет осуществлена на стороне 3D
DEPRECATE_DECLARE
virtual AnnotationSptrVector GetAnnotationItems( eTextForm ) const { return AnnotationSptrVector(); }; // Будет удалена после её реализации на стороне 3D
/** \brief \ru Задать элементы аннотации в сборке.
\en Set elements of annotation in the assembly. \~
\param[in] sourceDim - \ru Элементы аннотации
\en Elements of annotation. \~
*/
/** \brief \ru Задать элементы аннотации в сборке.
\en Set elements of annotation in the assembly. \~
\param[in] sourceDim - \ru Элементы аннотации
\en Elements of annotation. \~
*/
DEPRECATE_DECLARE
virtual void SetAnnotationItems( const AnnotationSptrVector & ) = 0;
};
/** \brief \ru Добавить объект с заданной ЛСК в корень сборки при импорте.
\en Add object with a placement to the assembly root while importing. \~
\param[in] item - \ru Объект, добавляемые в модель.
\en Object to add to the model. \~
\param[in] placement - \ru ЛСК.
\en Placement. \~
*/
virtual void AddMappedItem( MbItem &, MbPlacement3D const &, c3d::AttrSPtrVector const& ) {};
/** \brief \ru Получить следующий объект с заданной ЛСК.
\en Get the next item with placement. \~
\return \ru Объект с заданной ЛС или nullptr.
\en Item with placement and nullptr otherwise. \~
*/
virtual SPtr<MbInstance> NextMappedItem() const { return {}; }
/** \brief \ru Получить следующую группу конструкционных осей.
\en Get the next construction axes grid. \~
\return \ru Очередная группа конструкционных осей или нуль в случае исчерпания.
\en Next construction axes grid or null in case of depletion. \~
*/
virtual c3d::ItemSPtr NextAxesGrid() const { return c3d::ItemSPtr{}; }
/** \brief \ru Добавить следующую группу конструкционных осей.
\en Add next construction axes grid. \~
\param[in] group \ru Очередная группа конструкционных осей.
\en Next construction axes grid. \~
*/
virtual void AddAxesGrid( c3d::ItemSPtr const & ) {}
/** \brief \ru Получить следующую систему координат.
\en Get the next coordinate system. \~
\return \ru Очередная система координат или нуль в случае исчерпания.
\en Next coordinate system or null in case of depletion. \~
*/
virtual SPtr<MbAssistingItem> NextCoordinateSystem() const { return {}; }
/** \brief \ru Добавить систему координат.
\en Add a coordinate system. \~
\param[in] group \ru Система координат.
\en Coordinate system. \~
*/
virtual void AddCoordinateSystem( SPtr<MbAssistingItem> const & ) {}
/** \brief \ru Получить следующий объект, ограничивающий площадь или объем .
\en Get the next item that is the boundary of an area or volume. \~
\return \ru Очередной объект, ограничивающий площадь или объем, или нуль в случае исчерпания.
\en Next item that is the boundary of an area or volume or null in case of depletion. \~
*/
virtual c3d::ItemSPtr NextBoundaryItem() const { return c3d::ItemSPtr {}; }
/** \brief \ru Добавить объект, ограничивающий площадь или объем (IfcSpace ).
\en Add an item that is the boundary of an area or volume. \~
\param[in] group \ru Очередной объект, ограничивающий площадь или объем.
\en Next item that is the boundary of an area or volume. \~
*/
virtual void AddBoundaryItem( c3d::ItemSPtr const & ) {}
};
//------------------------------------------------------------------------------
@@ -469,25 +571,25 @@ class ItModelPart : public ItModelInstanceProperties
{
public:
/** \brief \ru Получить имя файла детали без пути и расширения для экспорта.
\en Get the file name of a part without the path and extension for export. \~
\en Get the file name of a part without the path and extension for export. \~
\return \ru Имя файла детали.
\en A part file name. \~
\en A part file name. \~
*/
virtual c3d::path_string PureFileName() const = 0;
/** \brief \ru Получить пустой интерфейс вставки для создания подсборки или детали при импорте.
\en Get an empty interface of the insertion for creation of subassembly or a part while importing. \~
\en Get an empty interface of the insertion for creation of subassembly or a part while importing. \~
\details \ru Увеличить счётчик ссылок на 1.
\en Increase the reference counter by 1. \~
\en Increase the reference counter by 1. \~
\return \ru Интерфейс вставки, если операция прошла успешно или nullptr в противном случае.
\en Interface of the instance if the operation succeeded and nullptr otherwise. \~
\en Interface of the instance if the operation succeeded and nullptr otherwise. \~
*/
virtual ModelInstancePtr PrepareInstance() = 0;
/** \brief \ru Получить интерфейс следующей вставки для создания подсборки или детали при экспорте.
\en Get the interface of the next insertion for creation of a subassembly or a part while exporting. \~
\en Get the interface of the next insertion for creation of a subassembly or a part while exporting. \~
\return \ru Интерфейс вставки, если операция прошла успешно или nullptr в противном случае.
\en Interface of the insertion if the operation succeeded and nullptr otherwise. \~
\en Interface of the insertion if the operation succeeded and nullptr otherwise. \~
*/
virtual ModelInstancePtr NextInstance( bool includeInvisible ) = 0;
@@ -495,44 +597,123 @@ public:
virtual bool GetPlacement( MbPlacement3D & ) const { return false; };
/** \brief \ru Получить объекты из детали при экспорте.
\en Get objects from the part while exporting. \~
\param[out] items - \ru Наполняемый массив (состоит из объектов классов MbSolid, MbWireFrame, MbPointFrame).
\en Array to fill (consists of objects of classes MbSolid, MbWireFrame, MbPointFrame). \~
\en Get objects from the part while exporting. \~
\param[out] items - \ru Наполняемый массив (состоит из объектов классов MbSolid, MbWireFrame, MbPointFrame).
\en Array to fill (consists of objects of classes MbSolid, MbWireFrame, MbPointFrame). \~
\param[in] itemType - \ru Тип объектов, которыми нужно наполнить массив.
\en Type of objects the array should be filled with. \~
\en Type of objects the array should be filled with. \~
\param[in] includeInvisible - \ru Если true, то выдаются все тела, включая невидимые, если false - только видимые.
\en If true, all the solids are returned, including invisible ones, if false - only visible ones. \~
\en If true, all the solids are returned, including invisible ones, if false - only visible ones. \~
*/
virtual void GetItems( c3d::ItemsSPtrVector & items, MbeGettingItemType itemType, bool includeInvisible ) const = 0;
/** \brief \ru Добавить объекты в деталь при импорте.
\en Add objects to a part while importing. \~
\en Add objects to a part while importing. \~
\param[in] items - \ru Объекты, добавляемые в модель (кривые и точки).
\en Objects to be added to the model (curves and points). \~
\en Objects to be added to the model (curves and points). \~
*/
virtual void AddItems( const c3d::ItemsSPtrVector & items ) = 0;
/** \brief \ru Получить элементы аннотации из детали.
\en Get elements of annotation from the detail. \~
\en Get elements of annotation from the detail. \~
\param[in] eTextForm - \ru Форма представления текста.
\en Text representation form. \~
\en Text representation form. \~
\param[in] includeInvisible - \ru Если true, то выдаются все объекты аннотации, включая невидимые, если false - только видимые.
\en If true, all the annotation objects are returned, including invisible ones, if false - only visible ones. \~
\en If true, all the annotation objects are returned, including invisible ones, if false - only visible ones. \~
\return \ru Контейнер объектов аннотации.
\en Vector of annotation objects. \~
\en Vector of annotation objects. \~
*/
DEPRECATE_DECLARE
virtual AnnotationSptrVector GetAnnotationItems( eTextForm, bool ) const { return AnnotationSptrVector(); }; // Реализация будет удалена после того, как она будет осуществлена на стороне 3D
DEPRECATE_DECLARE
virtual AnnotationSptrVector GetAnnotationItems( eTextForm ) const { return AnnotationSptrVector(); }; // Будет удалена после её реализации на стороне 3D
/** \brief \ru Задать элементы аннотации в детали.
\en Set elements of annotation in the part. \~
\param[in] sourceDim - \ru Элементы аннотации
\en Elements of annotation. \~
*/
/** \brief \ru Задать элементы аннотации в детали.
\en Set elements of annotation in the part. \~
\param[in] sourceDim - \ru Элементы аннотации
\en Elements of annotation. \~
*/
DEPRECATE_DECLARE
virtual void SetAnnotationItems( const AnnotationSptrVector & ) = 0;
/** \brief \ru Добавить объект с заданной ЛСК в корень сборки при импорте.
\en Add object with a placement to the assembly root while importing. \~
\param[in] item - \ru Объект, добавляемые в модель.
\en Object to add to the model. \~
\param[in] placement - \ru ЛСК.
\en Placement. \~
*/
virtual void AddMappedItem( MbItem &, MbPlacement3D const &, c3d::AttrSPtrVector const& ) {};
/** \brief \ru Получить следующий объект с заданной ЛСК.
\en Get the next item with placement. \~
\return \ru Объект с заданной ЛС или nullptr.
\en Item with placement and nullptr otherwise. \~
*/
virtual SPtr<MbInstance> NextMappedItem() const { return {}; }
/** \brief \ru Получить следующую группу конструкционных осей.
\en Get the next conxtruction axes grid. \~
\return \ru Очередная группа конструкционных осей или нуль в случае исчерпания.
\en Next construction axes grid or null in case of depletion. \~
*/
virtual c3d::ItemSPtr NextAxesGrid() const { return c3d::ItemSPtr{}; }
/** \brief \ru Добавить следующую группу конструкционных осей.
\en Get the next conxtruction axes grid. \~
\param[in] group \ru Очередная группа конструкционных осей или нуль в случае исчерпания.
\en Next construction axes grid or null in case of depletion. \~
*/
virtual void AddAxesGrid( c3d::ItemSPtr const & ) {}
/** \brief \ru Получить следующую систему координат.
\en Get the next coordinate system. \~
\return \ru Очередная система координат или нуль в случае исчерпания.
\en Next coordinate system or null in case of depletion. \~
*/
virtual SPtr<MbAssistingItem> NextCoordinateSystem() const { return {}; }
/** \brief \ru Добавить систему координат.
\en Add a coordinate system. \~
\param[in] group \ru Система координат.
\en Coordinate system. \~
*/
virtual void AddCoordinateSystem( SPtr<MbAssistingItem> const & ) {}
/** \brief \ru Получить следующий объект, ограничивающий площадь или объем .
\en Get the next item that is the boundary of an area or volume. \~
\return \ru Очередной объект, ограничивающий площадь или объем, или нуль в случае исчерпания.
\en Next item that is the boundary of an area or volume or null in case of depletion. \~
*/
virtual c3d::ItemSPtr NextBoundaryItem() const { return c3d::ItemSPtr {}; }
/** \brief \ru Добавить объект, ограничивающий площадь или объем (IfcSpace ).
\en Add an item that is the boundary of an area or volume. \~
\param[in] group \ru Очередной объект, ограничивающий площадь или объем.
\en Next item that is the boundary of an area or volume. \~
*/
virtual void AddBoundaryItem( c3d::ItemSPtr const & ) {}
};
namespace c3d
{
namespace converter {
/** \brief \ru Проверить корректность набора осей.
\en Validate axes grid. \~
\details \ru Либо это объект типа MbPlaneInstance либо MbAssembly, содержащий только MbPlaneInstance с одинаковыми ЛСК плоскостей\~
\en. The item is or MbPlaneInstance or MbAssembly containing only MbPlaneInstance items with same LCS of the plane.\~
\return \ru Пройдена ли валидация.
\en Wether validation passed. \~
\param[in] item - \ru Группа конструкционных осей.
\en Construction axes grid. \~
*/
CONV_FUNC (bool) IsAxesGridValid( c3d::ItemSPtr const & );
}
}
#endif // __CONV_MODEL_DOCUMENT_H
+116 -380
View File
@@ -29,6 +29,7 @@ class IConvertorProperty3D;
class IConfigurationSelector;
class IAttributeNamesCollector;
class IConverterEventLogger;
class IConverterMetadataReceiver;
/**
\addtogroup Exchange_Interface
@@ -70,8 +71,8 @@ namespace c3d {
В противном случае импорт идёт с умолчательными параметрами, соответствующими реализации ConvConvertorProperty3D. \~
\en The fileName argument is not used if converter properties are defined obviously, file path comes from the FullFilePath
method. Otherwise default parameters corresponding ConvConvertorProperty3D implementation are used for import.
\param[out] model - \ru Модель.
\en The model. \~
\param[out] model - \ru Импортируемая модель.
\en The imported model. \~
\param[in] filePath - \ru Путь файла.
\en File path. \~
\param[in] prop - \ru Реализация интерфейса свойств конвертера.
@@ -83,9 +84,9 @@ namespace c3d {
\ingroup Exchange_Interface
*/
CONV_FUNC( MbeConvResType ) ImportFromFile( MbModel& model,
const path_string& fileName,
IConvertorProperty3D* prop = nullptr,
IProgressIndicator* indicator = nullptr );
const path_string& fileName,
IConvertorProperty3D* prop = nullptr,
IProgressIndicator* indicator = nullptr );
/** \brief \ru Прочитать файл обменного формата в элемент.
@@ -94,22 +95,22 @@ namespace c3d {
В противном случае импорт идёт с умолчательными параметрами, соответствующими реализации ConvConvertorProperty3D. \~
\en The fileName argument is not used if converter properties are defined obviously, file path comes from the FullFilePath
method. Otherwise default parameters corresponding ConvConvertorProperty3D implementation are used for import.
\param[out] item - \ru Замещаемый элемент.
\en The element to replace. \~
\param[in] filePath - \ru Путь файла.
\en File path. \~
\param[in] prop - \ru Реализация интерфейса свойств конвертера.
\en Implementation of converter's properties interface. \~
\param[in] indicator - \ru Индикатор хода процесса.
\en The process progress indicator. \~
\param[out] item - \ru Корневой элемент импортированной модели.
\en The imported element. \~
\param[in] filePath - \ru Путь файла.
\en File path. \~
\param[in] prop - \ru Реализация интерфейса свойств конвертера.
\en Implementation of converter's properties interface. \~
\param[in] indicator -\ru Индикатор хода процесса.
\en The process progress indicator. \~
\return \ru Код завершения операции.
\en Code of the operation termination. \~
\en Code of the operation termination. \~
\ingroup Exchange_Interface
*/
CONV_FUNC( MbeConvResType ) ImportFromFile( c3d::ItemSPtr& item,
const path_string& filePath,
IConvertorProperty3D* prop = nullptr,
IProgressIndicator* indicator = nullptr );
const path_string& filePath,
IConvertorProperty3D* prop = nullptr,
IProgressIndicator* indicator = nullptr );
/** \brief \ru Прочитать файл обменного формата в модель.
\en Read a file of an exchange format into model. \~
@@ -117,8 +118,8 @@ namespace c3d {
В противном случае импорт идёт с умолчательными параметрами, соответствующими реализации ConvConvertorProperty3D. \~
\en The fileName argument is not used if converter properties are defined obviously, file path comes from the FullFilePath
method. Otherwise default parameters corresponding ConvConvertorProperty3D implementation are used for import.
\param[out] mDoc - \ru Модельный документ.
\en The model. \~
\param[out] mDoc - \ru Импортированный модельный документ.
\en The imported model document. \~
\param[in] filePath - \ru Путь файла.
\en File path. \~
\param[in] prop - \ru Реализация интерфейса свойств конвертера.
@@ -130,9 +131,9 @@ namespace c3d {
\ingroup Exchange_Interface
*/
CONV_FUNC( MbeConvResType ) ImportFromFile( ItModelDocument& mDoc,
const path_string& filePath,
IConvertorProperty3D* prop = nullptr,
IProgressIndicator* indicator = nullptr );
const path_string& filePath,
IConvertorProperty3D* prop = nullptr,
IProgressIndicator* indicator = nullptr );
/** \brief \ru Записать модель в файл обменного формата.
\en Write the model into an exchange format file. \~
@@ -140,8 +141,8 @@ namespace c3d {
В противном случае экспорт идёт с умолчательными параметрами, соответствующими реализации ConvConvertorProperty3D. \~
\en The fileName argument is not used if converter properties are defined obviously, file path comes from the FullFilePath
method. Otherwise default parameters corresponding ConvConvertorProperty3D implementation are used for export.
\param[out] model - \ru Модель.
\en The model. \~
\param[out] model - \ru Экспортируемая модель.
\en The exported model. \~
\param[in] filePath - \ru Путь файла.
\en File path. \~
\param[in] prop - \ru Реализация интерфейса свойств конвертера.
@@ -153,9 +154,9 @@ namespace c3d {
\ingroup Exchange_Interface
*/
CONV_FUNC( MbeConvResType ) ExportIntoFile( MbModel& model,
const path_string& filePath,
IConvertorProperty3D* prop = nullptr,
IProgressIndicator* indicator = nullptr );
const path_string& filePath,
IConvertorProperty3D* prop = nullptr,
IProgressIndicator* indicator = nullptr );
/** \brief \ru Записать модель в файл обменного формата.
\en Write the model into an exchange format file. \~
@@ -163,22 +164,22 @@ namespace c3d {
В противном случае экспорт идёт с умолчательными параметрами, соответствующими реализации ConvConvertorProperty3D. \~
\en The fileName argument is not used if converter properties are defined obviously, file path comes from the FullFilePath
method. Otherwise default parameters corresponding ConvConvertorProperty3D implementation are used for export.
\param[out] model - \ru Экспортируемый лемент.
\en The exported element. \~
\param[in] filePath - \ru Путь файла.
\en File path. \~
\param[in] prop - \ru Реализация интерфейса свойств конвертера.
\en Implementation of converter's properties interface. \~
\param[in] indicator - \ru Индикатор хода процесса.
\en The process progress indicator. \~
\param[out] item - \ru Экспортируемый элемент.
\en The exported element. \~
\param[in] filePath - \ru Путь файла.
\en File path. \~
\param[in] prop - \ru Реализация интерфейса свойств конвертера.
\en Implementation of converter's properties interface. \~
\param[in] indicator -\ru Индикатор хода процесса.
\en The process progress indicator. \~
\return \ru Код завершения операции.
\en Code of the operation termination. \~
\en Code of the operation termination. \~
\ingroup Exchange_Interface
*/
CONV_FUNC( MbeConvResType ) ExportIntoFile( MbItem& item,
const path_string& filePath,
IConvertorProperty3D* prop = nullptr,
IProgressIndicator* indicator = nullptr );
const path_string& filePath,
IConvertorProperty3D* prop = nullptr,
IProgressIndicator* indicator = nullptr );
/** \brief \ru Записать модельный документ в файл обменного формата.
\en Write the model into an exchange format file. \~
@@ -186,29 +187,29 @@ namespace c3d {
В противном случае экспорт идёт с умолчательными параметрами, соответствующими реализации ConvConvertorProperty3D. \~
\en The fileName argument is not used if converter properties are defined obviously, file path comes from the FullFilePath
method. Otherwise default parameters corresponding ConvConvertorProperty3D implementation are used for export.
\param[in] mDoc - \ru Экспортируемый модельный документ.
\en The exported model document. \~
\param[in] mDoc - \ru Экспортируемый модельный документ.
\en The exported model document. \~
\param[in] filePath - \ru Путь файла.
\en File path. \~
\en File path. \~
\param[in] prop - \ru Реализация интерфейса свойств конвертера.
\en Implementation of converter's properties interface. \~
\en Implementation of converter's properties interface. \~
\param[in] indicator - \ru Индикатор хода процесса.
\en The process progress indicator. \~
\en The process progress indicator. \~
\return \ru Код завершения операции.
\en Code of the operation termination. \~
\en Code of the operation termination. \~
\ingroup Exchange_Interface
*/
CONV_FUNC( MbeConvResType ) ExportIntoFile( ItModelDocument& mDoc,
const path_string& filePath,
IConvertorProperty3D* prop = nullptr,
IProgressIndicator* indicator = nullptr );
const path_string& filePath,
IConvertorProperty3D* prop = nullptr,
IProgressIndicator* indicator = nullptr );
/** \brief \ru Импортировать данные из буфера в модель.
\en Import data from buffer into model. \~
\param[out] model - \ru Модель.
\en The model. \~
\param[in] buffer - \ru Буфер.
\param[out] model - \ru Импортируемая модель.
\en The imported model. \~
\param[in] buffer - \ru Буфер.
\en Buffer. \~
\param[in] modelFormat - \ru Формат модели.
\en Model format. \~
@@ -221,62 +222,62 @@ namespace c3d {
\ingroup Exchange_Interface
*/
CONV_FUNC( MbeConvResType ) ImportFromBuffer( MbModel& model,
const C3DExchangeBuffer& buffer,
MbeModelExchangeFormat modelFormat,
IConvertorProperty3D* prop = nullptr,
IProgressIndicator* indicator = nullptr );
const C3DExchangeBuffer& buffer,
MbeModelExchangeFormat modelFormat,
IConvertorProperty3D* prop = nullptr,
IProgressIndicator* indicator = nullptr );
/** \brief \ru Импортировать данные из буфера в модель.
\en Import data from buffer into model. \~
\param[out] item - \ru Замещаемый элемент.
\en The item to replace. \~
\param[out] item - \ru Импортируемый элемент.
\en The imported item. \~
\param[in] buffer - \ru Буфер.
\en Buffer. \~
\param[in] modelFormat - \ru Формат модели.
\en Model format. \~
\en Model format. \~
\param[in] prop - \ru Реализация интерфейса свойств конвертера.
\en Implementation of converter's properties interface. \~
\en Implementation of converter's properties interface. \~
\param[in] indicator - \ru Индикатор хода процесса.
\en The process progress indicator. \~
\en The process progress indicator. \~
\return \ru Код завершения операции.
\en Code of the operation termination. \~
\en Code of the operation termination. \~
\ingroup Exchange_Interface
*/
CONV_FUNC( MbeConvResType ) ImportFromBuffer( c3d::ItemSPtr& item,
const C3DExchangeBuffer& buffer,
MbeModelExchangeFormat modelFormat,
IConvertorProperty3D* prop = nullptr,
IProgressIndicator* indicator = nullptr );
const C3DExchangeBuffer& buffer,
MbeModelExchangeFormat modelFormat,
IConvertorProperty3D* prop = nullptr,
IProgressIndicator* indicator = nullptr );
/** \brief \ru Импортировать данные из буфера в модель.
\en Import data from buffer into model. \~
\param[out] mDoc - \ru Модельный документ.
\en Model document. \~
\param[out] mDoc - \ru Импортируемый модельный документ.
\en The imported model document. \~
\param[in] buffer - \ru Буфер.
\en Buffer. \~
\param[in] modelFormat - \ru Формат модели.
\en Model format. \~
\en Model format. \~
\param[in] prop - \ru Реализация интерфейса свойств конвертера.
\en Implementation of converter's properties interface. \~
\en Implementation of converter's properties interface. \~
\param[in] indicator - \ru Индикатор хода процесса.
\en The process progress indicator. \~
\en The process progress indicator. \~
\return \ru Код завершения операции.
\en Code of the operation termination. \~
\en Code of the operation termination. \~
\ingroup Exchange_Interface
*/
CONV_FUNC( MbeConvResType ) ImportFromBuffer( ItModelDocument& mDoc,
const C3DExchangeBuffer& buffer,
MbeModelExchangeFormat modelFormat,
IConvertorProperty3D* prop = nullptr,
IProgressIndicator* indicator = nullptr );
const C3DExchangeBuffer& buffer,
MbeModelExchangeFormat modelFormat,
IConvertorProperty3D* prop = nullptr,
IProgressIndicator* indicator = nullptr );
/** \brief \ru Экспортировать модель в буфер.
\en Export model into buffer. \~
\param[in] model - \ru Модель.
\en The model. \~
\param[in] model - \ru Экспортируемая модель.
\en The exported model. \~
\param[in] modelFormat - \ru Формат модели.
\en Model format. \~
\param[out] buffer - \ru Буфер.
@@ -290,16 +291,16 @@ namespace c3d {
\ingroup Exchange_Interface
*/
CONV_FUNC( MbeConvResType ) ExportIntoBuffer( MbModel& model,
MbeModelExchangeFormat modelFormat,
C3DExchangeBuffer& buffer,
IConvertorProperty3D* prop = nullptr,
IProgressIndicator* indicator = nullptr );
MbeModelExchangeFormat modelFormat,
C3DExchangeBuffer& buffer,
IConvertorProperty3D* prop = nullptr,
IProgressIndicator* indicator = nullptr );
/** \brief \ru Экспортировать модель в буфер.
\en Export model into buffer. \~
\param[in] item - \ru Экспортируемый элемент.
\en The item to export. \~
\en The exported item. \~
\param[in] modelFormat - \ru Формат модели.
\en Model format. \~
\param[out] buffer - \ru Буфер.
@@ -313,10 +314,10 @@ namespace c3d {
\ingroup Exchange_Interface
*/
CONV_FUNC( MbeConvResType ) ExportIntoBuffer( MbItem& item,
MbeModelExchangeFormat modelFormat,
C3DExchangeBuffer& buffer,
IConvertorProperty3D* prop = nullptr,
IProgressIndicator* indicator = nullptr );
MbeModelExchangeFormat modelFormat,
C3DExchangeBuffer& buffer,
IConvertorProperty3D* prop = nullptr,
IProgressIndicator* indicator = nullptr );
/** \brief \ru Экспортировать модельный документ в буфер.
\en Export model document into buffer. \~
@@ -335,10 +336,10 @@ namespace c3d {
\ingroup Exchange_Interface
*/
CONV_FUNC( MbeConvResType ) ExportIntoBuffer( ItModelDocument& item,
MbeModelExchangeFormat modelFormat,
C3DExchangeBuffer& buffer,
IConvertorProperty3D* prop = nullptr,
IProgressIndicator* indicator = nullptr );
MbeModelExchangeFormat modelFormat,
C3DExchangeBuffer& buffer,
IConvertorProperty3D* prop = nullptr,
IProgressIndicator* indicator = nullptr );
//------------------------------------------------------------------------------
/** \brief \ru Буфер для обмена.
@@ -433,6 +434,13 @@ public:
*/
virtual void SetDeveloperEventLogger( SPtr<IConverterEventLogger> importEventLogger ) = 0;
/** \brief \ru Установить передачу метаданных.
\en Set metadata transfer. \~
\param[in] importEventLogger - \ru Указатель на устанавливаемый обработчик.
\en Pointer to handler to be set. \~
*/
virtual void SetMetadataTransferCallback( SPtr<IConverterMetadataReceiver> metadataTransferCallback ) = 0;
/** \brief \ru Прочитать файл формата SAT.
\en Read a file of SAT format. \~
@@ -822,7 +830,23 @@ public:
\en EXPEREIMENTAL \~.
\ingroup ASCII_Exchange
*/
virtual MbeConvResType LoadForeignReader( const c3d::path_string& pluginName, const c3d::optionNameValuePairs_t& pluginSpecificSettings, IConfigurationSelector * configSelector = 0 ) = 0;
virtual MbeConvResType LoadForeignReader( const c3d::path_string& pluginName, const c3d::optionNameValuePairs_t& pluginSpecificSettings, IConfigurationSelector * configSelector ) = 0;
/** \brief \ru Загрузить плагин получения данных для построения модели.
\en Load plugin for getting information necessary to build model. \~
\details \ru Описание специфичных для плагина настроек следует получить у поставщика комопонента.
\en The description of plugin-specific settings shoud be taken from the plugin's vendor. \~
\note \ru Экспериментальное API. \en Expereimental API. \~
\param[in] pluginName - \ru Имя подключаемого файла.
\en Name of the file to link. \~
\param[in] pluginSpecificSettings - \ru Специфические для плагина настройки.
\en Plugin-specific settings. \~
\return \ru Код завершения операции.
\en Code of the operation termination. \~
\ingroup ASCII_Exchange
*/
virtual MbeConvResType LoadForeignReader( const c3d::path_string& pluginName, const c3d::optionNameValuePairs_t& pluginSpecificSettings ) = 0;
/** \brief \ru Отключить загруженный плагин получения данных для построения модели.
@@ -864,7 +888,7 @@ public:
/** \brief \ru Задать параметры для сохранения данных на этапе предварительного импорта.
\en Set parameters to save datа at the stage of preliminary import. \~
\en Set parameters to save data at the stage of preliminary import. \~
\param[in] attrCollector - \ru Реализация интерфейса для сохранения имен атрибутов модели.
\en Implementation of the interface for collecting model attribute names. . \~
\param[in] configSelector - \ru Реализация интерфейса выбора конфигурации файла.
@@ -934,294 +958,6 @@ inline IConverter3D* GetConvertor3D() { return GetConverter3D(); }
inline void ReleaseConvertor3D( IConverter3D* convInstance ) { ReleaseConverter3D( convInstance ); }
/** \brief \ru Прочитать файл формата SAT.
\en Read a file of SAT format. \~
\param[in] prop - \ru Реализация интерфейса свойств конвертера.
\en Implementation of converter's properties interface. \~
\param[in] idoc - \ru Реализация интерфейса документа.
\en Implementation of document interface. \~
\param[in] indicator - \ru Индикатор хода процесса.
\en The process progress indicator. \~
\return \ru Код завершения операции.
\en Code of the operation termination. \~
\ingroup ACIS_Exchange
*/
CONV_FUNC( MbeConvResType ) SATRead( IConvertorProperty3D& prop, ItModelDocument& idoc, IProgressIndicator* indicator );
/** \brief \ru Записать файл формата SAT.
\en Write file of SAT format. \~
\details \ru Записать файл формата SAT или указанный поток.
Если задан поток, то запись производится в присланный поток.
Если поток не задан (нулевой), то открывается поток для файла, заданного в свойствах конвертера. \n
\en Write file of SAT format or the specified stream.
If a stream is specified, then the record is performed to the given stream.
If a stream is not specified (null), then a stream is being opened for file specified in the properties of the converter. \n \~
\param[in] prop - \ru Реализация интерфейса свойств конвертера.
\en Implementation of converter's properties interface. \~
\param[in] idoc - \ru Реализация интерфейса документа.
\en Implementation of document interface. \~
\param[in] indicator - \ru Индикатор хода процесса (может быть nullptr).
\en The process progress indicator (can be nullptr). \~
\return \ru Код завершения операции.
\en Code of the operation termination. \~
\ingroup ACIS_Exchange
*/
CONV_FUNC( MbeConvResType ) SATWrite( IConvertorProperty3D& prop, ItModelDocument& idoc, IProgressIndicator* indicator );
/** \brief \ru Прочитать файл формата IGES.
\en Read a file of IGES format. \~
\param[in] prop - \ru Реализация интерфейса свойств конвертера.
\en Implementation of converter's properties interface. \~
\param[in] idoc - \ru Реализация интерфейса документа.
\en Implementation of document interface. \~
\param[in] indicator - \ru Индикатор хода процесса.
\en The process progress indicator. \~
\return \ru Код завершения операции.
\en Code of the operation termination. \~
\ingroup IGES_Exchange
*/
CONV_FUNC( MbeConvResType ) IGSRead( IConvertorProperty3D& prop, ItModelDocument& idoc, IProgressIndicator* indicator = 0 );
/** \brief \ru Записать файл формата IGES.
\en Write a file of IGES format. \~
\param[in] prop - \ru Реализация интерфейса свойств конвертера.
\en Implementation of converter's properties interface. \~
\param[in] idoc - \ru Реализация интерфейса документа.
\en Implementation of document interface. \~
\param[in] indicator - \ru Индикатор хода процесса.
\en The process progress indicator. \~
\return \ru Код завершения операции.
\en Code of the operation termination. \~
\ingroup IGES_Exchange
*/
CONV_FUNC( MbeConvResType ) IGSWrite( IConvertorProperty3D& prop, ItModelDocument& idoc, IProgressIndicator* indicator = 0 );
/** \brief \ru Прочитать файл формата JT.
\en Read a file of JT format. \~
\param[in] prop - \ru Реализация интерфейса свойств конвертера.
\en Implementation of converter's properties interface. \~
\param[in] idoc - \ru Реализация интерфейса документа.
\en Implementation of document interface. \~
\param[in] indicator - \ru Индикатор хода процесса.
\en The process progress indicator. \~
\return \ru Код завершения операции.
\en Code of the operation termination. \~
\ingroup IGES_Exchange
*/
CONV_FUNC( MbeConvResType ) JTRead( IConvertorProperty3D& prop, ItModelDocument& idoc, IProgressIndicator* indicator = 0 );
/** \brief \ru Записать файл формата JT.
\en Write a file of JT format. \~
\param[in] prop - \ru Реализация интерфейса свойств конвертера.
\en Implementation of converter's properties interface. \~
\param[in] idoc - \ru Реализация интерфейса документа.
\en Implementation of document interface. \~
\param[in] indicator - \ru Индикатор хода процесса.
\en The process progress indicator. \~
\return \ru Код завершения операции.
\en Code of the operation termination. \~
\ingroup IGES_Exchange
*/
CONV_FUNC( MbeConvResType ) JTWrite( IConvertorProperty3D& prop, ItModelDocument& idoc, IProgressIndicator* indicator = 0 );
/** \brief \ru Прочитать файл формата Parasolid.
\en Read a file of Parasolid format. \~
\param[in] prop - \ru Реализация интерфейса свойств конвертера.
\en Implementation of converter's properties interface. \~
\param[in] idoc - \ru Реализация интерфейса документа.
\en Implementation of document interface. \~
\param[in] indicator - \ru Индикатор хода процесса.
\en The process progress indicator. \~\~
\return \ru Код завершения операции.
\en Code of the operation termination. \~
\ingroup Parasolid_Exchange
*/
CONV_FUNC( MbeConvResType ) XTRead( IConvertorProperty3D& prop, ItModelDocument& idoc, IProgressIndicator* indicator = 0 );
/** \brief \ru Записать файл формата Parasolid.
\en Write a file of Parasolid format. \~
\param[in] prop - \ru Реализация интерфейса свойств конвертера.
\en Implementation of converter's properties interface. \~
\param[in] idoc - \ru Реализация интерфейса документа.
\en Implementation of document interface. \~
\param[in] indicator - \ru Индикатор хода процесса.
\en The process progress indicator. \~
\return \ru Код завершения операции.
\en Code of the operation termination. \~
\ingroup Parasolid_Exchange
*/
CONV_FUNC( MbeConvResType ) XTWrite( IConvertorProperty3D& prop, ItModelDocument& idoc, IProgressIndicator* indicator = 0 );
/** \brief \ru Прочитать файл формата STEP.
\en Read a file of STEP format. \~
\param[in] prop - \ru Реализация интерфейса свойств конвертера.
\en Implementation of converter's properties interface. \~
\param[in] idoc - \ru Реализация интерфейса документа.
\en Implementation of document interface. \~
\param[in] indicator - \ru Индикатор хода процесса.
\en The process progress indicator. \~
\return \ru Код завершения операции.
\en Code of the operation termination. \~
\ingroup STEP_Exchange
*/
CONV_FUNC( MbeConvResType ) STEPRead( IConvertorProperty3D& prop, ItModelDocument& idoc, IProgressIndicator* indicator = 0 );
/** \brief \ru Записать файл формата STEP.
\en Write a file of STEP format. \~
\param[in] prop - \ru Реализация интерфейса свойств конвертера.
\en Implementation of converter's properties interface. \~
\param[in] idoc - \ru Реализация интерфейса документа.
\en Implementation of document interface. \~
\param[in] indicator - \ru Индикатор хода процесса.
\en The process progress indicator. \~
\return \ru Код завершения операции.
\en Code of the operation termination. \~
\ingroup STEP_Exchange
*/
CONV_FUNC( MbeConvResType ) STEPWrite( IConvertorProperty3D& prop, ItModelDocument& idoc, IProgressIndicator* indicator = 0 );
/** \brief \ru Прочитать файл формата STL.
\en Read a file of STL format. \~
\param[in] prop - \ru Реализация интерфейса свойств конвертера.
\en Implementation of converter's properties interface. \~
\param[in] idoc - \ru Реализация интерфейса документа.
\en Implementation of document interface. \~
\param[in] indicator - \ru Индикатор хода процесса.
\en The process progress indicator. \~
\return \ru Код завершения операции.
\en Code of the operation termination. \~
\ingroup STL_Exchange
*/
CONV_FUNC( MbeConvResType ) STLRead( IConvertorProperty3D& prop, ItModelDocument& idoc, IProgressIndicator* indicator = 0 );
/** \brief \ru Записать файл формата STL.
\en Write a file of STL format. \~
\param[in] prop - \ru Реализация интерфейса свойств конвертера.
\en Implementation of converter's properties interface. \~
\param[in] idoc - \ru Реализация интерфейса документа.
\en Implementation of document interface. \~
\param[in] indicator - \ru Индикатор хода процесса.
\en The process progress indicator. \~
\return \ru Код завершения операции.
\en Code of the operation termination. \~
\ingroup STL_Exchange
*/
CONV_FUNC( MbeConvResType ) STLWrite( IConvertorProperty3D& prop, ItModelDocument& idoc, IProgressIndicator* indicator = 0 );
/** \brief \ru Прочитать файл формата OBJ.
\en Read a file of OBJ format. \~
\param[in] prop - \ru Реализация интерфейса свойств конвертера.
\en Implementation of converter's properties interface. \~
\param[in] idoc - \ru Реализация интерфейса документа.
\en Implementation of document interface. \~
\param[in] indicator - \ru Индикатор хода процесса.
\en The process progress indicator. \~
\return \ru Код завершения операции.
\en Code of the operation termination. \~
\ingroup VRML_Exchange
*/
CONV_FUNC( MbeConvResType ) OBJRead( IConvertorProperty3D& prop, ItModelDocument& idoc, IProgressIndicator* indicator = 0 );
/** \brief \ru Прочитать файл формата VRML.
\en Read a file of VRML format. \~
\param[in] prop - \ru Реализация интерфейса свойств конвертера.
\en Implementation of converter's properties interface. \~
\param[in] idoc - \ru Реализация интерфейса документа.
\en Implementation of document interface. \~
\param[in] indicator - \ru Индикатор хода процесса.
\en The process progress indicator. \~
\return \ru Код завершения операции.
\en Code of the operation termination. \~
\ingroup VRML_Exchange
*/
CONV_FUNC( MbeConvResType ) VRMLRead( IConvertorProperty3D& prop, ItModelDocument& idoc, IProgressIndicator* indicator = 0 );
/** \brief \ru Прочитать файл формата GRDECL.
\en Read a file of GRDECL format. \~
\param[in] prop - \ru Реализация интерфейса свойств конвертера.
\en Implementation of converter's properties interface. \~
\param[in] idoc - \ru Реализация интерфейса документа.
\en Implementation of document interface. \~
\param[in] indicator - \ru Индикатор хода процесса.
\en The process progress indicator. \~
\return \ru Код завершения операции.
\en Code of the operation termination. \~
\ingroup VRML_Exchange
*/
CONV_FUNC( MbeConvResType ) GRDECLRead( IConvertorProperty3D& prop, ItModelDocument& idoc, IProgressIndicator* indicator = 0 );
/** \brief \ru Записать файл формата GRDECL.
\en Write a file of GRDECL format. \~
\param[in] prop - \ru Реализация интерфейса свойств конвертера.
\en Implementation of converter's properties interface. \~
\param[in] idoc - \ru Реализация интерфейса документа.
\en Implementation of document interface. \~
\param[in] indicator - \ru Индикатор хода процесса.
\en The process progress indicator. \~
\return \ru Код завершения операции.
\en Code of the operation termination. \~
\ingroup STL_Exchange
*/
CONV_FUNC( MbeConvResType ) GRDECLWrite( IConvertorProperty3D& prop, ItModelDocument& idoc, IProgressIndicator* indicator = 0 );
/** \brief \ru Записать файл формата VRML.
\en Write a file of VRML format. \~
\param[in] prop - \ru Реализация интерфейса свойств конвертера.
\en Implementation of converter's properties interface. \~
\param[in] idoc - \ru Реализация интерфейса документа.
\en Implementation of document interface. \~
\param[in] indicator - \ru Индикатор хода процесса.
\en The process progress indicator. \~
\return \ru Код завершения операции.
\en Code of the operation termination. \~
\ingroup VRML_Exchange
*/
CONV_FUNC( MbeConvResType ) VRMLWrite( IConvertorProperty3D& prop, ItModelDocument& idoc, IProgressIndicator* indicator = 0 );
/** \brief \ru Записать файл формата 3MF.
\en Write a file of 3MF format. \~
\param[in] prop - \ru Реализация интерфейса свойств конвертера.
\en Implementation of converter's properties interface. \~
\param[in] idoc - \ru Реализация интерфейса документа.
\en Implementation of document interface. \~
\param[in] indicator - \ru Индикатор хода процесса.
\en The process progress indicator. \~
\return \ru Код завершения операции.
\en Code of the operation termination. \~
\ingroup VRML_Exchange
*/
CONV_FUNC( MbeConvResType ) ThreeMFWrite( IConvertorProperty3D& prop, ItModelDocument& idoc, IProgressIndicator* indicator = 0 );
/** \brief \ru Прочитать файл с облаком точек в формате ASCII.
\en Read a file of ASCII Point Cloud format. \~
\param[in] prop - \ru Реализация интерфейса свойств конвертера.
\en Implementation of converter's properties interface. \~
\param[in] idoc - \ru Реализация интерфейса документа.
\en Implementation of document interface. \~
\param[in] indicator - \ru Индикатор хода процесса.
\en The process progress indicator. \~
\return \ru Код завершения операции.
\en Code of the operation termination. \~
\ingroup ASCII_Exchange
*/
CONV_FUNC( MbeConvResType ) ASCIIPointCloudRead( IConvertorProperty3D& prop, ItModelDocument& idoc, IProgressIndicator* indicator = 0 );
/** \brief \ru Записать файл с облаком точек в формате ASCII..
\en Write a point cloud file of ASCII format. \~
\param[in] prop - \ru Реализация интерфейса свойств конвертера.
\en Implementation of converter's properties interface. \~
\param[in] idoc - \ru Реализация интерфейса документа.
\en Implementation of document interface. \~
\param[in] indicator - \ru Индикатор хода процесса.
\en The process progress indicator. \~
\return \ru Код завершения операции.
\en Code of the operation termination. \~
\ingroup ASCII_Exchange
*/
CONV_FUNC( MbeConvResType ) ASCIIPointCloudWrite( IConvertorProperty3D& prop, ItModelDocument& idoc, IProgressIndicator* indicator = 0 );
/** \} */
+177
View File
@@ -0,0 +1,177 @@
#ifndef MODEL_TREE_LINEARIZED_H
#define MODEL_TREE_LINEARIZED_H
#include <conv_model_document.h>
#include <mb_matrix.h>
#include <solid.h>
#include <vector>
//------------------------------------------------------------------------------
// Данные терминатора
// ---
struct TerminatorData
{
int type;
double parameter;
double sizeX;
double sizeY;
bool sameDirection;
};
//------------------------------------------------------------------------------
// Данные кривой с терминаторами
// ---
struct DecoratedCurveData
{
int curveType;
std::vector<TerminatorData> terminators;
};
//------------------------------------------------------------------------------
// Данные размера
// ---
struct DimensionData
{
double value;
double valuePlus;
double valueMinus;
bool isRangeSet;
bool isValueDefined;
std::vector<DecoratedCurveData> decoratedCurves;
};
//------------------------------------------------------------------------------
// Контейнер элементов с вхождениями
// ---
template <typename ReferencedItemType>
class LinearizedContainer {
ReferencedItemType item;
mutable std::vector<MbMatrix3D> references;
public:
// Конструктор по умолчанию
LinearizedContainer() = default;
// Конструктор копирования по умолчанию
LinearizedContainer(const LinearizedContainer& i) = default;
// Конструктор
LinearizedContainer(const ReferencedItemType& it)
: item( it )
, references() {
}
// Оператор сравнения
bool operator ==(const LinearizedContainer& to) const {
return item == to.item;
}
// Получить элемент-ключ
ReferencedItemType Item() const {
return item;
}
// Получить число вхождений
size_t ReferencesCount() const {
return references.size();
}
// Получить матрицу вхождения по индексу
MbMatrix3D Reference( size_t index ) const {
MbMatrix3D result;
if ( index < ReferencesCount() )
result = references[index];
return result;
}
// Добавить матрицу вхождения
void AddReference( const MbMatrix3D& matr ) {
references.push_back( matr );
}
};
typedef std::vector<LinearizedContainer<ModelPartPtr>> PartsLinearized;
typedef std::vector<LinearizedContainer<ModelAssemblyPtr>> AssembliesLinearized;
typedef std::vector<LinearizedContainer<c3d::SolidSPtr>> SolidsLinearized;
//------------------------------------------------------------------------------
// Документ
// ---
class CONV_CLASS LinearizedTreeDocument : public C3dModelDocument
{
PartsLinearized parts;
AssembliesLinearized assemblies;
SolidsLinearized solids;
std::vector<SPtr<MbCurve3D>> spaceCurves;
std::vector<SPtr<MbMesh>> meshes;
vector_of_annotation annotations;
vector_of_annotation techReq;
//IFC data
std::vector<SPtr<MbInstance>> mappedItems;
std::vector<SPtr<MbItem>> axisGrids;
std::vector<SPtr<MbAssistingItem>> lscItems;
std::vector<SPtr<MbItem>> boundaryItems;
bool calculateMIP;
bool sliceSolids;
public:
// Конструктор
LinearizedTreeDocument();
// Деструктор
~LinearizedTreeDocument();
PartsLinearized GetPartsList() const;
AssembliesLinearized GetAssembliesList() const;
// Заполнить данные
void FillLinearizedData();
private:
// Заполнены ли данные
bool IsFilled();
bool GetSolid( const size_t ind, c3d::SolidSPtr& sld ) const;
void SetSliceSolids( const bool val ) { sliceSolids = val; }
// Заполнить списки компонент
void FillComponents();
// Заполнить списки объектов
void FillObjectsFromComponents();
// Обработать сборку со вставками
void ProcessAssembly( ModelAssemblyPtr assm, const MbMatrix3D & matr );
// Добавить деталь
void AddPart( ModelPartPtr prt, const MbMatrix3D & matr );
// Добавить сборку
void AddAssembly( ModelAssemblyPtr assm, const MbMatrix3D & matr );
// Добавить тело
void AddSolid( c3d::SolidSPtr sld, const MbMatrix3D & matr );
// Добавить объекты, специфичные для IFC
template<typename PartAssType>
void AddIFCObjects(PartAssType part);
// Добавить содержимое mappedItem
void AddMappedItemContent( MbItem &item, const MbMatrix3D& matr = MbMatrix3D());
// Выдать данные размера
void GetPmiDimensionData( MaDimension & dimension, DimensionData & dimData );
// Сбросить данные размера
void UnsetPmiDimensionData( DimensionData & dimData );
// Выдать данные кривой с терминаторами
void GetPmiDecoratedCurveData( MaDecoratedCurve & decoratedCurve, DecoratedCurveData & decCurveData );
// Выдать данные терминатора
void GetPmiTerminatorData( MaTerminatorSymbol & terminator, TerminatorData & termData );
// Выдать идентификатор
bool GetCadItemIdentifier( const MbAttributeContainer& item, ptrdiff_t & id );
// Резка тела координатными плоскостями
void SolidPlaneCutting( const MbSolid & solid, std::vector<MbResultType> & cutRes );
// Резка тела
MbResultType SolidCut( const MbSolid & solid, const MbSurface & surf, bool forward );
};
#endif //MODEL_TREE_LINEARIZED_H
+54
View File
@@ -0,0 +1,54 @@
////////////////////////////////////////////////////////////////////////////////
/**
\file
\brief \ru Функции преобразования данных из устаревшего MaAnnotationItem в актуальный MbPmi и обратно.
\en Functions for converting data from depicated MaAnnotationItem to current MbPmi and back. \~
*/
////////////////////////////////////////////////////////////////////////////////
#ifndef __CONV_PMI_DEPRICATED_CONVERT_H
#define __CONV_PMI_DEPRICATED_CONVERT_H
#include <mb_pmi.h>
#include <conv_annotation_item.h>
class MaAnnotationItem;
class MbPMI;
class MaTextItem;
class MbTextItem;
//------------------------------------------------------------------------------
/** \brief \ru Преобразовать элемент аннотации.
\en Transform annotation item. \~
*/
// ---
CONV_FUNC( SPtr<MbPMI> ) ConvertPMI( const MaAnnotationItem & it );
//------------------------------------------------------------------------------
/** \brief \ru Преобразовать элемент технического требования.
\en Transform technical requirements. \~
*/
// ---
CONV_FUNC( SPtr<MbPMI> ) ConvertTechnicalRequirements( const MaAnnotationItem & it );
//------------------------------------------------------------------------------
/** \brief \ru Преобразовать элемент аннотации.
\en Transform annotation item. \~
*/
// ---
CONV_FUNC( SPtr<MaAnnotationItem> ) ConvertPMI( const MbPMI & it );
//------------------------------------------------------------------------------
// Преобразовать текстовый элемент
// ---
SPtr<MbTextItem> CreateTextItem( const MaTextItem & it );
//------------------------------------------------------------------------------
// Преобразовать текстовый элемент
// ---
SPtr<MaTextItem> CreateTextItem( const MbTextItem & it );
#endif // __CONV_PMI_DEPRICATED_CONVERT_H
+69 -4
View File
@@ -12,6 +12,7 @@
#include <reference_item.h>
#include <math_define.h>
#include <tool_cstring.h>
@@ -23,7 +24,7 @@
\en Called on import once if the model contains contains more than one configurations. \~
*/
// ---
class IConfigurationSelector : public MbRefItem
class CONV_CLASS IConfigurationSelector : public MbRefItem
{
public:
// \ru Конструктор по умолчанию. \en Default constructor.
@@ -61,7 +62,7 @@ public:
\en EXPEREIMENTAL. \~
*/
// ---
class IAttributeNamesCollector : public MbRefItem
class CONV_CLASS IAttributeNamesCollector : public MbRefItem
{
public:
virtual void AddAttributeName( const c3d::string_t& configurationName ) = 0;
@@ -80,7 +81,7 @@ public:
\en Using methods of the IConvertorProperty3D interface recommended. \~
*/
// ---
class IScaleRequestor : public MbRefItem
class CONV_CLASS IScaleRequestor : public MbRefItem
{
public:
virtual double ScaleRequest() = 0;
@@ -97,7 +98,7 @@ public:
\en Using methods of the IConvertorProperty3D interface recommended. \~
*/
// ---
class IStitchRequestor : public MbRefItem
class CONV_CLASS IStitchRequestor : public MbRefItem
{
public:
virtual bool StitchRequest() = 0;
@@ -117,4 +118,68 @@ public:
};
//------------------------------------------------------------------------------
/** \brief \ru Интерфейс передачи метаданных.
\en Metadata transfer. \~
\details \ru Метаданные используются в тех случаях, когда исходные данные от
конвертеров плохо вписываются в геометрическую и атрибутивную модель. Пример метаданных -
альтернативные представления дерева модели.
\en Metadata are used in cases when geometric or attribute model doesn't
match structure of information from converters. Alternate tree sutrucure is a sample of
metadata. \~
*/
// ---
class CONV_CLASS IConverterMetadataReceiver : public MbRefItem
{
public:
/** \brief \ru Инициализировать передачу метаданных для элемента.
\en Initialize metadata transfer for item. \~
\details \ru Вызывается перед началом передачи метаданных, относящихся к элементу негеометрических данных, с целью подготовки приемника.
\en Should be called before metadata related to non-geometric element to prepare the reciever. \~
\param[in] category - \ru Категория, к которой относится элемент.
\en Category element belongs to.\~
\param[in] nameInCategory - \ru Название элемента внутри категории.
\en Element's name in category.\~
\param[in] contentType - \ru Представление передаваемых метаданных.
\en Representation of metadata.\~
\return \ru Признак, возможна ли передача метаданных.
\en Wether the metadata transfer is possible. \~
\note \ru Ожидается, что вызывается однократно для каждой пары категория - название.
\en Expected it is called once for each category - name pair. \~
*/
virtual bool InitMetadataForItem(const c3d::string_t& category, const c3d::string_t& nameInCategory, const c3d::string_t& contentType) = 0;
/** \brief \ru Завершить передачу метаданных для элемента.
\en Finalize metadata transfer for item. \~
\details \ru Вызывается после передачи метаданных, относящихся к элементу негеометрических данных, с целью освободить ресурсы.
\en Should be called after metadata related to non-geometric element to free related resources. \~
\param[in] category - \ru Категория, к которой относится элемент.
\en Category element belongs to.\~
\param[in] nameInCategory - \ru Название элемента внутри категории.
\en Element's name in category.
\note \ru Ожидается, что вызывается не более одного раза для каждой пары категория - название и только в случае, если передача была инициализирована успешно.
\en Expected it is called once for each category - name pair in case transfer is possible or not called otherwise. \~
*/
virtual void CloseMetadataForItem(const c3d::string_t& category, const c3d::string_t& nameInCategory) = 0;
/** \brief \ru Передать блок метаданных для элемента.
\en Transfer metadata block for item. \~
\param[in] category - \ru Категория, к которой относится элемент.
\en Category element belongs to.\~
\param[in] nameInCategory - \ru Название элемента внутри категории.
\en Element's name in category.\~
\param[in] metadataBuffer - \ru Адрес бинарного буфера, содержащего данные блока.
\en Binary buffer containing block data.\~
\param[in] bufferCapacity - \ru Длина бинарного буфера, содержащего данные блока.
\en Lenght of binary buffer containing block data.\~
\note \ru Возможен многократный вызов для каждой пары категория - название.
\en Many calls for each category - name are possible. \~
*/
virtual void TransferMetadataForItem(const c3d::string_t& category, const c3d::string_t& nameInCategory, const char* metadataBuffer, unsigned long int bufferCapacity) = 0;
};
#endif // __CONV_REQUESTOR_H
+13 -2
View File
@@ -9,6 +9,9 @@
#ifndef __CONV_RES_TYPE_H
#define __CONV_RES_TYPE_H
#include <string>
#include <math_define.h>
//------------------------------------------------------------------------------
/** \brief \ru Результат конвертирования.
\en Result of converting operation.
@@ -29,8 +32,16 @@ enum MbeConvResType {
cnv_LicenseNotFound, ///< \ru Ошибка получения лицензии. \en License check failure.
cnv_NotEnoughMemory, ///< \ru Недостаточно памяти. \en Not enough memory.
cnv_UnknownExtension, ///< \ru Неизвестное расширение файла. \en Unknown file extenstion.
cnv_UnsupportedVersion ///< \ru Неподдерживаемая версия формата. \en Unsupported format version.
cnv_UnsupportedVersion, ///< \ru Неподдерживаемая версия формата. \en Unsupported format version.
cnv_CannotLoadFormatSpecificComponent ///< \ru Не удалось загрузить плагин для чтения конкретного формата. \en Cannot load the plugin for reading this specific format.
};
//------------------------------------------------------------------------------
/** \brief \ru Получить строковое описание результата конвертирования.
\en Get string description of the result of converting operation.
\ingroup Data_Interface
*/
// ---
CONV_FUNC (std::string) MbeConvResTypeToString(MbeConvResType result);
#endif
#endif
+10 -10
View File
@@ -19,8 +19,7 @@
class MbGrid;
class MbFloatGrid;
class MbMesh;
class MbTriangle;
class MbItem;
namespace JTC {
@@ -45,14 +44,12 @@ namespace JTC {
typedef std::vector<MeshVertexPtr> MeshVertexVector;
typedef std::vector<MeshPolygonPtr> MeshPolygonVector;
typedef std::pair<MbTriangle, MbTriangle> TrianglePair;
//------------------------------------------------------------------------------
// Сетка с топологической информацией
// ---
class CONV_CLASS TopoMesh : public MbRefItem {
SPtr<const MbMesh> mesh;
protected:
SPtr<const MbItem> item;
TopoGridVector grids;
MeshVertexVector ownPoints;
MeshPolygonVector ownFacePolygons;
@@ -67,10 +64,10 @@ namespace JTC {
virtual ~TopoMesh();
/// Инициализировать
bool Init( const MbMesh& mesh, bool enableDiagnostics = false );
bool Init( const MbItem& mesh, bool enableDiagnostics = false );
/// Получить сетку
const MbMesh* GetMesh() const;
SPtr<const MbItem> GetMesh() const;
/// Число полигонов
size_t MeshPolygonsCount() const;
@@ -89,7 +86,7 @@ namespace JTC {
/// Получить вырожденные треуголники
std::map< size_t, std::vector<size_t> > GetDegeneratedTriangles() const;
/// Получить граничные точки сетки
std::vector<MbCartPoint3D> GetBoundaryPoints() const;
@@ -97,7 +94,7 @@ namespace JTC {
void Reset();
/// Получить следующую в цепочке граничную вершину.
size_t NextBoundaryVertex( size_t indexBoundaryVertex, const std::vector<size_t>& allBoundary ) const;
//unused:size_t NextBoundaryVertex( size_t indexBoundaryVertex, const std::vector<size_t>& allBoundary ) const;
/// Сформировать внешнюю границу начиная с указанной вершины.
bool InitVoidBoundFrom( std::vector<size_t>& freeBoundaryVerticis );
@@ -105,6 +102,9 @@ namespace JTC {
/// Получить точность задания расстояния.
double MetricTolerance() const;
/// Получить нормаль на сетке
void GetNormal( size_t indexGrid, size_t indexNormal, MbFloatVector3D& vNormal ) const;
OBVIOUS_PRIVATE_COPY( TopoMesh )
};
+329
View File
@@ -0,0 +1,329 @@
////////////////////////////////////////////////////////////////////////////////
/**
\file
\brief Создание топологических объектов по данным конвертеров.
*/
////////////////////////////////////////////////////////////////////////////////
#ifndef __CONV_TOPOLOGY_CREATOR_H
#define __CONV_TOPOLOGY_CREATOR_H
#include <vector>
#include <memory>
#include <templ_sptr.h>
#include <topology.h>
#include <se_elementary.h>
class MbSolid;
namespace c3d
{
namespace converter
{
//------------------------------------------------------------------------------
/** \brief \ru Менеджер вспомогательных операций работы с граничным представлением конвертеров.
\en . \~
\note \ru ЭКСПЕРИМЕНТАЛЬНАЯ.
\en EXPEREIMENTAL. \~
*/
class IConverterBrepManager
{
public:
virtual bool MakeSTEPEntities( MbSolid const & c3dBrep, std::vector<std::shared_ptr<const converter::SeBase>>& enitites ) = 0;
IConverterBrepManager() = default;
virtual ~IConverterBrepManager() = default;
private:
IConverterBrepManager( IConverterBrepManager const & ) = delete;
IConverterBrepManager( IConverterBrepManager && ) = delete;
const IConverterBrepManager& operator =( IConverterBrepManager const & ) = delete;
};
CONV_FUNC( std::shared_ptr<IConverterBrepManager> ) GetConverterBrepManager();
CONV_FUNC( void ) ReleaseConverterBrepManager( std::shared_ptr<IConverterBrepManager>& );
class ITopologyCreator;
//------------------------------------------------------------------------------
/** \brief \ru Перечисление типов ошибок входных данных.
\en Enumeration of input error types . \~
\note \ru ЭКСПЕРИМЕНТАЛЬНАЯ.
\en EXPEREIMENTAL. \~
*/
enum ETcCheckError {
eTcErrLoopTopo, /// \ru Цикл не замкнут топологически. \en Loop is not closed topologically .
eTcErrFacePlusMinus, /// \ru Некорректные указания на левые/правые грани. \en Incorrect pointers to the left/right faces.
eTcErrCurveType, /// \ru Некорректный тип кривой. \en Incorrect curve type .
eTcErrCount /// \ru Количество типов ошибок. \en Number of error types.
};
//------------------------------------------------------------------------------
/** \brief \ru Базовый класс топологических объектов.
\en . \~
\note \ru ЭКСПЕРИМЕНТАЛЬНАЯ.
\en EXPEREIMENTAL. \~
*/
class CONV_CLASS TcObject
{
protected:
mutable std::vector< ETcCheckError > aErr;
int thisID;
public:
/// \ru Конструктор. \en Constructor.
TcObject();
///< \ru Конструктор копирования. \en Copy constructor.
TcObject( const TcObject& init );
/// \ru Деструктор. \en Destructor.
~TcObject() {};
// Проверить исходные данные. \en Check input data.
virtual bool CheckInputData( ITopologyCreator& topCreator ) const;
// Исправить исходные данные. \en Heal input data.
virtual bool HealAllInputData( ITopologyCreator& topCreator );
virtual bool HealInputData( ITopologyCreator& topCreator, const ETcCheckError& err );
};
//------------------------------------------------------------------------------
/** \brief \ru Грань.
\en Face. \~
\note \ru ЭКСПЕРИМЕНТАЛЬНАЯ.
\en EXPEREIMENTAL. \~
*/
class CONV_CLASS TcFace : public TcObject
{
SPtr<MbSurface> surface; ///< \ru Поверхность грани. \en Face surface.
std::vector<size_t> loops; ///< \ru Индексы циклов в TopologyCreator. \en Loops indexes in TopologyCreator.
bool faceSense; ///< \ru Ориентация грани. \en Face orientation.
SPtr<MbFace> mbFace; ///< \ru Созданная грань. \en Created face.
public:
/// \ru Конструктор. \en Constructor.
TcFace( MbSurface & _surface, const std::vector<size_t> & _loops, bool _faceSense );
///< \ru Конструктор копирования. \en Copy constructor.
TcFace( const TcFace & init );
///< \ru Оператор присваивания. \en Assignment operator.
const TcFace & operator= ( const TcFace & init );
/// \ru Деструктор. \en Destructor.
~TcFace();
/// \ru Выдать грань. \en Get face.
MbFace * GetFace() const;
/// \ru Создать грань. \en Create face.
void Create( ITopologyCreator & topCreator );
// Проверить исходные данные. \en Check input data.
virtual bool CheckInputData( ITopologyCreator& topCreator) const;
// Исправить исходные данные. \en Heal input data.
virtual bool HealInputData( ITopologyCreator& topCreator, const ETcCheckError& err );
};
//------------------------------------------------------------------------------
/** \brief \ru Цикл.
\en Loop. \~
*/
class CONV_CLASS TcLoop : public TcObject
{
std::vector<size_t> orientedEdges; ///< \ru Индексы ориентированных ребер в TopologyCreator. \en Oriented edges indexes in TopologyCreator.
SPtr<MbLoop> mbLoop; ///< \ru Созданный цикл. \en Created loop.
public:
/// \ru Конструктор. \en Constructor.
TcLoop( const std::vector<size_t> & _orientedEdges );
///< \ru Конструктор копирования. \en Copy constructor.
TcLoop( const TcLoop & init );
///< \ru Оператор присваивания. \en Assignment operator.
const TcLoop & operator= ( const TcLoop & init );
/// \ru Деструктор. \en Destructor.
~TcLoop();
/// \ru Выдать цикл. \en Get loop.
MbLoop * GetLoop() const;
/// \ru Выдать ориентированные ребра. \en Get oriented edges.
void GetOrientedEdges( std::vector<size_t>& aEdges ) const;
/// \ru Создать цикл. \en Create loop.
void Create( ITopologyCreator & topCreator );
// Проверить исходные данные. \en Check input data.
virtual bool CheckInputData( ITopologyCreator& topCreator) const;
// Исправить исходные данные. \en Heal input data.
virtual bool HealInputData( ITopologyCreator& topCreator, const ETcCheckError& err );
};
//------------------------------------------------------------------------------
/** \brief \ru Ориентированное ребро.
\en Oriented edge. \~
\note \ru ЭКСПЕРИМЕНТАЛЬНАЯ.
\en EXPEREIMENTAL. \~
*/
class CONV_CLASS TcOrientedEdge : public TcObject
{
size_t curveEdge; ///< \ru Индекс ребра в TopologyCreator. \en Edge index in TopologyCreator.
bool orient; ///< \ru Ориентация ребра. \en Edge orientation.
SPtr<MbOrientedEdge> mbOrientedEdge; ///< \ru Созданное ориентированное ребро. \en Created oriented edge.
public:
/// \ru Конструктор. \en Constructor.
TcOrientedEdge( size_t _curveEdge, bool _orient );
///< \ru Конструктор копирования. \en Copy constructor.
TcOrientedEdge( const TcOrientedEdge & init );
///< \ru Оператор присваивания. \en Assignment operator.
const TcOrientedEdge & operator= ( const TcOrientedEdge & init );
/// \ru Деструктор. \en Destructor.
~TcOrientedEdge();
/// \ru Выдать ориентированное ребро. \en Get oriented edge.
MbOrientedEdge * GetOrientedEdge() const;
/// \ru Выдать индекс грани справа от ребра. \en Get index of the face to the right of the edge.
size_t GetFacePlusIndex( ITopologyCreator& topCreator ) const;
/// \ru Выдать индекс грани слева от ребра. \en Get index of the face to the left of the edge.
size_t GetFaceMinusIndex( ITopologyCreator& topCreator ) const;
/// \ru Выдать ориентацию ребро. \en Get orientation.
bool GetOrient() const { return orient; }
/// \ru Выдать индекс ребра. \en Get index of the edge.
size_t GetCurveEdge() const { return curveEdge; }
/// \ru Создать ориентированное ребро. \en Create oriented edge.
void Create( ITopologyCreator & topCreator );
//// Проверить исходные данные. \en Check input data.
//virtual bool CheckInputData( TopologyCreator& topCreator) const;
//// Исправить исходные данные. \en Heal input data.
//virtual bool HealInputData( TopologyCreator& topCreator, const ETcCheckError& err );
};
//------------------------------------------------------------------------------
/** \brief \ru Ребро.
\en Edge. \~
\note \ru ЭКСПЕРИМЕНТАЛЬНАЯ.
\en EXPEREIMENTAL. \~
*/
class CONV_CLASS TcCurveEdge : public TcObject
{
SPtr<MbCurve3D> curve3D; ///< \ru Трехмерная кривая ребра. \en 3D curve of edge.
size_t facePlus, faceMinus; ///< \ru Индексы граней ребра в TopologyCreator. \en Edge faces indexes in TopologyCreator.
size_t begVertex, endVertex; ///< \ru Индексы вершин ребра в TopologyCreator. \en Edge vertices indexes in TopologyCreator.
SPtr<MbCurveEdge> mbCurveEdge; ///< \ru Созданное ребро. \en Created edge.
public:
/// \ru Конструктор. \en Constructor.
TcCurveEdge( MbCurve3D & _curve3D, size_t _facePlus, size_t _faceMinus, size_t _begVertex, size_t _endVertex );
///< \ru Конструктор копирования. \en Copy constructor.
TcCurveEdge( const TcCurveEdge & init );
///< \ru Оператор присваивания. \en Assignment operator.
const TcCurveEdge & operator= ( const TcCurveEdge & init );
/// \ru Деструктор. \en Destructor.
~TcCurveEdge();
/// \ru Выдать ребро. \en Get edge.
MbCurveEdge * GetCurveEdge() const;
/// \ru Выдать индекс начальной вершины. \en Get index of the begin vertex.
size_t GetBegVertex( const bool orient ) const { return orient? begVertex : endVertex; }
/// \ru Выдать индекс конечной вершины. \en Get index of the end vertex.
size_t GetEndVertex( const bool orient ) const { return orient? endVertex : begVertex; }
/// \ru Выдать индекс грани справа от ребра. \en Get index of the face to the right of the edge.
size_t GetFacePlus() const { return facePlus; }
/// \ru Выдать индекс грани слева от ребра. \en Get index of the face to the left of the edge.
size_t GetFaceMinus() const { return faceMinus; }
/// \ru Создать ребро. \en Create edge.
void Create( ITopologyCreator & topCreator );
// Проверить исходные данные. \en Check input data.
bool CheckInputData( ITopologyCreator& topCreator ) const final;
// Исправить исходные данные. \en Heal input data.
bool HealInputData( ITopologyCreator& topCreator, const ETcCheckError& err ) final;
};
//------------------------------------------------------------------------------
/** \brief \ru Вершина.
\en Vertex. \~
\note \ru ЭКСПЕРИМЕНТАЛЬНАЯ.
\en EXPEREIMENTAL. \~
*/
class CONV_CLASS TcVertex : public TcObject
{
MbCartPoint3D point; ///< \ru Трехмерная точка. \en 3D point.
SPtr<MbVertex> mbVertex; ///< \ru Созданная вершина. \en Created vertex.
public:
/// \ru Конструктор. \en Constructor.
TcVertex( const MbCartPoint3D & _point );
///< \ru Конструктор копирования. \en Copy constructor.
TcVertex( const TcVertex & init );
///< \ru Оператор присваивания. \en Assignment operator.
const TcVertex & operator= ( const TcVertex & init );
/// \ru Деструктор. \en Destructor.
~TcVertex();
/// \ru Выдать вершину. \en Get vertex.
MbVertex * GetVertex() const;
/// \ru Создать вершину. \en Create vertex.
void Create( ITopologyCreator & topCreator );
//// Проверить исходные данные. \en Check input data.
//virtual bool CheckInputData( TopologyCreator& topCreator) const;
//// Исправить исходные данные. \en Heal input data.
//virtual bool HealInputData( TopologyCreator& topCreator, const ETcCheckError& err );
};
//------------------------------------------------------------------------------
/** \brief \ru Класс для создания тела по данным топологии.
\en Class for creating a solid by topology data. \~
\note \ru ЭКСПЕРИМЕНТАЛЬНАЯ.
\en EXPEREIMENTAL. \~
*/
class CONV_CLASS ITopologyCreator
{
public:
/// \ru Конструктор по умолчанию пустой. \en Default constructor.
ITopologyCreator() = default;
/// \ru Деструктор. \en Destructor.
virtual ~ITopologyCreator() = default;
/// \ru Инициализировать. \en Initialize.
virtual void Init( const std::vector<TcFace> & _faces, const std::vector<TcLoop> & _loops, const std::vector<TcOrientedEdge> & _orientedEdges, const std::vector<TcCurveEdge> & _curveEdges, const std::vector<TcVertex> & _vertices ) = 0;
/// \ru Выдать грань. \en Get face.
virtual TcFace * GetFace( size_t ) = 0;
/// \ru Выдать цикл. \en Get loop.
virtual TcLoop * GetLoop( size_t ) = 0;
/// \ru Выдать ориентированное ребро. \en Get oriented edge.
virtual TcOrientedEdge * GetOrientedEdge( size_t ) = 0;
/// \ru Выдать ребро. \en Get edge.
virtual TcCurveEdge * GetCurveEdge( size_t ) = 0;
/// \ru Выдать вершину. \en Get vertex.
virtual TcVertex * GetVertex( size_t ) = 0;
/// \ru Создать тело. \en Create solid.
virtual SPtr<MbSolid> CreateSolid() = 0;
private:
ITopologyCreator( ITopologyCreator const & ) = delete;
ITopologyCreator( ITopologyCreator && ) = delete;
ITopologyCreator const & operator=( ITopologyCreator const & ) = delete;
};
/// \ru Получить формирователь граничного представления C3D по 3D-данным. \en Get C3D boundary representation generator.
CONV_FUNC( std::shared_ptr<ITopologyCreator> ) GetC3DTopologyBuilder();
/// \ru Завершить работу формирователя граничного представления формата STEP. \en Release STEP boundary representation generator.
CONV_FUNC (void) ReleaseC3DTopologyBuilder( std::shared_ptr<ITopologyCreator>& );
};
};
#endif //__CONV_TOPOLOGY_CREATOR_H
+2 -2
View File
@@ -16,8 +16,8 @@
#include <name_item.h>
class MATH_CLASS MbNamedAttributeContainer;
class MATH_CLASS MbFaceShell;
class MbNamedAttributeContainer;
class MbFaceShell;
//------------------------------------------------------------------------------
+2
View File
@@ -60,6 +60,8 @@ public:
/** \} */
bool CreateWireFrame( MbWireFrame *&, MbeCopyMode, RPArray<MbSpaceItem> * ) override; // \ru Построить кривую по журналу построения. \en Create a curve from the history tree. \~
const MbPrecision & GetPrecision() const override { return _params; } // \ru Выдать точность построения. \en Get the precision of object construction.
OBVIOUS_PRIVATE_COPY( MbBeamCreator )
DECLARE_PERSISTENT_CLASS_NEW_DEL( MbBeamCreator )
+3 -56
View File
@@ -13,9 +13,9 @@
#include <creator.h>
class MATH_CLASS MbSolid;
class MATH_CLASS MbBooleanOperationParams;
struct MATH_CLASS MbBooleanFlags;
class MbSolid;
class MbBooleanOperationParams;
struct MbBooleanFlags;
//------------------------------------------------------------------------------
@@ -131,59 +131,6 @@ private :
IMPL_PERSISTENT_OPS( MbBooleanSolid )
//------------------------------------------------------------------------------
/** \brief \ru Создать оболочку булевой операции.
\en Create the shell of Boolean operation. \~
\deprecated \ru Функция устарела, взамен использовать #CreateBoolean с набором параметров #MbBooleanOperationParams.
\en The function is deprecated, instead use #CreateBoolean with the parameter list #MbBooleanOperationParams. \~
\details \ru Для указанных оболочек построить оболочку как результат булевой операции над оболочками тел.
Одновременно с построением оболочки функция создаёт её строитель. \n
\en Create a shell as a result of Boolean operation on the given shells of solids.
The function simultaneously constructs the shell and creates its constructor. \n \~
\param[in] shell1 - \ru Набор граней первого тела.
\en The set of faces of the first solid. \~
\param[in] sameShell1 - \ru Способ копирования граней первого тела.
\en Method of copying the faces of the first solid. \~
\param[in] shell2 - \ru Набор граней второго тела.
\en The second solid face set. \~
\param[in] sameShell2 - \ru Способ копирования граней второго тела.
\en Method of copying the faces of the second solid. \~
\param[in] creators - \ru Набор строителей первого и второго набора граней.
\en The set of creators of the first and the second face sets. \~
\param[in] sharedCount - \ru Количество общих строителей обоих наборов граней.
\en The number of shared creators of the both face sets. \~
\param[in] firstCount - \ru Количество строителей первого набора граней.
\en The number of creators of the first face set. \~
\param[in] oType - \ru Тип булевой операции.
\en A Boolean operation type. \~
\param[in] operNames - \ru Именователь операции.
\en An object defining names generation in the operation. \~
\param[in] flags - \ru Управляющие флаги булевой операции.
\en Control flags of the Boolean operation. \~
\param[out] res - \ru Код результата операции.
\en Operation result code. \~
\param[out] shell - \ru Построенный набор граней.
\en Constructed set of faces. \~
\result \ru Возвращает строитель, если операция была выполнена успешно.
\en Returns the constructor if the operation has been successfully performed. \~
\ingroup Model_Creators
*/
// ---
DEPRECATE_DECLARE_REPLACE( CreateBoolean with MbBooleanOperationParams )
MATH_FUNC (MbCreator *) CreateBoolean( MbFaceShell * shell1,
MbeCopyMode sameShell1,
MbFaceShell * shell2,
MbeCopyMode sameShell2,
const RPArray<MbCreator> & creators,
size_t & sharedCount,
size_t & firstCount,
OperationType oType,
const MbSNameMaker & operNames,
const MbBooleanFlags & flags,
MbResultType & res,
MbFaceShell *& shell );
//------------------------------------------------------------------------------
/** \brief \ru Создать оболочку булевой операции.
\en Create the shell of Boolean operation. \~
+1 -1
View File
@@ -65,7 +65,7 @@ IMPL_PERSISTENT_OPS( MbChamferSolid )
//------------------------------------------------------------------------------
/** \brief \ru Создать оболочку с фасками ребeр.
/** \brief \ru Создать оболочку с фасками ребер.
\en Create a shell with edges' chamfers. \~
\details \ru Для указанной оболочки построить оболочку, в которой выполнены фаски указанных рёбер.\n
\en For the given shell create a shell with chamfers of the specified edges.\n \~
+5 -5
View File
@@ -13,11 +13,11 @@
#include <creator.h>
class MATH_CLASS MbCartPoint;
class MATH_CLASS MbCurve3D;
class MATH_CLASS MbSurface;
class MATH_CLASS MbElementarySurface;
class MATH_CLASS MbEdge;
class MbCartPoint;
class MbCurve3D;
class MbSurface;
class MbElementarySurface;
class MbEdge;
//------------------------------------------------------------------------------
+3 -3
View File
@@ -15,8 +15,8 @@
#include <op_shell_parameter.h>
class MATH_CLASS MbSurface;
class MATH_CLASS MbContour;
class MbSurface;
class MbContour;
//------------------------------------------------------------------------------
@@ -43,7 +43,7 @@ protected :
ThreeStates part; ///< \ru Оставляемая часть (если part больше 0, то оставляем часть тела со стороны нормали поверхности). \en A part to be kept (if part is bigger than 0, then keep a part of solid from the side of surface normal).
CuttingProlongState prolongState; ///< \ru Тип продления режущей поверхности. \en Prolongation type of cutter surface.
bool closed; ///< \ru Замкнутоcть оболочки разрезаемого объекта. \en Closedness of the shell of the object being cut.
bool closed; ///< \ru Замкнутость оболочки разрезаемого объекта. \en Closedness of the shell of the object being cut.
bool mergeFaces; ///< \ru Сливать подобные грани (true). \en Whether to merge similar faces (true).
bool mergeEdges; ///< \ru Сливать подобные ребра (true). \en Whether to merge similar edges (true).
double buildSag; ///< \ru Угловое отклонение при движении по кривым и поверхностям. \en Angular deviation while moving along curves and surfaces.
+1 -46
View File
@@ -12,7 +12,7 @@
#include <creator.h>
class MATH_CLASS MbDraftSolidParams;
class MbDraftSolidParams;
//------------------------------------------------------------------------------
/** \brief \ru Строитель оболочки с уклонёнными гранями.
@@ -172,51 +172,6 @@ private :
IMPL_PERSISTENT_OPS( MbDraftSolid )
//------------------------------------------------------------------------------
/** \brief \ru Построить оболочку с уклоном граней.
\en Create a shell with drafted faces. \~
\details \ru Для исходной оболочки построить оболочку с уклоном граней от нейтральной изоплоскости для создания литейных уклонов. \n
Одновременно с построением оболочки функция создаёт её строитель.\n
\en For the source shell create a shell with faces drafted from the neutral isoplane for pattern tapers creation. \n
The function simultaneously creates the shell and its constructor.\n \~
\param[in] solid - \ru Исходная оболочка.
\en The source shell. \~
\param[in] sameShell - \ru Режим копирования исходной оболочки.
\en Mode of copying the source shell. \~
\param[in] np - \ru Локальная система координат, плоскость XY которой является нейтральной плоскостью ( neutral plane ).
\en The local coordinate system XY plane of which is a neutral plane. \~
\param[in] angle - \ru Угол уклона.
\en Draft angle. \~
\param[in] faces - \ru Уклоняемые грани.
\en The faces to draft. \~
\param[in] fp - \ru Признак захвата граней ( face propagation ).
\en Flag of face propagation. \~
\param[in] reverse - \ru Флаг для обратного направления тяги.
\en Flag for reverse pull direction. \~
\param[in] names - \ru Именователь операции.
\en An object defining names generation in the operation. \~
\param[out] res - \ru Код результата операции выдавливания.
\en The extrusion operation result code. \~
\param[out] shell - \ru Построенная оболочка.
\en The resultant shell. \~
\result \ru Возвращает строитель оболочки.
\en Returns the shell constructor. \~
\ingroup Model_Creators
*/
// ---
DEPRECATE_DECLARE_REPLACE( CreateDraft with 'MbDraftSolidParams' argument )
MATH_FUNC (MbCreator *) CreateDraft( MbFaceShell * solid,
MbeCopyMode sameShell,
const MbPlacement3D & np,
double angle,
const RPArray<MbFace> & faces,
MbeFacePropagation fp,
bool reverse,
const MbSNameMaker & names,
MbResultType & res,
MbFaceShell *& resShell );
//------------------------------------------------------------------------------
/** \brief \ru Построить оболочку с уклоном граней.
\en Create a shell with drafted faces. \~
+8 -4
View File
@@ -14,7 +14,7 @@
#include <op_duplication_parameter.h>
class MATH_CLASS MbFaceShell;
class MbFaceShell;
class MbRegTransform;
class MbRegDuplicate;
@@ -29,11 +29,15 @@ class MbRegDuplicate;
// ---
class MATH_CLASS MbDuplicationSolid : public MbCreator {
protected:
DuplicationValues * parameters; ///< \ru Параметры размножения. \en Parameters of duplication.
DuplicationValues * _parameters; ///< \ru Параметры размножения. \en Parameters of duplication.
c3d::ItemIndices _faceIndices; ///< \ru Индексы выбранных граней оболочки. \en Indices of selected shell faces.
bool _adaptMode; ///< \ru Режим адаптации открытых оболочек. \en Open shell instances adaptation mode.
public:
/// \ru Конструктор по параметрам. \en Constructor by parameters.
MbDuplicationSolid( const DuplicationValues &, const MbSNameMaker & );
/// \ru Конструктор по параметрам. \en Constructor by parameters.
MbDuplicationSolid( const DuplicationValues &, const c3d::ItemIndices & faceIndices, bool adaptMode, const MbSNameMaker & );
private:
MbDuplicationSolid( const MbDuplicationSolid &, MbRegDuplicate * );
// \ru Объявление конструктора копирования без реализации, чтобы не было копирования по умолчанию. \en Declaration without implementation of the copy-constructor to prevent copying by default.
@@ -83,7 +87,7 @@ IMPL_PERSISTENT_OPS( MbDuplicationSolid )
\en Original face set. \~
\param[in] params - \ru Параметры размножения.
\en Parameters of duplication. \~
\param[out] res - \ru Код результата операции.
\param[out] resCode - \ru Код результата операции.
\en Operation result code. \~
\param[out] resShell - \ru Построенный набор граней.
\en Constructed set of faces. \~
@@ -93,7 +97,7 @@ IMPL_PERSISTENT_OPS( MbDuplicationSolid )
*/
MATH_FUNC (MbCreator *) CreateDuplication( const MbFaceShell & solid,
const MbDuplicationSolidParams & params,
MbResultType & res,
MbResultType & resCode,
c3d::ShellSPtr & resShell );
+3 -27
View File
@@ -13,8 +13,8 @@
#include <creator.h>
#include <mb_enum.h>
class MATH_CLASS MbElementarySurface;
class MATH_CLASS MbElementarySolidParams;
class MbElementarySurface;
class MbElementarySolidParams;
//------------------------------------------------------------------------------
@@ -49,7 +49,7 @@ class MATH_CLASS MbElementarySolid : public MbCreator {
protected :
SArray<MbCartPoint3D> points; ///< \ru Опорные точки оболочки тела. \en Support points of a solid shell.
ElementaryShellType type; ///< \ru Тип тела. \en Type of a solid.
MbPlacement3D position; ///< \ru Локальная система координат тела. \en Local coordinate system оf a solid.
MbPlacement3D position; ///< \ru Локальная система координат тела. \en Local coordinate system of a solid.
double radius; ///< \ru Радиус основания тела. \en Radius of the base of the solid.
double minorRadius; ///< \ru Малый радиус основания тела. \en Small radius of the base of the solid.
double height; ///< \ru Высота тела. \en Height of a solid.
@@ -184,28 +184,4 @@ MbElementarySolid::MbElementarySolid( const PointsVector & pnts, ElementaryShell
SetParameters();
}
//------------------------------------------------------------------------------
/** \brief \ru Создать оболочку элементарного тела.
\en Create a shell of an elementary solid. \~
\details \ru Создать оболочку элементарного тела.\n
Одновременно с построением оболочки функция создаёт её строитель. \n
\en Create an elementary solid shell.\n
The function simultaneously constructs the shell and creates its constructor. \n \~
\param[in] params - \ru Параметры операции.
\en Parameters of operation. ~
\param[out] res - \ru Код результата операции.
\en Operation result code. \~
\param[out] shell - \ru Оболочка - результат операции.
\en Shell - the result of operation. \~
\result \ru Возвращает строитель оболочки.
\en Returns the shell constructor. \~
\ingroup Solid_Modeling
*/
// ---
DEPRECATE_DECLARE
MATH_FUNC (MbCreator *) CreateElementary( const MbElementarySolidParams & params,
MbResultType & res,
c3d::ShellSPtr & shell );
#endif // __CR_ELEMENTARY_SOLID_H
+37 -104
View File
@@ -13,10 +13,10 @@
#include <surf_spine.h>
#include <cr_swept_solid.h>
#include <cur_contour_on_surface.h>
class MATH_CLASS MbEvolutionShellParams;
class MbEvolutionShellParams;
struct MeshSurfaceValues;
//------------------------------------------------------------------------------
/** \brief \ru Направляющая кинематической операции.
@@ -59,8 +59,8 @@ public:
bool IsSimilar( const MbSpineData & ) const; ///< \ru Являются ли объекты подобными \en Whether the objects are similar
bool SetEqual ( const MbSpineData & ); ///< \ru Сделать равным \en Make equal
/// \ru Перестроить объект по журналу построения. Для перестроения проволочного каркаса. \en Rebuild object according to the history tree. For rebuilding the wire frame.
void RebuildItem();
/// \ru Перестроить объект по журналу построения. Для перестроения проволочного каркаса. Вернуть true в случае успешного перестроения. \en Rebuild object according to the history tree. For rebuilding the wire frame. Return true if rebuild has been finished successfully. \~
bool RebuildItem();
/// \ru Получить направляющую кривую. \en Get the spine curve. \~
const MbCurve3D * GetSpineCurve() const { return _spineCurve; }
@@ -90,6 +90,8 @@ protected :
SPtr<MbSNameMaker> spineNames; ///< \ru Именователь направляющей. \en An object defining the name of the spine curve.
EvolutionValues parameters; ///< \ru Параметры. \en Parameters.
std::vector<std::shared_ptr<MeshSurfaceValues>> meshSurfVals; ///< \ru Данные для операции с динамической параметризацией сечения. \en Data for sweeping operation with variable section.
public :
/** \brief \ru Конструктор.
\en Constructor. \~
@@ -202,6 +204,36 @@ public :
const RPArray<MbSNameMaker> & contoursNames,
const MbSNameMaker & spineNames_ );
/** \brief \ru Конструктор.
\en Constructor. \~
\details \ru Конструктор по данным для операции с динамической параметризацией сечения.
\en Constructor using data for sweeping operation with variable section. \~
\param[in] sweptData_ - \ru Образующая.
\en Generating curve. \~
\param[in] spine_ - \ru Направляющая кривая с дополнительной информацией.
\en The spine curve with additional information. \~
\param[in] params - \ru Параметры кинематической операции.
\en Parameters of the sweeping operation. \~
\param[in] meshSurfVals_ - \ru Данные для операции с динамической параметризацией сечения.
\en Data for sweeping operation with variable section. \~
\param[in] oType - \ru Тип булевой операции с предыдущим результатом.
\en Type of Boolean operation with the previous result. \~
\param[in] operNames - \ru Именователь операции.
\en An object defining names generation in the operation. \~
\param[in] contourNames - \ru Имена контуров образующей для именования граней.
\en Generatix contours' names for naming faces. \~
\param[in] spineNames - \ru Имена направляющей.
\en Generating curve names. \~
*/
MbCurveEvolutionSolid( const MbSweptData & sweptData_,
const MbSpine & spine_,
const EvolutionValues & params,
const std::vector<std::shared_ptr<MeshSurfaceValues>> & meshSurfVals_,
OperationType oType,
const MbSNameMaker & operNames,
const RPArray<MbSNameMaker> & contoursNames,
const MbSNameMaker & spineNames_ );
private :
MbCurveEvolutionSolid( const MbCurveEvolutionSolid & init, MbRegDuplicate * ireg );
// \ru Объявление конструктора копирования без реализации, чтобы не было копирования по умолчанию. \en Declaration without implementation of the copy-constructor to prevent copying by default.
@@ -291,103 +323,4 @@ MATH_FUNC (c3d::CreatorSPtr) CreateCurveEvolution( c3d::ShellSPtr &
c3d::ShellSPtr & resShell );
//------------------------------------------------------------------------------
/** \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] solid - \ru Набор граней, к которым дополняется построение.
\en Face set the construction is complemented with respect to. \~
\param[in] sameShell - \ru Способ копирования граней.
\en The method of copying faces. \~
\param[in] sweptData - \ru Данные об образующей.
\en The generating curve data. \~
\param[in] spine - \ru Направляющая кривая.
\en The spine curve. \~
\param[in] params - \ru Параметры кинематической операции.
\en Parameters of the sweeping operation. \~
\param[in] oType - \ru Тип операции дополнения построения.
\en Type of operation of construction complement. \~
\param[in] operNames - \ru Именователь операции.
\en Name-maker with version for a Boolean operation with the source solid. \~
\param[in] contoursNames - \ru Имена образующей.
\en Names of the generating curve. \~
\param[in] spineNames - \ru Имена пути.
\en Names of the path. \~
\param[out] res - \ru Код результата операции.
\en Operation result code. \~
\param[out] shell - \ru Построенный набор граней.
\en Constructed set of faces. \~
\result \ru Возвращает строитель.
\en Returns the constructor. \~
\ingroup Model_Creators
*/
// ---
DEPRECATE_DECLARE_REPLACE( CreateCurveEvolution with 'MbEvolutionShellParams' argument )
MATH_FUNC (MbCreator *) CreateCurveEvolution( MbFaceShell * solid,
MbeCopyMode sameShell,
const MbSweptData & sweptData,
const MbCurve3D & spine,
const EvolutionValues & params,
OperationType oType,
const MbSNameMaker & operNames,
const RPArray<MbSNameMaker> & contoursNames,
const MbSNameMaker & spineNames,
MbResultType & res,
MbFaceShell *& shell );
//------------------------------------------------------------------------------
/** \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] solid - \ru Набор граней, к которым дополняется построение.
\en Face set the construction is complemented with respect to. \~
\param[in] sameShell - \ru Способ копирования граней.
\en The method of copying faces. \~
\param[in] sweptData - \ru Данные об образующей.
\en The generating curve data. \~
\param[in] spine - \ru Направляющая кривая c дополнительной информацией.
\en The spine curve with additional data. \~
\param[in] params - \ru Параметры кинематической операции.
\en Parameters of the sweeping operation. \~
\param[in] oType - \ru Тип операции дополнения построения.
\en Type of operation of construction complement. \~
\param[in] operNames - \ru Именователь с версией для булевой с исходным телом.
\en Name-maker with version for a Boolean operation with the source solid. \~
\param[in] contoursNames - \ru Имена образующей.
\en Names of the generating curve. \~
\param[in] spineNames - \ru Имена пути.
\en Names of the path. \~
\param[out] res - \ru Код результата операции.
\en Operation result code. \~
\param[out] shell - \ru Построенный набор граней.
\en Constructed set of faces. \~
\result \ru Возвращает строитель.
\en Returns the constructor. \~
\ingroup Model_Creators
*/
// ---
DEPRECATE_DECLARE_REPLACE( CreateCurveEvolution with 'MbEvolutionShellParams' argument )
MATH_FUNC (MbCreator *) CreateCurveEvolution( MbFaceShell * solid,
MbeCopyMode sameShell,
const MbSweptData & sweptData,
const MbSpine & spine,
const EvolutionValues & params,
OperationType oType,
const MbSNameMaker & operNames,
const RPArray<MbSNameMaker> & contoursNames,
const MbSNameMaker & spineNames,
MbResultType & res,
MbFaceShell *& shell );
#endif // __CR_EVOLUTION_SOLID_H
+5 -30
View File
@@ -26,7 +26,7 @@
class MATH_CLASS MbExtendCurveCreator : public MbCreator
{
private:
c3d::SpaceCurveSPtr _sourceCurve; // \ru Исходная (расширяемая) кривая. Всегда не ноль. \en Source (extended) curve. It is not nullptr. \~
c3d::SpaceCurveSPtr _sourceCurve; // \ru Исходная (расширяемая) кривая. Сохранена для совместимости с предыдущими версиями и более не поддерживается (nullptr). \en The source (extended) curve. It is kept to provide compatibility with previous versions and is not longer supported (nullptr). \~
MbCurveExtensionParameters3D _parameters; // \ru Параметры продления. \en Extension parameters. \~
protected:
@@ -38,7 +38,7 @@ private:
public:
/// \ru Конструктор по параметрам. \en Constructor by parameters.
MbExtendCurveCreator( const MbCurve3D & curve, const MbCurveExtensionParameters3D & extendParams );
MbExtendCurveCreator( const MbCurveExtensionParameters3D & extendParams );
/// \ru Деструктор. \en Destructor.
~MbExtendCurveCreator() override;
@@ -61,10 +61,9 @@ public:
/** \} */
DEPRECATE_DECLARE_REPLACE( CreateWireFrame with 'c3d::WireFrameSPtr' argument )
bool CreateWireFrame( MbWireFrame *&, MbeCopyMode, RPArray<MbSpaceItem> * ) override; // \ru Построить кривую по журналу построения. \en Create a curve from the history tree. \~
bool CreateWireFrame( c3d::WireFrameSPtr & result ); // \ru Построить кривую по журналу построения. \en Create a curve from the history tree. \~
bool CreateWireFrame( MbWireFrame *& frame, MbeCopyMode sameShell, RPArray<MbSpaceItem> * items = nullptr ) override; // \ru Построить проволочный каркас по исходным данным. \en Create a wire-frame from the source data. \~
const MbPrecision & GetPrecision() const override { return _parameters; } // \ru Выдать точность построения. \en Get the precision of object construction.
private:
// \ru Объявление оператора присваивания без реализации, чтобы не было присваивания по умолчанию. \en The declaration of the assignment operator without implementation, to prevent an assignment by default.
void operator = ( const MbExtendCurveCreator & );
@@ -75,28 +74,4 @@ private:
IMPL_PERSISTENT_OPS( MbExtendCurveCreator )
//------------------------------------------------------------------------------
/** \brief \ru Создание строителя продления кривой.
\en Create a constructor of extending curve. \~
\details \ru Создание строителя продления кривой.\n
\en Create a constructor of extending curve.\n \~
\param[in] sourceCurve - \ru Исходная (удлиняемая) кривая.
\en Source (extended) curve. \~
\param[in] parameters - \ru Параметры операции.
\en Parameters of the operation. \~
\param[out] res - \ru Код результата операции.
\en Operation result code. \~
\param[out] resCurve - \ru Возвращаемая (удлиненная) кривая. Может быть nullptr.
\en The curve returned (extended). Can be nullptr. \~
\result \ru Возвращает строитель.
\en Returns the constructor. \~
\ingroup Curve3D_Modeling
*/
// ---
MATH_FUNC( c3d::CreatorSPtr ) CreateExtendedCurve( const MbCurve3D & sourceCurve,
const MbCurveExtensionParameters3D & parameters,
MbResultType & res,
c3d::SpaceCurveSPtr & resCurve );
#endif // __CR_EXTENDING_CURVE_H
+14 -46
View File
@@ -83,55 +83,13 @@ IMPL_PERSISTENT_OPS( MbExtensionShell )
Может быть удлинена на заданное расстояние указанная грань.
К указанной грани может быть добавлена гладко стыкующаяся с ней грань.
К указанной грани может быть добавлена грань, полученная выдавливанием крайнего ребра в заданном направлении.
Если у исходной оболочки ошибочно флаг замкнутости равен true, то в ходе операции его значение будет изменено на false.
Одновременно с построением оболочки функция создаёт её строитель.\n
\en Construct the extended face of a shell. An extension can be performed in the following ways:
The specified faces can be extended on the given distance.
A smoothly connected face can be added to the given face.
A face obtained by extrusion of a boundary edge in the given direction can be added to the specified face.
The function simultaneously creates the shell and its constructor.\n \~
\param[in] solid - \ru Исходная оболочка.
\en The initial shell. \~
\param[in] sameShell - \ru Режим копирования исходной оболочки.
\en Mode of copying the initial shell. \~
\param[in] edges - \ru Множество краевых ребер, через которые выполняется продление.
\en An array of boundary edges through which to extend the face. \~
\param[in] parameters - \ru Параметры построения.
\en Parameters of a shell creation. \~
\param[in] operNames - \ru Именователь граней.
\en An object for naming faces. \~
\param[out] res - \ru Код результата операции.
\en Operation result code. \~
\param[out] shell - \ru Построенная оболочка.
\en The resultant shell. \~
\result \ru Возвращает строитель оболочки.
\en Returns the shell constructor. \~
\deprecated \ru Функция устарела, взамен использовать #CreateExtensionShell с набором параметров #MbExtensionShellParams.
\en The function is deprecated, instead use #ExtensionShellShell with the parameter list #MbExtensionShellParams. \~
\ingroup Model_Creators
*/
// ---
DEPRECATE_DECLARE_REPLACE( ExtensionShellShell with MbExtensionShellParams )
MATH_FUNC (MbCreator *) CreateExtensionShell( MbFaceShell * solid,
MbeCopyMode sameShell,
const RPArray<MbCurveEdge> & edges,
const ExtensionValues & parameters,
const MbSNameMaker & operNames,
MbResultType & res,
MbFaceShell *& shell );
//------------------------------------------------------------------------------
/** \brief \ru Построить удлинённую грань оболочки.
\en Construct the extended face of a shell. \~
\details \ru Построить удлинённую грань оболочки. Удлинение может быть выполнено следующими способами.
Может быть удлинена на заданное расстояние указанная грань.
К указанной грани может быть добавлена гладко стыкующаяся с ней грань.
К указанной грани может быть добавлена грань, полученная выдавливанием крайнего ребра в заданном направлении.
Одновременно с построением оболочки функция создаёт её строитель.\n
\en Construct the extended face of a shell. An extension can be performed in the following ways:
The specified faces can be extended on the given distance.
A smoothly connected face can be added to the given face.
A face obtained by extrusion of a boundary edge in the given direction can be added to the specified face.
If the original shell mistakenly has the closure flag set to true, then its value will be changed to false during the operation.
The function simultaneously creates the shell and its constructor.\n \~
\param[in] solid - \ru Исходная оболочка.
\en The initial shell. \~
@@ -139,8 +97,18 @@ MATH_FUNC (MbCreator *) CreateExtensionShell( MbFaceShell * solid
\en Mode of copying the initial shell. \~
\param[in] parameters - \ru Параметры построения.
\en Parameters of a shell creation. \~
\param[out] res - \ru Код результата операции.
\en Operation result code. \~
\param[out] res - \ru Код результата операции возвращает:
rt_SolidError, если исходная оболочка замкнута или пустая.
rt_PrepareError, если заданы ошибочные параметры операции.
rt_TooSmallExtension, если величина удлинения слишком мала.
rt_VertexExtensionError, если не удалось продлить до вершины из-за малой величины продления.
rt_SurfaceExtensionError, если не удалось продлить до поверхности из-за малой величины продления. \~
\en Operation result code return:
rt_SolidError, if the original shell is closed or empty.
rt_PrepareError, if incorrect operation parameters are set.
rt_TooSmallExtension, if the extension value is too small.
rt_VertexExtensionError, if it was not possible to extend to the vertex due to the small amount of extension.
rt_SurfaceExtensionError, if it was not possible to extend to the surface due to the small amount of extension. \~
\param[out] shell - \ru Построенная оболочка.
\en The resultant shell. \~
\result \ru Возвращает строитель оболочки.
+2 -2
View File
@@ -14,7 +14,7 @@
#include <cr_swept_solid.h>
class MATH_CLASS MbRect;
class MbRect;
//------------------------------------------------------------------------------
@@ -73,7 +73,7 @@ public :
\en \name Common functions of the mathematical object.
\{ */
MbeCreatorType IsA() const override; // \ru Тип элемента. \en A type of element.
MbCreator & Duplicate( MbRegDuplicate * = nullptr ) const override; // \ru Cделать копию. \en Make a copy.
MbCreator & Duplicate( MbRegDuplicate * = nullptr ) const override; // \ru Сделать копию. \en Make a copy.
void Transform( const MbMatrix3D &, MbRegTransform * = nullptr ) override; // \ru Преобразовать элемент согласно матрице. \en Transform element according to the matrix.
void Move( const MbVector3D &, MbRegTransform * = nullptr ) override; // \ru Сдвиг. \en Move.
void Rotate( const MbAxis3D &, double angle, MbRegTransform * = nullptr ) override; // \ru Повернуть вокруг оси. \en Rotate around an axis.
+55
View File
@@ -0,0 +1,55 @@
////////////////////////////////////////////////////////////////////////////////
/**
\file
\brief \ru Генератор скруглений граней. \en Maker of faces fillets. \~
*/
////////////////////////////////////////////////////////////////////////////////
#ifndef __CR_FACE_FILLET_MAKER_H
#define __CR_FACE_FILLET_MAKER_H
#include <solid.h>
#include <op_shell_parameter.h>
class MbFilletInternalMaker;
//------------------------------------------------------------------------------
/** \brief \ru Генератор скруглений граней. \en Maker of faces fillets. \~
\details \ru Класс для создания скруглений граней тела.
\en Class for creating fillets of faces. \~
\ingroup Shell_Modeling
\warning \ru В разработке. \en Under development. \~
*/
// ---
class MATH_CLASS MbFaceFilletMaker
{
MbFilletInternalMaker * _impl; ///< \ru Реализация алгоритма. \en The algorithm implementation.
public:
public:
/// \ru Конструктор устарел и будет удален. \en Constructor deprecated and will be deleted.
//DEPRECATE_DECLARE
explicit MbFaceFilletMaker( MbeCopyMode , const MbSectionData & data );
/// \ru Конструктор. \en Constructor.
explicit MbFaceFilletMaker( const MbSectionData & data );
/// \ru Деструктор. \en Destructor.
~MbFaceFilletMaker();
/// \ru Построить скругления и выдать количество частей (несвязанных оболочек) в результате. \en Create fillets and return a number of non-connected shells in a result.
MbResultType CreateFillets( size_t & partsCount, MbSectionResults & result );
/// \ru Модифицировать базовые объекты указанными частями скругления. Если массив индексов пустой, то выполняется подрезка всеми частями скругления.
/// \en Modify base objects by the defines parts of the fillet. If indices array is empty then performed cutting with the all parts of the fillet.
///
MbResultType ModifyBaseObjects( const c3d::IndicesVector & partsIndicies, std::vector<MbSectionResults> & result );
/// \ru Получить параметры построения. \en Get the constructing parameters.
const MbSectionData & GetSectionData() const;
};
#endif // __CR_FACE_FILLET_MAKER_H
+6 -6
View File
@@ -1,7 +1,7 @@
////////////////////////////////////////////////////////////////////////////////
/**
\file
\brief \ru Строитель cкругления ребeр.
\brief \ru Строитель скругления ребер.
\en Edges fillet constructor.
*/
////////////////////////////////////////////////////////////////////////////////
@@ -14,13 +14,13 @@
#include <function.h>
struct MATH_CLASS MbEdgeFunction;
struct MbEdgeFunction;
//------------------------------------------------------------------------------
/** \brief \ru Строитель cкругления ребeр.
/** \brief \ru Строитель скругления ребер.
\en Edges fillet constructor. \~
\details \ru Строитель cкругления ребeр содержит параметры для выполнения операции, функции изменения радиуса,
\details \ru Строитель скругления ребер содержит параметры для выполнения операции, функции изменения радиуса,
идентификаторы граней остановки скруглений, идентификаторы скругляемых вершин. \n
Скругление ребра заключается в его замене на грань, гладко сопрягающую соединяемые ребром грани.
Построенная грань в сечении может иметь форму дуги окружности, эллипса, параболы и гиперболу.
@@ -90,9 +90,9 @@ IMPL_PERSISTENT_OPS( MbFilletSolid )
//------------------------------------------------------------------------------
/** \brief \ru Создать оболочку со cкруглением ребeр.
/** \brief \ru Создать оболочку со скруглением ребер.
\en Create a shell with edges fillet. \~
\details \ru Для указанной оболочки построить оболочку, в которой выполнено cкругление рёбер.\n
\details \ru Для указанной оболочки построить оболочку, в которой выполнено скругление рёбер.\n
Одновременно с построением оболочки функция создаёт её строитель.
Способ построения скругления определяется набором параметров в filletParams: \n
- Скруглить указанные рёбра тела постоянным радиусом. \n
+3 -1
View File
@@ -11,7 +11,7 @@
#include <creator.h>
class MATH_CLASS MbWireFrameFilletsParams;
class MbWireFrameFilletsParams;
//------------------------------------------------------------------------------
/** \brief \ru Строитель скругления каркаса.
@@ -60,6 +60,8 @@ public:
// \ru Построить кривую по журналу построения. \en Create a curve from the history tree
bool CreateWireFrame( MbWireFrame *&, MbeCopyMode, RPArray<MbSpaceItem> * items = nullptr ) override;
const MbPrecision & GetPrecision() const override { return _precision; } // \ru Выдать точность построения. \en Get the precision of object construction.
OBVIOUS_PRIVATE_COPY( MbFilletWireFrameCreator )
DECLARE_PERSISTENT_CLASS_NEW_DEL( MbFilletWireFrameCreator )
-38
View File
@@ -104,44 +104,6 @@ private :
IMPL_PERSISTENT_OPS( MbHoleSolid )
//------------------------------------------------------------------------------
/** \brief \ru Создать оболочку с отверстием, карманом, или фигурным пазом.
\en Create a shell with a hole, a pocket or a groove. \~
\details \ru Для указанной оболочки построить оболочку с отверстием, карманом, или фигурным пазом. \n
Одновременно с построением оболочки функция создаёт её строитель. \n
\en For a given shell construct a shell with a hole, a pocket or a groove. \n
The function simultaneously constructs the shell and creates its constructor. \n \~
\deprecated \ru Функция устарела, взамен использовать #CreateHole с набором параметров #MbHoleSolidParams.
\en The function is deprecated, instead use #CreateHole with the parameter list #MbHoleSolidParams. \~
\param[in] solid - \ru Набор граней, к которым дополняется построение.
\en Face set the construction is complemented with respect to. \~
\param[in] sameShell - \ru Способ копирования граней.
\en The method of copying faces. \~
\param[in] place - \ru Локальная система координат.
\en A local coordinate system. \~
\param[in] par - \ru Параметры.
\en Parameters. \~
\param[in] ns - \ru Именователь операции.
\en An object defining names generation in the operation. \~
\param[out] res - \ru Код результата операции выдавливания.
\en The extrusion operation result code. \~
\param[out] shell - \ru Построенный набор граней.
\en Constructed set of faces. \~
\result \ru Возвращает строитель.
\en Returns the constructor. \~
\ingroup Model_Creators
*/
// ---
DEPRECATE_DECLARE_REPLACE( CreateHole with MbHoleSolidParams )
MATH_FUNC (MbCreator *) CreateHole( MbFaceShell * solid,
MbeCopyMode sameShell,
const MbPlacement3D & place,
const HoleValues & par,
const MbSNameMaker & ns,
MbResultType & res,
MbFaceShell *& shell );
//------------------------------------------------------------------------------
/** \brief \ru Создать оболочку с отверстием, карманом, или фигурным пазом.
\en Create a shell with a hole, a pocket or a groove. \~
+1 -1
View File
@@ -55,7 +55,7 @@ public:
void Move ( const MbVector3D &, MbRegTransform * = nullptr ) override; // \ru Сдвиг \en Translation
void Rotate ( const MbAxis3D &, double angle, MbRegTransform * = nullptr ) override; // \ru Повернуть вокруг оси \en Rotate about an axis
MbePrompt GetPropertyName() override; // \ru Дать имя свойства объекта \en Get the object property name
MbePrompt GetPropertyName() override; // \ru Дать имя свойства объекта \en Get the object property name
void GetProperties( MbProperties & ) override; // \ru Выдать свойства объекта \en Get properties of the object
void SetProperties( const MbProperties & ) override; // \ru Записать свойства объекта \en Set properties of the object
void GetBasisItems ( RPArray<MbSpaceItem> & ) override; // \ru Дать базовые объекты \en Get the basis objects
+5 -91
View File
@@ -119,10 +119,11 @@ void CheckJoinedShellCurve( const MbCurve3D & curve1,
\ingroup Model_Creators
*/
//---
MbCurve3D * CreateJoinedShellCurve( const RPArray<MbCurveEdge> & edges,
const SArray<bool> & orients,
const MbMatrix3D & matr,
MbResultType & res );
template<typename ConstEdgeVector, typename OrientsVector>
MbCurve3D * CreateJoinedShellCurve( const ConstEdgeVector & edges,
const OrientsVector & orients,
const MbMatrix3D & matr,
MbResultType & res );
//------------------------------------------------------------------------------
@@ -155,93 +156,6 @@ MbFaceShell * MakeJoinShell( const MbSurfaceCurve & curve1,
MbResultType & res );
//------------------------------------------------------------------------------
/** \brief \ru Построить оболочку соединения.
\en Construct a join shell. \~
\details \ru Построить оболочку, соединяющую две грани по двум кривым на них.
Одновременно с построением оболочки функция создаёт её строитель.\n
\en Construct a shell joining two faces by two curves on them.
The function simultaneously creates the shell and its constructor.\n \~
\deprecated \ru Функция устарела, взамен использовать #CreateJoinShell с набором параметров #MbJoinShellParams.
\en The function is deprecated, instead use #CreateJoinShell with the parameter list #MbJoinShellParams. \~
\param[in] curve1 - \ru Кривая на первой соединяемой поверхности.
\en A curve on the first surface to join. \~
\param[in] curve2 - \ru Кривая на второй соединяемой поверхности.
\en A curve on the second surface to join. \~
\param[in] parameters - \ru Параметры построения.
\en Parameters of a shell creation. \~
\param[in] names - \ru Именователь граней.
\en An object for naming faces. \~
\param[out] res - \ru Код результата построения.
\en Construction result code. \~
\param[out] shell - \ru Построенная оболочка.
\en The resultant shell. \~
\result \ru Возвращает строитель оболочки.
\en Returns the shell constructor. \~
\ingroup Model_Creators
*/
// ---
DEPRECATE_DECLARE_REPLACE( CreateJoinShell with MbJoinShellParams )
MATH_FUNC (MbCreator *) CreateJoinShell( MbSurfaceCurve & curve1,
MbSurfaceCurve & curve2,
JoinSurfaceValues & parameters,
const MbSNameMaker & names,
MbResultType & res,
MbFaceShell *& shell );
//------------------------------------------------------------------------------
/** \brief \ru Построить оболочку соединения.
\en Construct a join shell. \~
\details \ru Построить оболочку соединения по двум наборам ребер.
Рёбра двух наборов определяют набор граней соединения, каждая из которых побстроена по двум кривым.
Одновременно с построением оболочки функция создаёт её строитель.\n
\en Construct a shell of join given two sets of edges.
Edges of two sets define a set of join faces each of which is constructed by two curves.
The function simultaneously creates the shell and its constructor.\n \~
\deprecated \ru Функция устарела, взамен использовать #CreateJoinShell с набором параметров #MbJoinShellParams.
\en The function is deprecated, instead use #CreateJoinShell with the parameter list #MbJoinShellParams. \~
\param[in] edges1 - \ru Первый набор ребер.
\en The first set of edges. \~
\param[in] orients1 - \ru Ориентация рёбер первого набора.
\en Orientation of edges from the first set. \~
\param[in] edges2 - \ru Второй набор ребер.
\en The second set of edges. \~
\param[in] orients2 - \ru Ориентация рёбер второго набора.
\en Orientation of edges of the second set. \~
\param[in] matr1 - \ru Матрица преобразования рёбер первого набора.
\en Transformation matrix of edges from the first set. \~
\param[in] matr2 - \ru Матрица преобразования рёбер второго набора.
\en Transformation matrix of edges from the second set. \~
\param[in] parameters - \ru Параметры построения.
\en Parameters of a shell creation. \~
\param[in] names - \ru Именователь граней.
\en An object for naming faces. \~
\param[out] res - \ru Код результата операции.
\en Operation result code. \~
\param[out] shell - \ru Построенная оболочка.
\en The resultant shell. \~
\param[in] isPhantom - \ru Режим создания фантома.
\en Create in the phantom mode. \~
\result \ru Возвращает строитель оболочки.
\en Returns the shell constructor. \~
\ingroup Model_Creators
*/
// ---
DEPRECATE_DECLARE_REPLACE( CreateJoinShell with MbJoinShellParams )
MATH_FUNC (MbCreator *) CreateJoinShell( const RPArray<MbCurveEdge> & edges1,
const SArray<bool> & orients1,
const RPArray<MbCurveEdge> & edges2,
const SArray<bool> & orients2,
const MbMatrix3D & matr1,
const MbMatrix3D & matr2,
JoinSurfaceValues & parameters,
const MbSNameMaker & names,
MbResultType & res,
MbFaceShell *& shell,
bool isPhantom );
//------------------------------------------------------------------------------
/** \brief \ru Построить оболочку соединения по параметрам.
\en Create a joint shell from parameters. \~
+1 -124
View File
@@ -15,7 +15,7 @@
#include <cr_swept_solid.h>
#include <templ_sptr.h>
class MATH_CLASS MbLoftedSolidParams;
class MbLoftedSolidParams;
//------------------------------------------------------------------------------
/** \brief \ru Строитель оболочки тела по сечениям.
@@ -135,128 +135,5 @@ MATH_FUNC (c3d::CreatorSPtr) CreateCurveLofted( c3d::ShellSPtr & srcS
c3d::ShellSPtr & resShell );
//------------------------------------------------------------------------------
/** \brief \ru Создать тело по плоским сечениям.
\en Create a solid from a planar sections. \~
\details \ru Построить оболочку тела, проходящую по заданным сечениям
и выполнить булеву операцию с оболочкой, если последняя задана. \n
Одновременно с построением оболочки функция создаёт её строитель.\n
\en Create a solid's shell passing through the given sections
and perform the Boolean operation with the shell if it is specified. \n
The function simultaneously creates the shell and its constructor.\n \~
\result \ru Возвращает строитель.
\en Returns the constructor. \~
\deprecated \ru Функция устарела, взамен использовать #CreateCurveLofted с набором параметров #MbLoftedSolidParams.
\en The function is deprecated, instead use #CreateCurveLofted with the parameter list #MbLoftedSolidParams. \~
\ingroup Model_Creators
*/
// ---
DEPRECATE_DECLARE_REPLACE( CreateCurveLofted with 'MbLoftedSolidParams' argument )
MATH_FUNC (MbCreator *) CreateCurveLofted( MbFaceShell * solid,
MbeCopyMode sameShell,
SArray<MbPlacement3D> & places,
RPArray <MbContour> & planeConours,
const LoftedValues & params,
OperationType oType,
const MbSNameMaker & operName,
RPArray<MbSNameMaker> & contourNames,
SArray<MbCartPoint3D> * guidePoints,
MbResultType & res,
MbFaceShell *& resShell );
//------------------------------------------------------------------------------
/** \brief \ru Создать тело по пространственным сечениям.
\en Create a solid from sections on surfaces. \~
\details \ru Построить оболочку тела, проходящую по заданным сечениям
и выполнить булеву операцию с оболочкой, если последняя задана. \n
Одновременно с построением оболочки функция создаёт её строитель.\n
\en Create a solid's shell passing through the given sections
and perform the Boolean operation with the shell if it is specified. \n
The function simultaneously creates the shell and its constructor.\n \~
\result \ru Возвращает строитель.
\en Returns the constructor. \~
\deprecated \ru Функция устарела, взамен использовать #CreateCurveLofted с набором параметров #MbLoftedSolidParams.
\en The function is deprecated, instead use #CreateCurveLofted with the parameter list #MbLoftedSolidParams. \~
\ingroup Model_Creators
*/
// ---
DEPRECATE_DECLARE_REPLACE( CreateCurveLofted with 'MbLoftedSolidParams' argument )
MATH_FUNC (MbCreator *) CreateCurveLofted( MbFaceShell * solid,
MbeCopyMode sameShell,
RPArray<MbSurface> & surfaces,
RPArray <MbContour> & planeConours,
const LoftedValues & params,
OperationType oType,
const MbSNameMaker & operName,
RPArray<MbSNameMaker> & contourNames,
RPArray<MbCurve3D> * guideCurves,
SArray<MbCartPoint3D> * guidePoints,
MbResultType & res,
MbFaceShell *& resShell );
//------------------------------------------------------------------------------
/** \brief \ru Создать тело по плоским сечениям.
\en Create a solid from a planar sections. \~
\details \ru Построить оболочку тела, проходящую по заданным сечениям вдоль заданной направляющей
и выполнить булеву операцию с оболочкой, если последняя задана. \n
Одновременно с построением оболочки функция создаёт её строитель.\n
\en Create a solid's shell passing through the given sections along the specified 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 \~
\result \ru Возвращает строитель.
\en Returns the constructor. \~
\deprecated \ru Функция устарела, взамен использовать #CreateCurveLofted с набором параметров #MbLoftedSolidParams.
\en The function is deprecated, instead use #CreateCurveLofted with the parameter list #MbLoftedSolidParams. \~
\ingroup Model_Creators
*/
// ---
DEPRECATE_DECLARE_REPLACE( CreateCurveLofted with 'MbLoftedSolidParams' argument )
MATH_FUNC (MbCreator *) CreateCurveLofted( MbFaceShell * solid,
MbeCopyMode sameShell,
SArray<MbPlacement3D> & places,
RPArray<MbContour> & planeConours,
const MbCurve3D & centre_line,
const LoftedValues & params,
OperationType oType,
const MbSNameMaker & operName,
RPArray<MbSNameMaker> & contourNames,
SArray<MbCartPoint3D> * guidePoints,
MbResultType & res,
MbFaceShell *& resShell );
//------------------------------------------------------------------------------
/** \brief \ru Создать тело по пространственным сечениям.
\en Create a solid from a space sections. \~
\details \ru Построить оболочку тела, проходящую по заданным сечениям вдоль заданной осевой линии и направляющих
и выполнить булеву операцию с оболочкой, если последняя задана. \n
Одновременно с построением оболочки функция создаёт её строитель.\n
\en Create a solid's shell passing through the given sections along the specified spine curve and guide curves
and perform the Boolean operation with the shell if it is specified. \n
The function simultaneously creates the shell and its constructor.\n \~
\result \ru Возвращает строитель.
\en Returns the constructor. \~
\deprecated \ru Функция устарела, взамен использовать #CreateCurveLofted с набором параметров #MbLoftedSolidParams.
\en The function is deprecated, instead use #CreateCurveLofted with the parameter list #MbLoftedSolidParams. \~
\ingroup Model_Creators
*/
// ---
DEPRECATE_DECLARE_REPLACE( CreateCurveLofted with 'MbLoftedSolidParams' argument )
MATH_FUNC (MbCreator *) CreateCurveLofted( MbFaceShell * solid,
MbeCopyMode sameShell,
RPArray<MbSurface> & surfaces,
RPArray<MbContour> & planeConours,
const MbCurve3D & centre_line,
const LoftedValues & params,
OperationType oType,
const MbSNameMaker & operName,
RPArray<MbSNameMaker> & contourNames,
RPArray<MbCurve3D> * guideCurves,
SArray<MbCartPoint3D> * guidePoints,
MbResultType & res,
MbFaceShell *& resShell );
#endif // __CR_LOFTED_SOLID_H
+18 -12
View File
@@ -17,8 +17,8 @@
#include <op_shell_parameter.h>
class MATH_CLASS MbSNameMaker;
class MATH_CLASS MedianShellFaces;
class MbSNameMaker;
class MedianShellFaces;
//------------------------------------------------------------------------------
@@ -35,10 +35,16 @@ class MATH_CLASS MbMedianShell : public MbCreator {
private :
MedianShellFaces faces; ///< \ru Выбранные грани. \en Selected faces .
MedianShellValues parameters; ///< \ru Параметры срединной оболочки. \en Parameters of median shell.
MbPrecision precision; ///< \ru Точность построения срединной оболочки. \en The precision of the construction of median shell.
public:
/// \ru Конструктор по выбранным граням и параметрам срединной оболочки. \en Constructor by selected faces and parameters of median shell.
MbMedianShell( const MedianShellFaces & faces, const MedianShellValues & params, const MbSNameMaker & snMaker );
/// \ru Конструктор по выбранным граням, параметрам срединной оболочки и точности построения. \en Constructor by selected faces, parameters of median shell and construction precision.
MbMedianShell( const MedianShellFaces & faces,
const MedianShellValues & params,
const MbSNameMaker & snMaker,
const MbPrecision & precision );
/// \ru Деструктор. \en Destructor.
virtual ~MbMedianShell();
@@ -63,6 +69,8 @@ public:
// \ru Построение оболочки по исходным данным \en Construction of a shell from the given data
bool CreateShell( MbFaceShell *& shell, MbeCopyMode sameShell,
RPArray<MbSpaceItem> * items = nullptr ) override;
const MbPrecision & GetPrecision() const override { return precision; } // \ru Выдать точность построения. \en Get the precision of object construction.
/// \ru Дать параметры. \en Get the parameters.
void GetParameters( MedianShellValues & params ) const { params = parameters; }
@@ -80,7 +88,6 @@ IMPL_PERSISTENT_OPS( MbMedianShell )
/** \brief \ru Построить срединную оболочку между выбранными парами граней тела.
\en Build a median shell between selected faces of solid. \~
\details \ru Построить срединную оболочку между выбранными парами граней тела.
Выбранные грани должны быть эквидистантны по отношению друг к другу.
Грани должны принадлежать одному и тому же телу.
Одновременно с построением оболочки функция создаёт её строитель.\n
\en Build a median shell between suitable selected face pairs of solid.
@@ -91,10 +98,10 @@ IMPL_PERSISTENT_OPS( MbMedianShell )
\en The initial solid. \~
\param[in] parameters - \ru Параметры операции.
\en Parameters of operation. ~
\param[out] res - \ru Код результата операции.
\param[out] resType - \ru Код результата операции.
\en Operation result code. \~
\param[out] medianFaces - \ru Множество граней для создания срединной оболочки.
\en Set of faces for build a median shell. \~
\param[out] results - \ru Результат операции, включающий множество граней для создания срединной оболочки.
\en Operation result contains set of faces for build a median shell. \~
\param[out] shell - \ru Построенная срединная оболочка.
\en Constructed median shell. \~
\result \ru Возвращает строитель оболочки.
@@ -102,11 +109,10 @@ IMPL_PERSISTENT_OPS( MbMedianShell )
\ingroup Model_Creators
*/
// ---
MATH_FUNC (MbCreator *) CreateMedianShell( const MbFaceShell & solid,
const MbMedianShellParams & params,
MbResultType & res,
MedianShellFaces & medianFaces,
c3d::ShellSPtr & shell );
MATH_FUNC (MbCreator *) CreateMedianShell( const MbFaceShell & solid,
const MbMedianShellParams & params,
MbResultType & resType,
MbMedianShellResults & results,
c3d::ShellSPtr & shell );
#endif // __CR_MEDIAN_SHELL_H
+5 -5
View File
@@ -14,11 +14,11 @@
#include <creator.h>
class MATH_CLASS MbMesh;
class MATH_CLASS MbGrid;
class MATH_CLASS MbPolygon3D;
class MATH_CLASS MbApex3D;
class MATH_CLASS MbItem;
class MbMesh;
class MbGrid;
class MbPolygon3D;
class MbApex3D;
class MbItem;
//------------------------------------------------------------------------------
+1 -33
View File
@@ -17,7 +17,7 @@
#include <op_shell_parameter.h>
class MATH_CLASS MbFaceShell;
class MbFaceShell;
//------------------------------------------------------------------------------
@@ -73,38 +73,6 @@ public:
IMPL_PERSISTENT_OPS( MbMeshShell )
//------------------------------------------------------------------------------
/** \brief \ru Построить оболочку на сетке кривых.
\en Construct a shell from a mesh of curves. \~
\details \ru Построить оболочку на сетке кривых, образованной двумя сечействами кривых. \n
Одновременно с построением оболочки функция создаёт её строитель.\n
\en Create a shell from a mesh of curves formed by two sets of curves. \n
The function simultaneously creates the shell and its constructor.\n \~
\param[in] parameters - \ru Параметры построения.
\en Parameters of a shell creation. \~
\param[in] operNames - \ru Именователь граней.
\en An object for naming faces. \~
\param[in] isPhantom - \ru Режим создания фантома.
\en Create in the phantom mode. \~
\param[out] res - \ru Код результата операции.
\en Operation result code. \~
\param[out] shell - \ru Построенная оболочка.
\en The resultant shell. \~
\deprecated \ru Функция устарела, взамен использовать #CreateMeshShell с набором параметров #MbMeshShellParameters.
\en The function is deprecated, instead use #CreateMeshShell with the parameter list #MbMeshShellParameters. \~
\result \ru Возвращает строитель оболочки.
\en Returns the shell constructor. \~
\ingroup Model_Creators
*/
// ---
DEPRECATE_DECLARE_REPLACE( CreateMeshShell with MbMeshShellParameters )
MATH_FUNC (MbCreator *) CreateMeshShell( MeshSurfaceValues & parameters,
const MbSNameMaker & operNames,
bool isPhantom,
MbResultType & res,
MbFaceShell *& shell );
//------------------------------------------------------------------------------
/** \brief \ru Построить оболочку на сетке кривых.
\en Construct a shell from a mesh of curves. \~
+3 -3
View File
@@ -12,9 +12,9 @@
#include <mb_operation_result.h>
class MATH_CLASS MbCreator;
class MATH_CLASS MbSNameMaker;
class MATH_CLASS MbFaceShell;
class MbCreator;
class MbSNameMaker;
class MbFaceShell;
struct NurbsSurfaceValues;
class IProgressIndicator;
+4 -39
View File
@@ -17,10 +17,10 @@
#include <op_shell_parameter.h>
class MATH_CLASS MbCreator;
class MATH_CLASS MbSNameMaker;
class MATH_CLASS MbFaceShell;
struct MATH_CLASS NurbsSurfaceValues;
class MbCreator;
class MbSNameMaker;
class MbFaceShell;
struct NurbsSurfaceValues;
class IProgressIndicator;
@@ -82,41 +82,6 @@ public:
IMPL_PERSISTENT_OPS( MbNurbsSurfacesSolid )
//------------------------------------------------------------------------------
/** \brief \ru Построить оболочку из NURBS-поверхностей.
\en Construct a shell from NURBS-surfaces. \~
\details \ru Построить оболочку из NURBS-поверхностей MbSplineSurface.
Одновременно с построением оболочки функция создаёт её строитель.\n
\en Construct a shell from NURBS-surfaces MbSplineSurface.
The function simultaneously creates the shell and its constructor.\n \~
\deprecated \ru Функция устарела, взамен использовать #CreateNurbsShell с набором параметров #MbNurbsSurfacesShellParams.
\en The function is deprecated, instead use #CreateNurbsShell with the parameter list #MbNurbsSurfacesShellParams. \~
\param[in, out] parameters - \ru Параметры построения.
\en Parameters of a shell creation. \~
\param[in] operNames - \ru Именователь граней.
\en An object for naming faces. \~
\param[in] isPhantom - \ru Режим создания фантома.
\en Create in the phantom mode. \~
\param[out] res - \ru Код результата операции.
\en Operation result code. \~
\param[out] shell - \ru Построенная оболочка.
\en The resultant shell. \~
\param[in, out] indicator - \ru Индикатор хода построения.
\en Construction process indicator. \~
\result \ru Возвращает строитель оболочки.
\en Returns the shell constructor. \~
\ingroup Model_Creators
*/
// ---
DEPRECATE_DECLARE_REPLACE( CreateNurbsShell with MbNurbsSurfacesShellParams )
MATH_FUNC (MbCreator *) CreateNurbsShell( NurbsSurfaceValues & parameters,
const MbSNameMaker & operNames,
bool isPhantom,
MbResultType & res,
MbFaceShell *& shell,
IProgressIndicator * indicator = nullptr );
//------------------------------------------------------------------------------
/** \brief \ru Построить оболочку из NURBS-поверхностей.
\en Construct a shell from NURBS-surfaces. \~
+1 -1
View File
@@ -16,7 +16,7 @@
#include <vector>
class MATH_CLASS MbCurve3D;
class MbCurve3D;
//------------------------------------------------------------------------------
+77
View File
@@ -0,0 +1,77 @@
////////////////////////////////////////////////////////////////////////////////
/**
\file
\brief \ru Строитель эквидистантного каркаса.
\en Creator of an offset wire frame.
*/
////////////////////////////////////////////////////////////////////////////////
#ifndef __CR_OFFSET_WIREFRAME_H
#define __CR_OFFSET_WIREFRAME_H
#include <creator.h>
#include <op_wireframe_parameter.h>
//------------------------------------------------------------------------------
/** \brief \ru Строитель эквидистантного каркаса.
\en Creator of an offset wire frame. \~
\details \ru Строитель эквидистантного каркаса.
\en Creator of an offset wire frame. \~
\ingroup Model_Creators
*/
// ---
class MATH_CLASS MbOffsetWireFrameCreator : public MbCreator {
private:
MbOffsetWireFrameParams _parameters; ///< \ru Параметры эквидистантного каркаса. \en Parameters of an offset wire frame.
public:
/** \brief \ru Конструктор по параметрам.
\en Constructor by parameters. \~
\details \ru Конструктор эквидистантного карскаса в пространстве.
\en Constructor of an offset wire frame in the space. \~
\param[in] params - \ru Параметры.
\en Parameters. \~
*/
MbOffsetWireFrameCreator( const MbOffsetWireFrameParams & params );
/// \ru Деструктор. \en Destructor.
virtual ~MbOffsetWireFrameCreator();
protected:
/// \ru Конструктор копирования. \en Copy-constructor.
MbOffsetWireFrameCreator( const MbOffsetWireFrameCreator & other,
MbRegDuplicate * iReg );
private:
MbOffsetWireFrameCreator(); ///< \ru Не реализовано. \en Not implemented.
public:
// \ru Общие функции строителя. \en The common functions of the creator.
MbeCreatorType IsA() const override; ///< \ru Тип элемента. \en A type of element.
MbCreator & Duplicate( MbRegDuplicate * iReg = nullptr) const override; ///< \ru Сделать копию. \en Create a copy.
bool IsSame ( const MbCreator &, double accuracy) const override; ///< \ru Являются ли объекты равными? \en Determine whether an object is equal?
bool IsSimilar( const MbCreator & ) const override; ///< \ru Являются ли объекты подобными. \en Whether the objects are similar.
bool SetEqual ( const MbCreator & ) override; ///< \ru Сделать равным. \en Make equal.
void Transform( const MbMatrix3D &, MbRegTransform * = nullptr ) override; ///< \ru Преобразовать элемент согласно матрице. \en Transform element according to the matrix.
void Move ( const MbVector3D &, MbRegTransform * = nullptr ) override; ///< \ru Сдвиг. \en Translation.
void Rotate ( const MbAxis3D &, double angle, MbRegTransform * = nullptr ) override; ///< \ru Повернуть вокруг оси. \en Rotate about an axis.
MbePrompt GetPropertyName() override; ///< \ru Дать имя свойства объекта. \en Get the object property name.
void GetProperties ( MbProperties & ) override; ///< \ru Выдать свойства объекта. \en Get properties of the object.
void SetProperties ( const MbProperties & ) override; ///< \ru Записать свойства объекта. \en Set properties of the object.
bool CreateWireFrame( MbWireFrame *&, MbeCopyMode, RPArray<MbSpaceItem> * items = nullptr ) override; ///< \ru Построить каркас по журналу построения \en Create an offset wire frame from the history tree.
const MbPrecision & GetPrecision() const override { return _parameters; } // \ru Выдать точность построения. \en Get the precision of object construction.
DECLARE_PERSISTENT_CLASS_NEW_DEL( MbOffsetWireFrameCreator )
}; // MbOffsetWireFrameCreator
IMPL_PERSISTENT_OPS( MbOffsetWireFrameCreator )
#endif // __CR_OFFSET_WIREFRAME_H
+4 -4
View File
@@ -17,9 +17,9 @@
#include <op_shell_parameter.h>
class MATH_CLASS MbCurve3D;
class MATH_CLASS MbCurveEdge;
class MATH_CLASS MbFaceShell;
class MbCurve3D;
class MbCurveEdge;
class MbFaceShell;
//------------------------------------------------------------------------------
@@ -34,7 +34,7 @@ class MATH_CLASS MbPatchCreator : public MbCreator {
protected:
std::vector<SPtr<MbCurveMate>> initCurves; ///< \ru Кривые, определяющие края заплатки. \en Curves determining the boundaries of a patch.
PatchValues parameters; ///< \ru Параметры построения заплатки. \en Parameters of patch construction.
/// \ru Cледующие данные имеются только, если обрабатываются ребра. \en The following data are defined only when edges are being processed.
/// \ru Следующие данные имеются только, если обрабатываются ребра. \en The following data are defined only when edges are being processed.
SArray<bool> orientations; ///< \ru Ориентация кривых для замыкания в цепь. \en Orientation of curves for enclosing into a chain.
SArray<double> tolerances; ///< \ru Толерантности стыков кривых для замыкания в цепь. \en Tolerances of joints of curves for enclosing into a chain.
SArray<MbePairObjectsSelection> surfInds; ///< \ru Номер поверхности кривой пересечения, отвечающей существующей грани. \en Number of surface of the intersection curve corresponding to the existent face.
+10 -4
View File
@@ -25,10 +25,11 @@
class MATH_CLASS MbProjCurveCreator : public MbCreator {
private:
MbWireFrame * wireFrame; // \ru Проецируемый проволочный каркас. \en Wireframe to project.
RPArray<MbCreator> shellCreators; // \ru Протокол построения оболочки, на которую выполняется проецирование \en History tree of the shell the projection is performed onto
MbVector3D dir; // \ru Вектор направления (если нулевой, то проекция по нормали) \en Direction vector (if zero, the normal projection)
bool createExact; // \ru Создавать проекционную кривую при необходимости \en Create the projection curve if necessary
bool truncateByBounds; // \ru Усечь границами \en Truncate by bounds
RPArray<MbCreator> shellCreators; // \ru Протокол построения оболочки, на которую выполняется проецирование \en History tree of the shell the projection is performed onto.
MbVector3D dir; // \ru Вектор направления (если нулевой, то проекция по нормали) \en Direction vector (if zero, the normal projection).
bool createExact; // \ru Создавать проекционную кривую при необходимости \en Create the projection curve if necessary.
bool truncateByBounds; // \ru Усечь границами \en Truncate by bounds.
bool projOnParallel; // \ru Создавать проекции на поверхностях параллельных вектору проецирования. \en Project onto surfaces parallel to a direction of the vector projection.
protected:
/// \ru Конструктор копирования. \en Copy-constructor.
@@ -47,6 +48,11 @@ public:
const RPArray<MbCreator> & shellCreators, bool sameCreators,
const MbVector3D * dir, bool exact, bool truncate,
const MbSNameMaker & snMaker );
/// \ru Конструктор по параметрам. \en Constructor by parameters.
MbProjCurveCreator( const MbWireFrame & wf, const bool sameWire,
const c3d::CreatorsSPtrVector & shellCreators, bool sameCreators,
const MbVector3D * dir, bool exact, bool truncate, bool projOnParallel,
const MbSNameMaker & snMaker );
public:
virtual ~MbProjCurveCreator();
-85
View File
@@ -80,50 +80,6 @@ private :
IMPL_PERSISTENT_OPS( MbRibSolid )
//------------------------------------------------------------------------------
/** \brief \ru Создать оболочку с ребром жёсткости.
\en Create a shell with a rib. \~
\details \ru Для указанной оболочки построить оболочку с ребром жёсткости, форма которого задана плоским контуром.\n
Одновременно с построением оболочки функция создаёт её строитель. \n
\en For a specified shell create a shell with a rib which shape is given by the planar contour.\n
The function simultaneously constructs the shell and creates its constructor. \n \~
\deprecated \ru Функция устарела, взамен использовать #CreateRib с набором параметров #MbRibSolidParameters.
\en The function is deprecated, instead use #CreateRib with the parameter list #MbRibSolidParameters. \~
\param[in] solid - \ru Исходная оболочка.
\en The source shell. \~
\param[in] sameShell - \ru Способ копирования граней исходной оболочки.
\en Method of copying the source shell faces. \~
\param[in] place - \ru Локальная система координат, в плоскости XY которай расположен двумерный контур.
\en A local coordinate system the two-dimensional contour is located in XY plane of. \~
\param[in] contour - \ru Двумерный контур ребра жесткости расположен в плоскости XY локальной системы координат.
\en Two-dimensional contour of a rib located in XY plane of the local coordinate system. \~
\param[in] index - \ru Индекс сегмента в контуре, от которого будет установлено направление уклона.
\en Index of a segment in the contour at which the inclination direction will be set. \~
\param[in] parameters - \ru Правметры операции.
\en The operation parameters. \~
\param[in] operNames - \ru Именователь операции.
\en An object defining names generation in the operation. \~
\param[out] res - \ru Код результата операции.
\en Operation result code. \~
\param[out] shell - \ru Построенный набор граней.
\en Constructed set of faces. \~
\result \ru Возвращает строитель, если операция была выполнена успешно.
\en Returns the constructor if the operation has been successfully performed. \~
\ingroup Model_Creators
*/
// ---
DEPRECATE_DECLARE_REPLACE( CreateRib with MbRibSolidParameters )
MATH_FUNC (MbCreator *) CreateRib( MbFaceShell * solid,
MbeCopyMode sameShell,
const MbPlacement3D & place,
const MbContour & contour,
size_t index,
const RibValues & parameters,
const MbSNameMaker & operNames,
MbResultType & res,
MbFaceShell *& shell );
//------------------------------------------------------------------------------
/** \brief \ru Создать оболочку с ребром жёсткости.
\en Create a shell with a rib. \~
@@ -153,47 +109,6 @@ MATH_FUNC (MbCreator *) CreateRib( c3d::ShellSPtr & solid,
c3d::ShellSPtr & shell );
//------------------------------------------------------------------------------
/** \brief \ru Создать отдельное ребро жёсткости.
\en Create a separate rib. \~
\details \ru Для указанной оболочки построить оболочку в виде отдельного ребра жёсткости.
Одновременно с построением оболочки функция создаёт её строитель. \n
\en For the specified shell create a shell as a separate rib.
The function simultaneously constructs the shell and creates its constructor. \n \~
\deprecated \ru Функция устарела, взамен использовать #CreateRibElement с набором параметров #MbRibSolidParameters.
\en The function is deprecated, instead use #CreateRibElement with the parameter list #MbRibSolidParameters. \~
\param[in] solid - \ru Исходная оболочка.
\en The source shell. \~
\param[in] place - \ru Локальная система координат, в плоскости XY которай расположен двумерный контур.
\en A local coordinate system the two-dimensional contour is located in XY plane of. \~
\param[in] contour - \ru Двумерный контур ребра жесткости расположен в плоскости XY локальной системы координат.
\en Two-dimensional contour of a rib located in XY plane of the local coordinate system. \~
\param[in] index - \ru Индекс сегмента в контуре, от которого будет установлено направление уклона.
\en Index of a segment in the contour at which the inclination direction will be set. \~
\param[in] parameters - \ru Правметры операции.
\en The operation parameters. \~
\param[in] operNames - \ru Именователь операции.
\en An object defining names generation in the operation. \~
\param[out] res - \ru Код результата операции.
\en Operation result code. \~
\param[out] shell - \ru Построенный набор граней.
\en Constructed set of faces. \~
\result \ru Возвращает строитель, если операция была выполнена успешно.
\en Returns the constructor if the operation has been successfully performed. \~
\ingroup Model_Creators
*/
// ---
DEPRECATE_DECLARE_REPLACE( CreateRibElement with MbRibSolidParameters )
MATH_FUNC (MbCreator *) CreateRibElement( MbFaceShell * solid,
const MbPlacement3D & place,
const MbContour & contour,
size_t index,
const RibValues & parameters,
const MbSNameMaker & operNames,
MbResultType & res,
MbFaceShell *& shell );
//------------------------------------------------------------------------------
/** \brief \ru Создать отдельное ребро жёсткости.
\en Create a separate rib. \~
+5 -39
View File
@@ -18,11 +18,11 @@
#include <op_shell_parameter.h>
class MATH_CLASS MbFaceShell;
class MATH_CLASS MbCurveEdge;
class MATH_CLASS MbOrientedEdge;
class MATH_CLASS MbLoop;
struct MATH_CLASS RuledSurfaceValues;
class MbFaceShell;
class MbCurveEdge;
class MbOrientedEdge;
class MbLoop;
struct RuledSurfaceValues;
//------------------------------------------------------------------------------
@@ -77,40 +77,6 @@ public:
IMPL_PERSISTENT_OPS( MbRuledShell )
//------------------------------------------------------------------------------
/** \brief \ru Построить линейчатую оболочку.
\en Construct a ruled shell. \~
\details \ru Построить линейчатую оболочку по двум кривым.
Кривые могут быть составными.
Одновременно с построением оболочки функция создаёт её строитель.\n
\en Construct a ruled shell from two curves
Curves can be composite.
The function simultaneously creates the shell and its constructor.\n \~
\param[in,out] parameters - \ru Параметры операции.
\en The operation parameters. \~
\param[in] operNames - \ru Именователь.
\en An object for naming the new objects. \~
\param[in] isPhantom - \ru Режим создания фантома.
\en Create in the phantom mode. \~
\param[out] res - \ru Код результата операции.
\en Operation result code. \~
\param[out] shell - \ru Построенная оболочка.
\en The resultant shell. \~
\result \ru Возвращает строитель оболочки.
\en Returns the shell constructor. \~
\deprecated \ru Функция устарела, взамен использовать #CreateRuledShell с набором параметров #MbRuledShellParams.
\en The function is deprecated, instead use #CreateRuledShell with the parameter list #MbRuledShellParams. \~
\ingroup Model_Creators
*/
// ---
DEPRECATE_DECLARE_REPLACE( CreateRuledShell with MbRuledShellParams )
MATH_FUNC (MbCreator *) CreateRuledShell( RuledSurfaceValues & parameters,
const MbSNameMaker & operNames,
bool isPhantom,
MbResultType & res,
MbFaceShell *& shell );
//------------------------------------------------------------------------------
/** \brief \ru Построить линейчатую оболочку.
\en Construct a ruled shell. \~
+33 -26
View File
@@ -15,9 +15,11 @@
#include <curve3d.h>
#include <name_item.h>
#include <op_swept_parameter.h>
#include <cr_face_fillet_maker.h>
class MATH_CLASS MbFaceShell;
class MbFaceShell;
class MbFaceFilletMaker;
//------------------------------------------------------------------------------
@@ -29,17 +31,29 @@ class MATH_CLASS MbFaceShell;
*/
// ---
class MATH_CLASS MbSectionShell : public MbCreator {
public:
/// \ru Опция выбора результата. \en Option for the result selection.
enum class MbeSelectOption {
firstFaces, ///< \ru Первый набор граней. \en The first set of faces.
secondFaces, ///< \ru Второй набор граней. \en The second set of faces.
filletFaces ///< \ru Грани скругления. \en The fillet faces.
};
protected :
MbSectionData sectionData; ///< \ru Данные о поверхности переменного сечения. \en Data about mutable section surface.
MbSectionData sectionData; ///< \ru Данные о поверхности переменного сечения. \en Data about mutable section surface.
MbeSelectOption selectFaces; ///< \ru Опция выбора результата. \en Option for the result selection.
c3d::IndicesVector partsIndicies;///< \ru Индексы частей скругления, которыми подрезать базовые объекты. \en Indices of the fillet parts by which to cut the base objects.
/** \brief \ru Конструктор.
\en Constructor. \~
\param[in] data - \ru Данные о поверхности переменного сечения.
\en Data about mutable section surface. \~
\param[in] opt - \ru Опция выбора результата.
\en Option for the result selection. \~
\param[in] names - \ru Именователь грани оболочки.
\en Generating face names. \~
*/
MbSectionShell( const MbSectionData & data );
MbSectionShell( const MbSectionData & data, MbeSelectOption opt, const c3d::IndicesVector & indices = c3d::IndicesVector() );
private :
MbSectionShell( const MbSectionShell & init, MbRegDuplicate * ireg );
// \ru Объявление конструктора копирования без реализации, чтобы не было копирования по умолчанию. \en Declaration without implementation of the copy-constructor to prevent copying by default.
@@ -80,10 +94,12 @@ public :
/** \ru \name Функции строителя оболочки на поверхности переменного сечения.
\en \name Functions of creator of evolution solid shell.
\{ */
/// \ru Дать параметры. \en Get the parameters.
/// \ru Дать параметры. \en Get the parameters.
const MbSectionData & GetSectionData() { return sectionData; }
const c3d::IndicesVector & GetIndices() { return partsIndicies; }
/// \ru Установить параметры. \en Set the parameters.
void SetSectionData( const MbSectionData & data ) { sectionData = data; }
void SetSectionData( const MbSectionData & data ) { sectionData = data; }
void SetIndices( const c3d::IndicesVector & indices ) { partsIndicies = indices; }
/** \} */
/** \brief \ru Создать оболочку на поверхности переменного сечения.
@@ -94,30 +110,21 @@ public :
\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] solid - \ru Набор граней, к которым дополняется построение.
\en Face set the construction is complemented with respect to. \~
\param[in] sameShell - \ru Способ копирования граней.
\en The method of copying faces. \~
\param[in] data - \ru Данные о поверхности переменного сечения.
\en Data about mutable section surface. \~
\param[in] names - \ru Именователь грани оболочки.
\en Generating face names. \~
\param[out] res - \ru Код результата операции.
\en Operation result code. \~
\param[out] shell - \ru Результирующая оболочка.
\en Resultant shell. \~
\param[out] opResult - \ru Обобщенные результаты операции.
\en Common operation results. \~
\param[in] fMaker - \ru Генератор скруглений граней.
\en Maker of faces fillets. \~
\param[in] option - \ru Опция выбора результата.
\en Option for the result selection. \~
\param[in] indices - \ru Индексы частей скругления, которыми подрезать базовые объекты. Если массив индексов пустой, то выполняется подрезка всеми частями скругления.
\en Indices of the fillet parts by which to cut the base objects. If indices array is empty then performed cutting with the all parts of the fillet. \~
\result \ru Возвращает строитель.
\en Returns the constructor of operation. \~
*/
static
c3d::CreatorSPtr Create( c3d::ShellSPtr & solid,
MbeCopyMode sameShell,
const MbSectionData & data,
MbResultType & res,
c3d::ShellSPtr & shell,
MbOperationResults & opResult );
static
c3d::CreatorSPtr Create( const MbFaceFilletMaker & fMaker,
MbeSelectOption option,
const c3d::IndicesVector & indices = c3d::IndicesVector() );
const MbPrecision & GetPrecision() const override { return (MbPrecision &)sectionData; } // \ru Выдать точность построения. \en Get the precision of object construction.
private :
// \ru Объявление оператора присваивания без реализации, чтобы не было присваивания по умолчанию. \en The declaration of the assignment operator without implementation to prevent an assignment by default.
-41
View File
@@ -75,47 +75,6 @@ private:
IMPL_PERSISTENT_OPS( MbBuildSheetMetalSolid )
//------------------------------------------------------------------------------
/** \brief \ru Строитель оболочки из листового материала на основе произвольного тела.
\en Constructor of the sheet metal shell based on an arbitrary solid. \~
\details \ru На базе исходной произвольной оболочки построить оболочку из листового материала. \n
Одновременно с построением оболочки функция создаёт её строитель.\n
\en A shell is to be constructed on the basis of the source arbitrary shell. \n
The function simultaneously creates the shell and its constructor.\n \~
\param[in] initialShell - \ru Исходная оболочка.
\en The source shell. \~
\param[in] sameShell - \ru Режим копирования исходной оболочки.
\en Mode of copying the source shell. \~
\param[in] initFace - \ru Исходная грань для построения листового тела.
\en The initial face for sheet metal solid construction. \~
\param[in] sense - \ru Признак совпадения направления придания толщины с нормалью исходной грани.
\en Attribute of coincidence of extrusion direction to the normal of the initial face. \~
\param[in] params - \ru Параметры построения листового тела по произвольному телу.
\en The parameters of sheet metal solid building based on an arbitrary solid. \~
\param[in] nameMaker - \ru Именователь.
\en An object for naming the new objects. \~
\param[out] res - \ru - Код результата операции.
\en - The operation result code. \~
\param[out] resultShell - \ru Результирующее тело.
\en The resultant solid. \~
\result \ru Возвращает строитель оболочки.
\en Returns the shell constructor. \~
\deprecated \ru Функция устарела, взамен использовать #ConvertShellToSheetMetall с набором параметров #MbSolidToSheetMetalParams.
\en The function is deprecated, instead use #ConvertShellToSheetMetall with the parameter list #MbSolidToSheetMetalParams. \~
\ingroup Model_Creators
*/
// ---
DEPRECATE_DECLARE_REPLACE( ConvertShellToSheetMetall with 'MbSolidToSheetMetalParams' argument )
MATH_FUNC (MbCreator *) ConvertShellToSheetMetall( MbFaceShell * initialShell,
const MbeCopyMode sameShell,
const MbFace & initFace,
bool sense,
MbSolidToSheetMetalValues & params,
const MbSNameMaker & nameMaker,
MbResultType & res,
SPtr<MbFaceShell> & resultShell );
//------------------------------------------------------------------------------
/** \brief \ru Строитель оболочки из листового материала на основе произвольного тела.
\en Constructor of the sheet metal shell based on an arbitrary solid. \~
@@ -71,37 +71,6 @@ private:
IMPL_PERSISTENT_OPS( MbNormalizeHolesSolid )
//------------------------------------------------------------------------------
/** \brief \ru Нормализовать вырезы листового тела.
\en Normalize of the holes of sheet solid. \~
\details \ru Нормализовать вырезы листового тела. \n
\en Normalize of the holes of sheet solid. \n \~
\param[in] initialShell - \ru Исходная оболочка.
\en The source shell. \~
\param[in] sameShell - \ru Флаг удаления оболочки исходного тела.
\en Whether to delete the shell of the source solid. \~
\param[in] nameMaker - \ru Именователь.
\en An object for naming the new objects. \~
\param[in] cutOnly - \ru Hормализуется только вырез.
\en Normalize only cut. \~
\param[out] res - \ru Код результата операции.
\en Operation result code. \~
\param[out] shell - \ru Построенная оболочка.
\en The resultant shell. \~
\result \ru Возвращает строитель оболочки.
\en Returns the shell constructor. \~
\ingroup Sheet_Metal_Modeling
*/
// ---
DEPRECATE_DECLARE_REPLACE( NormalizeHolesSides with 'MbNormalizeCutSidesParams' argument )
MATH_FUNC (MbCreator *) NormalizeHolesSides ( MbFaceShell *& initialShell,
const MbeCopyMode sameShell,
const MbSNameMaker & nameMaker,
bool cutOnly,
MbResultType & res,
MbFaceShell *& shell );
//------------------------------------------------------------------------------
/** \brief \ru Нормализовать вырезы листового тела.
\en Normalize of the holes of sheet solid. \~
+1 -1
View File
@@ -15,7 +15,7 @@
#include <op_shell_parameter.h>
struct MATH_CLASS MbSheetMetalBend;
struct MbSheetMetalBend;
//------------------------------------------------------------------------------
+2 -2
View File
@@ -14,8 +14,8 @@
#include <creator.h>
class MATH_CLASS MbFaceShell;
class MATH_CLASS MbSolid;
class MbFaceShell;
class MbSolid;
//------------------------------------------------------------------------------
/** \brief \ru Строитель оболочки тела без истории.
+3 -3
View File
@@ -1,7 +1,7 @@
////////////////////////////////////////////////////////////////////////////////
/**
\file
\brief \ru Строитель фаски или скругления ребeр тела.
\brief \ru Строитель фаски или скругления ребер тела.
\en Constructor of chamfer or fillet of solid's edges.
*/
////////////////////////////////////////////////////////////////////////////////
@@ -15,9 +15,9 @@
//------------------------------------------------------------------------------
/** \brief \ru Строитель фаски или скругления ребeр тела.
/** \brief \ru Строитель фаски или скругления ребер тела.
\en Constructor of chamfer or fillet of solid's edges. \~
\details \ru Строитель фаски или скругления ребeр тела содержит идентификаторы обрабатываемых рёбер и параметры для выполнения операции. \n
\details \ru Строитель фаски или скругления ребер тела содержит идентификаторы обрабатываемых рёбер и параметры для выполнения операции. \n
\en Constructor of solid's edges chamfer or fillet contains identifiers of edges being processed and parameters for performing operation. \n \~
\ingroup Model_Creators
*/ // ---
+73 -49
View File
@@ -12,7 +12,6 @@
#include <templ_rp_array.h>
#include <templ_s_array.h>
#include <templ_sptr.h>
#include <math_define.h>
#include <mb_placement3d.h>
@@ -26,15 +25,16 @@
class reader;
class writer;
class MATH_CLASS MbProperties;
class MATH_CLASS MbCartPoint3D;
class MATH_CLASS MbAxis3D;
class MATH_CLASS MbSpaceItem;
class MATH_CLASS MbCurve;
class MATH_CLASS MbSurfaceIntersectionCurve;
class MATH_CLASS MbSNameMaker;
class MATH_CLASS MbSolid;
struct MATH_CLASS MbControlData3D;
class MbProperties;
class MbCartPoint3D;
class MbAxis3D;
class MbSpaceItem;
class MbCurve;
class MbSurfaceIntersectionCurve;
class MbSNameMaker;
class MbSolid;
class MbWireFrame;
struct MbControlData3D;
class MbRegDuplicate;
class MbRegTransform;
enum MbeSenseValue;
@@ -46,12 +46,12 @@ enum MbeCopyMode;
\en Truncating elements. \~
\details \ru Усекающие элементы используются для разделения граней на части и усечения оболочек.
Усечение может выполняться двумерными кривыми, расположенными в плоскости XY локальной системы координат,
трёхмерными кривыми, поверхностями и оболочками.
трёхмерными кривыми, поверхностями, оболочками и каркасом.
Усекающие элементы используются в строителе усеченной оболочки MbTruncatedShell и
строителе оболочки с разбиением граней MbSplitShell. \n
\en Truncating elements are used for splitting faces into parts and truncation of shells.
Truncating can be performed by two-dimensional curves located in the XY plane of the local coordinate system,
by three-dimensional curves, surfaces and shells.
by three-dimensional curves, surfaces, shells and wire frame.
Truncating elements are used in the creator of truncated shell MbTruncatedShell and
in the creator of shell with face splitting MbSplitShell. \n \~
\ingroup Shell_Building_Parameters
@@ -60,11 +60,12 @@ enum MbeCopyMode;
class MATH_CLASS MbSplitData : public MbRefItem {
/// \ru Типы усекающих объектов. \en Truncating objects types.
enum MbeSplitItemsType {
sit_NoItems = 0, ///< \ru Нет объектов. \en No objects.
sit_Curves2d = 1, ///< \ru Двумерные кривые в локальной системе координат. \en Two-dimensional curves in the local coordinate system.
sit_Curves3d = 2, ///< \ru Трехмерные кривые. \en Three-dimensional curves.
sit_Surfaces = 3, ///< \ru Поверхности. \en Surfaces.
sit_Creators = 4, ///< \ru Строители тела. \en Solid creators.
sit_NoItems = 0, ///< \ru Нет объектов. \en No objects.
sit_Curves2d = 1, ///< \ru Двумерные кривые в локальной системе координат. \en Two-dimensional curves in the local coordinate system.
sit_Curves3d = 2, ///< \ru Трехмерные кривые. \en Three-dimensional curves.
sit_Surfaces = 3, ///< \ru Поверхности. \en Surfaces.
sit_Creators = 4, ///< \ru Строители тела. \en Solid creators.
sit_WfCreators = 5, ///< \ru Строители каркаса. \en Wire frame.
};
private:
@@ -80,30 +81,34 @@ private:
// Shell
c3d::CreatorsSPtrVector creators; ///< \ru Строители оболочки. \en Shell creators.
c3d::ShellSPtr solidShell; ///< \ru Оболочка. \en A shell.
// Wire frame
c3d::CreatorsSPtrVector wfCreators; ///< \ru Строители каркаса. \en Wire frame creators.
public:
/// \ru Конструктор. \en Constructor.
MbSplitData()
: place ( )
: sketchContours( )
, place ( )
, direction ( )
, sense ( orient_BOTH )
, sketchContours( )
, spaceCurves ( )
, surfaces ( )
, creators ( )
, solidShell ( nullptr )
, solidShell ( nullptr )
, wfCreators ( )
{
}
/// \ru Конструктор по двумерному контуру в локальной системе координат. \en Constructor by two-dimensional contour in the local coordinate system.
MbSplitData( const MbPlacement3D & pl, MbeSenseValue dirSense, const MbContour & item, bool same )
: place ( pl )
: sketchContours( )
, place ( pl )
, direction ( )
, sense ( dirSense )
, sketchContours( )
, spaceCurves ( )
, surfaces ( )
, creators ( )
, solidShell ( nullptr )
, solidShell ( nullptr )
, wfCreators ( )
{
SPtr<MbContour> sketchContour;
sketchContour = same ? const_cast<MbContour *>(&item) : static_cast<MbContour *>(&item.Duplicate());
@@ -111,14 +116,15 @@ public:
}
/// \ru Конструктор по двумерному контуру в локальной системе координат. \en Constructor by two-dimensional contour in the local coordinate system.
MbSplitData( const MbPlacement3D & pl, const MbVector3D & dir, const MbContour & item, bool same )
: place ( pl )
: sketchContours( )
, place ( pl )
, direction ( dir )
, sense ( orient_BOTH )
, sketchContours( )
, spaceCurves ( )
, surfaces ( )
, creators ( )
, solidShell ( nullptr )
, solidShell ( nullptr )
, wfCreators ( )
{
C3D_ASSERT( (direction.MaxFactor() < LENGTH_EPSILON) || !direction.Orthogonal( place.GetAxisZ(), ANGLE_EPSILON ) );
@@ -129,28 +135,30 @@ public:
/// \ru Конструктор по двумерным контурам в локальной системе координат. \en Constructor by two-dimensional contours in the local coordinate system.
template <class PlaneContoursVector>
MbSplitData( const MbPlacement3D & pl, MbeSenseValue dirSense, const PlaneContoursVector & items, bool same )
: place ( pl )
: sketchContours( )
, place ( pl )
, direction ( )
, sense ( dirSense )
, sketchContours( )
, spaceCurves ( )
, surfaces ( )
, creators ( )
, solidShell ( nullptr )
, solidShell ( nullptr )
, wfCreators ( )
{
::AddRefItems( items, same, sketchContours );
}
/// \ru Конструктор по двумерным контурам в локальной системе координат. \en Constructor by two-dimensional contours in the local coordinate system.
template <class PlaneContoursVector>
MbSplitData( const MbPlacement3D & pl, const MbVector3D & dir, const PlaneContoursVector & items, bool same )
: place ( pl )
: sketchContours( )
, place ( pl )
, direction ( dir )
, sense ( orient_BOTH )
, sketchContours( )
, spaceCurves ( )
, surfaces ( )
, creators ( )
, solidShell ( nullptr )
, solidShell ( nullptr )
, wfCreators ( )
{
C3D_ASSERT( (direction.MaxFactor() < LENGTH_EPSILON) || !direction.Orthogonal( place.GetAxisZ(), ANGLE_EPSILON ) );
@@ -158,40 +166,43 @@ public:
}
/// \ru Конструктор по пространственным кривым. \en Constructor by spatial curves.
MbSplitData( const c3d::ConstSpaceCurvesSPtrVector & items, bool same )
: place ( )
: sketchContours( )
, place ( )
, direction ( )
, sense ( orient_BOTH )
, sketchContours( )
, spaceCurves ( )
, surfaces ( )
, creators ( )
, solidShell ( nullptr )
, solidShell ( nullptr )
, wfCreators ( )
{
::AddRefItems( items, same, spaceCurves );
}
/// \ru Конструктор по пространственным кривым. \en Constructor by spatial curves.
MbSplitData( const c3d::ConstSpaceCurvesVector & items, bool same )
: place ( )
: sketchContours( )
, place ( )
, direction ( )
, sense ( orient_BOTH )
, sketchContours( )
, spaceCurves ( )
, surfaces ( )
, creators ( )
, solidShell ( nullptr )
, solidShell ( nullptr )
, wfCreators ( )
{
::AddRefItems( items, same, spaceCurves );
}
/// \ru Конструктор по поверхности. \en Constructor by a surface.
MbSplitData( const MbSurface & item, bool same )
: place ( )
: sketchContours( )
, place ( )
, direction ( )
, sense ( orient_BOTH )
, sketchContours( )
, spaceCurves ( )
, surfaces ( )
, creators ( )
, solidShell ( nullptr )
, solidShell ( nullptr )
, wfCreators ( )
{
SPtr<MbSurface> surface;
surface = same ? const_cast<MbSurface *>(&item) : static_cast<MbSurface *>(&item.Duplicate());
@@ -199,32 +210,36 @@ public:
}
/// \ru Конструктор по поверхностям. \en Constructor by surfaces.
MbSplitData( const c3d::ConstSurfacesSPtrVector & items, bool same )
: place ( )
: sketchContours( )
, place ( )
, direction ( )
, sense ( orient_BOTH )
, sketchContours( )
, spaceCurves ( )
, surfaces ( )
, creators ( )
, solidShell ( nullptr )
, solidShell ( nullptr )
, wfCreators ( )
{
::AddRefItems( items, same, surfaces );
}
/// \ru Конструктор по поверхностям. \en Constructor by surfaces.
MbSplitData( const c3d::ConstSurfacesVector & items, bool same )
: place ( )
: sketchContours( )
, place ( )
, direction ( )
, sense ( orient_BOTH )
, sketchContours( )
, spaceCurves ( )
, surfaces ( )
, creators ( )
, solidShell ( nullptr )
, solidShell ( nullptr )
, wfCreators ( )
{
::AddRefItems( items, same, surfaces );
}
/// \ru Конструктор по телу. \en Constructor by a solid.
MbSplitData( const MbSolid & solid, bool same, bool keepShell );
/// \ru Конструктор по каркасу. \en
MbSplitData( const MbWireFrame & wireFrame, bool same );
/// \ru Конструктор копирования с регистратором копирования. \en Copy constructor with registrator of copying.
explicit MbSplitData( const MbSplitData &, bool same, MbRegDuplicate * iReg );
/// \ru Деструктор. \en Destructor.
@@ -353,7 +368,8 @@ public:
return ( sketchContours.empty() &&
spaceCurves.empty() &&
surfaces.empty() &&
(creators.empty() && (solidShell == nullptr)) ); }
(creators.empty() && (solidShell == nullptr)) &&
wfCreators.empty() ); }
/// \ru Являются ли объекты равными? \en Determine whether an object is equal?
bool IsSame( const MbSplitData &, double accuracy ) const;
@@ -493,12 +509,20 @@ public:
::DetachItem( creator );
}
}
/// \ru Получить хранимую оболочку. \en Get stored shell.
/// \ru Получить хранимую оболочку. \en Get stored shell.
const MbFaceShell * GetSolidShell() const { return solidShell; }
/// \ru Создать оболочку по строителям (solidShell остается нетронутой). \en Create a shell by creators (solidShell remains unchanged).
MbFaceShell * CreateShell( MbeCopyMode copyMode );
/// \ru Создать оболочку по строителям. \en Create a shell by creators (solidShell remains unchanged).
bool UpdateShell( MbeCopyMode copyMode );
/// \ru Выдать количество строителей тела. \en Get number of wire frame creators.
size_t GetWFrameCreatorsCount() const { return wfCreators.size(); }
/// \ru Получить строитель каркаса по индексу. \en Get wire frame constructor by index.
const MbCreator * GetWireFrameCreator( size_t k ) const { return ((k < wfCreators.size()) ? wfCreators[k].get() : nullptr ); }
/// \ru Получить строитель каркаса по индексу. \en Get wire frame constructor by index.
MbCreator * SetWireFrameCreator( size_t k ) { return ((k < wfCreators.size()) ? wfCreators[k].get() : nullptr ); }
/// \ru Создать каркас по строителям. \en Create a wire frame by creators.
MbWireFrame * CreateWireFrame( MbeCopyMode copyMode );
/// \ru Удалить данные. \en Delete data.
void DeleteItems();
/// \ru Прочитать данные. \en Read data.
+2 -2
View File
@@ -14,8 +14,8 @@
#include <sheet_metal_param.h>
class MATH_CLASS MbPlacement3D;
class MATH_CLASS MbCurveBoundedSurface;
class MbPlacement3D;
class MbCurveBoundedSurface;
//------------------------------------------------------------------------------
+1 -1
View File
@@ -14,7 +14,7 @@
#include <sheet_metal_param.h>
class MATH_CLASS MbCurveBoundedSurface;
class MbCurveBoundedSurface;
//------------------------------------------------------------------------------
+1 -94
View File
@@ -16,7 +16,7 @@
//#include <surf_plane.h>
class MATH_CLASS MbRemoveOperationResultParams;
class MbRemoveOperationResultParams;
//------------------------------------------------------------------------------
@@ -37,26 +37,6 @@ public :
/// \ru Конструктор по параметрам операции. \en Constructor by operation parameters.
MbRemoveOperationSolid( const MbRemoveOperationResultParams & params );
/** \brief \ru Конструктор.
\en Constructor. \~
\details \ru Конструктор по главному имени удаляемой операции, типу листовой операции
и именователю. \n
\en Constructor by main name of the operation to delete, type of sheet metal operations
and object defining names generation in the operation. \n \~
\param[in] removeName - \ru Главное имя удаляемой операции.
\en Main name of the operation to delete. \~
\param[in] opType - \ru Тип листовой операции.
\en Type of sheet metal operations. \~
\param[in] names - \ru Именователь.
\en An object defining names generation in the operation. \~
\deprecated \ru Метод устарел, взамен использовать конструктор с набором параметров #MbRemoveOperationResultParams.
\en The method is deprecated, instead use constructor with the parameter list #MbRemoveOperationResultParams. \~
*/
DEPRECATE_DECLARE_REPLACE( MbRemoveOperationSolid with MbRemoveOperationResultParams )
MbRemoveOperationSolid( const SimpleName removeName,
MbeSheetOperationName opType,
const MbSNameMaker & names );
private:
MbRemoveOperationSolid( const MbRemoveOperationSolid &, MbRegDuplicate * iReg );
// \ru Объявление конструктора копирования без реализации, чтобы не было копирования по умолчанию. \en Declaration without implementation of the copy-constructor to prevent copying by default.
@@ -127,79 +107,6 @@ MATH_FUNC (MbCreator *) CreateRemovedOperationResult ( MbFaceShell &
SPtr<MbFaceShell> & shell );
//------------------------------------------------------------------------------
/** \brief \ru Построить оболочку без указанной операции.
\en Constructs a shell without the specified operation. \~
\details \ru Построить оболочку без указанной операции.
Удаляет грани с указанным главным именем операции и затягивает образовавшуюся дыру расширением соседних граней. \n
\en Constructs a shell without the specified operation.
It removes faces with specified main name and then mends the hole by stretching the neighbour faces. \n \~
\param[in] initialShell - \ru Исходная оболочка.
\en The initial shell. \~
\param[in] sameShell - \ru Режим копирования исходной оболочки.
\en Mode of copying the initial shell. \~
\param[in] removeName - \ru Главное имя операции которую надо удалить.
\en The main name of the operation to be removed. \~
\param[in] opType - \ru Тип листовой операции.
\en Type of the sheet operation. \~
\param[in] names - \ru Именователь граней.
\en An object for naming faces. \~
\param[out] res - \ru Код результата операции.
\en Operation result code. \~
\param[out] shell - \ru Построенная оболочка.
\en The resultant shell. \~
\result \ru Возвращает строитель оболочки.
\en Returns the shell constructor. \~
\deprecated \ru Функция устарела, взамен использовать #CreateRemovedOperationResult с набором параметров #MbRemoveOperationResultParams.
\en The function is deprecated, instead use #CreateRemovedOperationResult with the parameter list #MbRemoveOperationResultParams. \~
\ingroup Model_Creators
*/
// ---
DEPRECATE_DECLARE_REPLACE( CreateRemovedOperationResult with MbRemoveOperationResultParams )
MATH_FUNC (MbCreator *) CreateRemovedOperationResult ( MbFaceShell & initialShell,
const MbeCopyMode sameShell,
const SimpleName removeName,
MbeSheetOperationName opType,
const MbSNameMaker & names,
MbResultType & res,
MbFaceShell *& shell );
//------------------------------------------------------------------------------
/** \brief \ru Построить оболочку без указанной операции.
\en Constructs a shell without the specified operation. \~
\details \ru Построить оболочку без указанной операции.
Удаляет грани с указанным главным именем операции и затягивает образовавшуюся дыру расширением соседних граней. \n
\en Constructs a shell without the specified operation.
It removes faces with specified main name and then mends the hole by stretching the neighbour faces. \n \~
\param[in] initialShell - \ru Исходная оболочка.
\en The initial shell. \~
\param[in] sameShell - \ru Режим копирования исходной оболочки.
\en Mode of copying the initial shell. \~
\param[in] removeName - \ru Главное имя операции которую надо удалить.
\en The main name of the operation to be removed. \~
\param[in] names - \ru Именователь граней.
\en An object for naming faces. \~
\param[out] res - \ru Код результата операции.
\en Operation result code. \~
\param[out] shell - \ru Построенная оболочка.
\en The resultant shell. \~
\result \ru Возвращает строитель оболочки.
\en Returns the shell constructor. \~
\deprecated \ru Функция устарела, взамен использовать #CreateRemovedOperationResult с набором параметров #MbRemoveOperationResultParams.
\en The function is deprecated, instead use #CreateRemovedOperationResult with the parameter list #MbRemoveOperationResultParams. \~
\ingroup Model_Creators
*/
// ---
DEPRECATE_DECLARE_REPLACE( CreateRemovedOperationResult with MbRemoveOperationResultParams )
MATH_FUNC (MbCreator *) CreateRemovedOperationResult( MbFaceShell & initialShell,
const MbeCopyMode sameShell,
const SimpleName removeName,
const MbSNameMaker & names,
MbResultType & res,
MbFaceShell *& shell );
#endif // __CR_STAMP_REMOVE_SOLID_H
-59
View File
@@ -82,50 +82,6 @@ private :
IMPL_PERSISTENT_OPS( MbStampRibSolid )
//------------------------------------------------------------------------------
/** \brief \ru Создать оболочку с ребром жёсткости.
\en Create a shell with a rib. \~
\details \ru Для указанной листовой оболочки построить оболочку с ребром жёсткости, форма которого задана плоским контуром.\n
Одновременно с построением оболочки функция создаёт её строитель. \n
\en For a specified sheet shell create a shell with a rib which shape is given by the planar contour.\n
The function simultaneously constructs the shell and creates its constructor. \n \~
\deprecated \ru Функция устарела, взамен использовать #CreateSheetRib с набором параметров #MbSheetRibSolidParams.
\en The function is deprecated, instead use #CreateSheetRib with the parameter list #MbSheetRibSolidParams. \~
\param[in] solid - \ru Исходная оболочка.
\en The source shell. \~
\param[in] sameShell - \ru Способ копирования граней исходной оболочки.
\en Method of copying the source shell faces. \~
\param[in] place - \ru Локальная система координат, в плоскости XY которай расположен двумерный контур.
\en A local coordinate system the two-dimensional contour is located in XY plane of. \~
\param[in] contour - \ru Двумерный контур ребра жесткости расположен в плоскости XY локальной системы координат.
\en Two-dimensional contour of a rib located in XY plane of the local coordinate system. \~
\param[in] index - \ru Индекс сегмента в контуре, от которого будет установлено направление уклона.
\en Index of a segment in the contour at which the inclination direction will be set. \~
\param[in] parameters - \ru Параметры операции.
\en The operation parameters. \~
\param[in] operNames - \ru Именователь операции.
\en An object defining names generation in the operation. \~
\param[out] res - \ru Код результата операции.
\en Operation result code. \~
\param[out] resultShell - \ru Построенный набор граней.
\en Constructed set of faces. \~
\result \ru Возвращает строитель, если операция была выполнена успешно.
\en Returns the constructor if the operation has been successfully performed. \~
\ingroup Model_Creators
*/
// ---
DEPRECATE_DECLARE_REPLACE( CreateSheetRib with MbSheetRibSolidParams )
MATH_FUNC (MbCreator *) CreateSheetRib( MbFaceShell * solid,
MbeCopyMode sameShell,
const MbPlacement3D & place,
const MbContour & contour,
size_t index,
SheetRibValues & parameters,
const MbSNameMaker & operNames,
MbResultType & res,
MbFaceShell *& resultShell );
//------------------------------------------------------------------------------
/** \brief \ru Создать оболочку с ребром жёсткости.
\en Create a shell with a rib. \~
@@ -155,21 +111,6 @@ MATH_FUNC (c3d::CreatorSPtr) CreateSheetRib( const c3d::ShellSPtr & solid
c3d::ShellSPtr & shell );
//------------------------------------------------------------------------------
// Построение элементов ребра жёсткости.
// ---
DEPRECATE_DECLARE_REPLACE( CreateSheetRibParts with MbSheetRibSolidParams )
MATH_FUNC (MbResultType) CreateSheetRibParts( MbFaceShell * solid,
MbeCopyMode sameShell,
const MbPlacement3D & place,
const MbContour & contour,
const size_t index,
const SheetRibValues & pars,
const MbSNameMaker & names,
MbFaceShell *& shellToAdd,
MbFaceShell *& shellToSubtract );
//------------------------------------------------------------------------------
/** \brief \ru Создание элементов оболочки с ребром жесткости.
\en Create rib parts of a shell. \~
+1 -47
View File
@@ -16,7 +16,7 @@
#include <sheet_metal_param.h>
class MATH_CLASS MbCurveBoundedSurface;
class MbCurveBoundedSurface;
//------------------------------------------------------------------------------
@@ -102,52 +102,6 @@ private:
IMPL_PERSISTENT_OPS( MbStampSolid )
//------------------------------------------------------------------------------
/** \brief \ru Построить оболочку из листового материала штамповкой.
\en Construct a shell form sheet material by stamping. \~
\details \ru На базе исходной оболочки из листового материала построить оболочку методом закрытой или открытой штамповкой. \n
Одновременно с построением оболочки функция создаёт её строитель.\n
\en A shell is to be constructed on the basis of the source shell by the method of closed or open stamping. \n
The function simultaneously creates the shell and its constructor.\n \~
\param[in] solid - \ru Исходная оболочка.
\en The source shell. \~
\param[in] sameShell - \ru Режим копирования исходной оболочки.
\en Mode of copying the source shell. \~
\param[in] face - \ru Грань штамповки.
\en The face for stamping. \~
\param[in] placement - \ru Локальная система координат, в плоскости XY которй расположен контур штамповки.
\en The local coordinate system in the XY plane of which the stamping contour is located. \~
\param[in] contour - \ru Контур штамповки.
\en The stamping contour. \~
\param[in] parameters - \ru Параметры штамповки.
\en The parameters of stamping. \~
\param[in] operNames - \ru Именователь операции.
\en An object defining names generation in the operation. \~
\param[out] res - \ru Код результата операции выдавливания.
\en The extrusion operation result code. \~
\param[out] shell - \ru Построенная оболочка.
\en The resultant shell. \~
\result \ru Возвращает строитель оболочки.
\en Returns the shell constructor. \~
\deprecated \ru Функция устарела, взамен использовать #CreateStamp с набором параметров #MbStampParams.
\en The function is deprecated, instead use #CreateStamp with the parameter list #MbStampParams. \~
\ingroup Model_Creators
*/
// ---
DEPRECATE_DECLARE_REPLACE( CreateStamp with 'MbStampParams' argument )
MATH_FUNC (MbCreator *) CreateStamp( SPtr<MbFaceShell> & initialShell, // исходная оболочка
const MbeCopyMode sameShell, // флаг способа использования исходной оболочки
const MbFace * face, // грань штамповки
const MbPlacement3D & placement, // локальная система координат контура
const MbContour & contour, // контур штамповки
const MbStampingValues & params, // параметры штамповки
const double thickness, // толщина листа
const bool add, // создать добавляемую часть
const MbSNameMaker & nameMaker, // именователь
MbResultType & res, // флаг успешности операции
SPtr<MbFaceShell> & resultShell ); // результирующая оболочка
//------------------------------------------------------------------------------
/** \brief \ru Построить оболочку из листового материала штамповкой.
\en Construct a shell form sheet material by stamping. \~
+1 -49
View File
@@ -15,7 +15,7 @@
#include <sheet_metal_param.h>
class MATH_CLASS MbCurveBoundedSurface;
class MbCurveBoundedSurface;
//------------------------------------------------------------------------------
@@ -97,54 +97,6 @@ private:
IMPL_PERSISTENT_OPS( MbSphericalStampSolid )
//------------------------------------------------------------------------------
/** \brief \ru Построить оболочку из листового материала со сферической штамповкой.
\en Construct a shell form sheet material by spherical stamping. \~
\details \ru На базе исходной оболочки из листового материала построить оболочку методом сферической штамповки или части сферической штамповки без исходного листового тела. \n
Одновременно с построением оболочки функция создаёт её строитель.\n
\en A shell is to be constructed on the basis of the source shell by the method of spherical stamping or parts of spherical stamp without the basis sheet solid. \n
The function simultaneously creates the shell and its constructor.\n \~
\param[in] solid - \ru Исходная оболочка.
\en The source shell. \~
\param[in] sameShell - \ru Режим копирования исходной оболочки.
\en Mode of copying the source shell. \~
\param[in] face - \ru Грань штамповки.
\en The face for stamping. \~
\param[in] placement - \ru Локальная система координат, в плоскости XY которй расположен контур штамповки.
\en The local coordinate system in the XY plane of which the stamping contour is located. \~
\param[in] parameters - \ru Параметры штамповки.
\en The parameters of stamping. \~
\param[in] thickness - \ru Толщина листа.
\en The thickness of the sheet solid.
\param[in] add - \ru Какую часть сферической штамповки создавать.
\en Which part of the spherical stamp to create.
\param[in] center - \ru Центр штамповки.
\en The center of the stamping. \~
\param[in] operNames - \ru Именователь операции.
\en An object defining names generation in the operation. \~
\param[out] res - \ru Код результата операции выдавливания.
\en The extrusion operation result code. \~
\param[out] shell - \ru Построенная оболочка.
\en The resultant shell. \~
\result \ru Возвращает строитель оболочки.
\en Returns the shell constructor. \~
\ingroup Model_Creators
*/
// ---
DEPRECATE_DECLARE_REPLACE( CreateSphericalStamp with 'MbSphericalStampParams' argument )
MATH_FUNC (MbCreator *) CreateSphericalStamp( SPtr<MbFaceShell> & solid,
const MbeCopyMode sameShell,
const MbFace * face,
const MbPlacement3D & placement,
const MbStampingValues & parameters,
const double thickness,
const bool add,
const MbCartPoint & center,
const MbSNameMaker & operNames,
MbResultType & res,
SPtr<MbFaceShell> & shell );
//------------------------------------------------------------------------------
/** \brief \ru Построить оболочку из листового материала со сферической штамповкой.
\en Construct a shell form sheet material by spherical stamping. \~
-124
View File
@@ -92,59 +92,6 @@ private:
IMPL_PERSISTENT_OPS( MbUserStampSolid )
//------------------------------------------------------------------------------
/** \brief \ru Построить оболочку из листового материала штамповкой телом-инструментом.
\en Construct a shell form sheet material by tool body stamping. \~
\details \ru На базе исходной оболочки из листового материала построить оболочку методом закрытой или открытой штамповки. \n
Одновременно с построением оболочки функция создаёт её строитель.\n
\en A shell is to be constructed on the basis of the source shell by the method of closed or open stamping. \n
The function simultaneously creates the shell and its constructor.\n \~
\param[in] initialShell - \ru Исходная оболочка.
\en The source shell. \~
\param[in] sameShell - \ru Режим копирования исходной оболочки.
\en Mode of copying the source shell. \~
\param[in] targetFace - \ru Грань штамповки.
\en The face for stamping. \~
\param[in] creatorsTool - \ru Журнал построения инструмента.
\en A creator of the tool.
\param[in] toolShell - \ru Оболочка тела-инструмента.
\en A shell of tool solid. \~
\param[in] sameShellTool - \ru Режим копирования оболочки тела-инструмента.
\en Mode of copying the tool shell. \~
\param[in] isPunch - \ru Является тело-инструмент пуансоном или матрицей.
\en Is tool body a punch or a die. \~
\param[in] pierceFaces - \ru Вскрываемые для вырубки грани инструмента,
\en Pierce faces of tool body. \~
\param[in] params - \ru Параметры штамповки.
\en The parameters of stamping. \~
\param[in] nameMaker - \ru Именователь.
\en An object for naming the new objects. \~
\param[out] res - \ru - Код результата операции.
\en - The operation result code. \~
\param[out] resultShell - \ru Результирующее тело.
\en The resultant solid. \~
\result \ru Возвращает строитель оболочки.
\en Returns the shell constructor. \~
\deprecated \ru Функция устарела, взамен использовать #CreateUserStamp с набором параметров #MbStampWithToolParams.
\en The function is deprecated, instead use #CreateUserStamp with the parameter list #MbStampWithToolParams. \~
\ingroup Model_Creators
*/
// ---
DEPRECATE_DECLARE_REPLACE( CreateUserStamp with 'MbStampWithToolParams' argument )
MATH_FUNC (MbCreator *) CreateUserStamp( MbFaceShell * initialShell, // Исходная оболочка,
const MbeCopyMode sameShell, // флаг способа использования исходной оболочки,
const MbFace & targetFace, // грань штамповки,
const RPArray<MbCreator> & creatorsTool, // журнал построения инструмента,
MbFaceShell & toolShell, // оболочка тела-инструмента,
const MbeCopyMode sameShellTool, // флаг способа использования оболочки инструмента,
bool isPunch, // является инструмент пуансоном или матрицей,
const RPArray<MbFace> & pierceFaces, // вскрываемые для вырубки грани инструмента,
const MbToolStampingValues & params, // параметры штамповки,
const MbSNameMaker & nameMaker, // именователь,
MbResultType & res, // флаг успешности операции,
SPtr<MbFaceShell> & resultShell ); // результирующая оболочка
//------------------------------------------------------------------------------
/** \brief \ru Построить оболочку из листового материала штамповкой телом-инструментом.
\en Construct a shell form sheet material by tool body stamping. \~
@@ -181,75 +128,4 @@ MATH_FUNC( c3d::CreatorSPtr ) CreateUserStamp( c3d::ShellSPtr & i
c3d::ShellSPtr & resultShell ); // результирующая оболочка
//------------------------------------------------------------------------------
/** \brief \ru Построение результирующей оболочки.
\en Construction of result shell. \~
\details \ru На базе исходной оболочки из листового материала построить оболочку методом закрытой или открытой штамповки. \n
Одновременно с построением оболочки функция создаёт её строитель.\n
\en A shell is to be constructed on the basis of the source shell by the method of closed or open stamping. \n
The function simultaneously creates the shell and its constructor.\n \~
\param[in] initialShell - \ru Исходная оболочка.
\en The source shell. \~
\param[in] sameShell - \ru Режим копирования исходной оболочки.
\en Mode of copying the source shell. \~
\param[in] targetFace - \ru Грань штамповки.
\en The face for stamping. \~
\param[in] toolShell - \ru Оболочка тела-инструмента.
\en A shell of tool solid. \~
\param[in] sameShellTool - \ru Режим копирования оболочки тела-инструмента.
\en Mode of copying the tool shell. \~
\param[in] isPunch - \ru Является тело-инструмент пуансоном или матрицей.
\en Is tool body a punch or a die. \~
\param[in] pierceFaces - \ru Вскрываемые для вырубки грани инструмента,
\en Pierce faces of tool body. \~
\param[in] params - \ru Параметры штамповки.
\en The parameters of stamping. \~
\param[in] nameMaker - \ru Именователь.
\en An object for naming the new objects. \~
\result \ru - тело со штамповкой.
\en - The solid with stamping. \~
\ingroup Model_Creators
*/
// ---
DEPRECATE_DECLARE_REPLACE( StampWithToolSolid with 'MbStampWithToolPartsParams' argument )
MbFaceShell * MakeUserStampShellForStampParts ( MbFaceShell * initialShell, // Исходная оболочка,
const MbeCopyMode sameShell, // флаг способа использования исходной оболочки,
const MbFace & targetFace, // грань штамповки,
MbFaceShell & toolShell, // оболочка тела-инструмента,
const MbeCopyMode sameShellTool, // флаг способа использования оболочки инструмента,
bool isPunch, // является инструмент пуансоном или матрицей,
const RPArray<MbFace> & pierceFaces, // вскрываемые для вырубки грани инструмента,
const MbToolStampingValues & params, // параметры штамповки,
const MbSNameMaker & nameMaker ); // именователь,
//------------------------------------------------------------------------------
/** \brief \ru Построение результирующей оболочки.
\en Construction of result shell. \~
\details \ru На базе исходной оболочки из листового материала построить оболочку методом закрытой или открытой штамповки. \n
Одновременно с построением оболочки функция создаёт её строитель.\n
\en A shell is to be constructed on the basis of the source shell by the method of closed or open stamping. \n
The function simultaneously creates the shell and its constructor.\n \~
\param[in] initialShell - \ru Исходная оболочка.
\en The source shell. \~
\param[in] sameShell - \ru Режим копирования исходной оболочки.
\en Mode of copying the source shell. \~
\param[in] toolShell - \ru Оболочка тела-инструмента.
\en A shell of tool solid. \~
\param[in] sameShellTool - \ru Режим копирования оболочки тела-инструмента.
\en Mode of copying the tool shell. \~
\param[in] params - \ru Параметры штамповки.
\en The parameters of stamping. \~
\result \ru - тело со штамповкой.
\en - The solid with stamping. \~
\ingroup Model_Creators
*/
// ---
MbFaceShell * MakeUserStampShellForStampParts ( c3d::ShellSPtr & initialShell,
const MbeCopyMode sameShell,
MbFaceShell & toolShell,
const MbeCopyMode sameShellTool,
const MbStampWithToolPartsParams & params );
#endif // __CR_STAMP_USER_SOLID_H

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