diff --git a/C3d/Include/action.h b/C3d/Include/action.h index 3efbb30..6d499c1 100644 --- a/C3d/Include/action.h +++ b/C3d/Include/action.h @@ -77,7 +77,7 @@ MATH_FUNC (bool) IsMultiShell( const MbFaceShell * shell, bool checkNesting = tr \ingroup Algorithms_3D */ // --- -MATH_FUNC (size_t) DetachShells( MbFaceShell & shell, RPArray & parts, bool sort, c3d::IndicesVector * partIndices = c3d_null ); +MATH_FUNC (size_t) DetachShells( MbFaceShell & shell, RPArray & parts, bool sort, c3d::IndicesVector * partIndices = C3D_NULL_PTR ); //------------------------------------------------------------------------------ @@ -102,7 +102,7 @@ MATH_FUNC (size_t) DetachShells( MbFaceShell & shell, RPArray & par \ingroup Algorithms_3D */ // --- -MATH_FUNC (size_t) DetachShells( MbFaceShell & shell, c3d::ShellsVector & parts, bool sort, c3d::IndicesVector * partIndices = c3d_null ); +MATH_FUNC (size_t) DetachShells( MbFaceShell & shell, c3d::ShellsVector & parts, bool sort, c3d::IndicesVector * partIndices = C3D_NULL_PTR ); //------------------------------------------------------------------------------ @@ -127,7 +127,7 @@ MATH_FUNC (size_t) DetachShells( MbFaceShell & shell, c3d::ShellsVector & parts, \ingroup Algorithms_3D */ // --- -MATH_FUNC (size_t) DetachShells( MbFaceShell & shell, c3d::ShellsSPtrVector & parts, bool sort, c3d::IndicesVector * partIndices = c3d_null ); +MATH_FUNC (size_t) DetachShells( MbFaceShell & shell, c3d::ShellsSPtrVector & parts, bool sort, c3d::IndicesVector * partIndices = C3D_NULL_PTR ); //------------------------------------------------------------------------------ @@ -151,15 +151,15 @@ MATH_FUNC (size_t) DetachShells( MbFaceShell & shell, c3d::ShellsSPtrVector & pa template size_t CreateShells( const MbFaceShell & shell, ShellsVector & parts, bool sort = true ) { - c3d::ShellSPtr outer( new MbFaceShell( shell ) ); // new shell on the same faces (новая оболочка с теми же гранями) - - c3d::IndicesVector * partIndices = c3d_null; - - if ( ::DetachShells( *outer, parts, sort, partIndices ) > 0 ) { - parts.push_back( outer ); - ::DetachItem( outer ); - } - + c3d::ShellSPtr outer( new MbFaceShell( shell ) ); // new shell on the same faces (новая оболочка с теми же гранями) + + c3d::IndicesVector * partIndices = C3D_NULL_PTR; + + if ( ::DetachShells( *outer, parts, sort, partIndices ) > 0 ) { + parts.push_back( outer ); + ::DetachItem( outer ); + } + return parts.size(); } @@ -251,6 +251,21 @@ MATH_FUNC (bool) UnifyOwnComplanarFaces( MbFaceShell & shell, bool checkBaseSurfaces ); +//------------------------------------------------------------------------------ +/** \brief \ru Найти и устранить общие поверхности-подложки в гранях. + \en Find and eliminate common underlying surfaces of faces \~ + \details \ru Найти и устранить общие поверхности-подложки в гранях оболочки. \n + \en Find and eliminate common underlying surfaces of a shell faces. \n \~ + \param[in] shell - \ru Модифицируемая оболочка. + \en A shell to be modified. \~ + \return \ru Возвращает true, если оболочка была изменена. + \en Returns 'true' if the shell has been modified. \~ + \ingroup Algorithms_3D +*/ +// --- +MATH_FUNC (bool) CheckIdenticalBaseSufaces( MbFaceShell & shell ); + + //------------------------------------------------------------------------------ /** \brief \ru Захватить грани одним из способов. \en Capture the faces in one of proposed methods. \~ @@ -1239,9 +1254,9 @@ MATH_FUNC (bool) FindTouchedFaces( const MbSolid & solid1, \en To find contacted faces of bodies. \~ \details \ru Разбить контактирующие грани тел, выделив общие области с конечной площадью перекрытия в отдельные грани. \~ \en To find contacted faces of bodies and build a finite overlap contacted area as faces. \~ - \param[in,out] solid1 - \ru Первое тело. + \param[in/out] solid1 - \ru Первое тело. \en The first solid. \~ - \param[in,out] solid2 - \ru Второе тело. + \param[in/out] solid2 - \ru Второе тело. \en The second solid. \~ \param[in] precision - \ru Точность операции. \en The precision of operation. \~ @@ -1329,13 +1344,13 @@ c3d::SolidSPtr GetTransformedSolid( c3d::SolidSPtr & solid, MbeCopyMode & copyMo { c3d::SolidSPtr resSolid( solid ); - if ( (resSolid != c3d_null) && !matr.IsSingle() ) { + if ( (resSolid != NULL) && !matr.IsSingle() ) { MbSNameMaker n( transformedMainName, MbSNameMaker::i_SideNone, 0 ); - MbSolid * resSolidPtr = c3d_null; + MbSolid * resSolidPtr = NULL; TransformValues tv( matr ); ::TransformedSolid( *solid, cm_Copy, tv, n, resSolidPtr ); - if ( resSolidPtr != c3d_null ) { + if ( resSolidPtr != NULL ) { resSolid = resSolidPtr; copyMode = cm_Same; } @@ -1359,10 +1374,10 @@ c3d::SolidSPtr GetTransformedSolid( c3d::SolidSPtr & solid, MbeCopyMode & copyMo */ // --- template -SPtr GetTransformedItem( SPtr & item, const MbMatrix3D & matr, MbRegDuplicate * iDupReg = c3d_null, MbRegTransform * iTransReg = c3d_null ) +SPtr GetTransformedItem( SPtr & item, const MbMatrix3D & matr, MbRegDuplicate * iDupReg = NULL, MbRegTransform * iTransReg = NULL ) { SPtr resItem( item ); - if ( (resItem != c3d_null) && !matr.IsSingle() ) { + if ( (resItem != NULL) && !matr.IsSingle() ) { resItem = static_cast( &item->Duplicate( iDupReg ) ); resItem->Transform( matr, iTransReg ); } diff --git a/C3d/Include/action_analysis.h b/C3d/Include/action_analysis.h index 856c287..068ba44 100644 --- a/C3d/Include/action_analysis.h +++ b/C3d/Include/action_analysis.h @@ -59,7 +59,7 @@ typedef void( *SurfaceFunction )( const MbSurface & surf, // Поверхно MATH_FUNC( void ) MinSurfaceCurvature( const MbSurface & surf, const MbCartPoint & pnt, double & func, - MbVector * der = c3d_null ); + MbVector * der = NULL ); //------------------------------------------------------------------------------ @@ -80,7 +80,7 @@ MATH_FUNC( void ) MinSurfaceCurvature( const MbSurface & surf, MATH_FUNC( void ) MaxSurfaceCurvature( const MbSurface & surf, const MbCartPoint & pnt, double & func, - MbVector * der = c3d_null ); + MbVector * der = NULL ); //------------------------------------------------------------------------------ @@ -101,7 +101,7 @@ MATH_FUNC( void ) MaxSurfaceCurvature( const MbSurface & surf, MATH_FUNC( void ) GaussCurvature( const MbSurface & surf, const MbCartPoint & pnt, double & func, - MbVector * der = c3d_null ); + MbVector * der = NULL ); //------------------------------------------------------------------------------ @@ -122,7 +122,7 @@ MATH_FUNC( void ) GaussCurvature( const MbSurface & surf, MATH_FUNC( void ) MeanCurvature( const MbSurface & surf, const MbCartPoint & pnt, double & func, - MbVector * der = c3d_null ); + MbVector * der = NULL ); //------------------------------------------------------------------------------ @@ -143,7 +143,7 @@ MATH_FUNC( void ) MeanCurvature( const MbSurface & surf, MATH_FUNC( void ) UNormalCurvature( const MbSurface & surf, const MbCartPoint & pnt, double & func, - MbVector * der = c3d_null ); + MbVector * der = NULL ); //------------------------------------------------------------------------------ @@ -164,7 +164,7 @@ MATH_FUNC( void ) UNormalCurvature( const MbSurface & surf, MATH_FUNC( void ) VNormalCurvature( const MbSurface & surf, const MbCartPoint & pnt, double & func, - MbVector * der = c3d_null ); + MbVector * der = NULL ); //------------------------------------------------------------------------------ @@ -172,8 +172,8 @@ MATH_FUNC( void ) VNormalCurvature( const MbSurface & surf, \en Find the points of the surface at which the selected curvature takes the largest in modulus values. \~ \details \ru Ищутся точки, в которых выбранная кривизна принимает на поверхности наибольшее положительное и наименьшее отрицательное значение. \en Looks for points at which the selected curvature takes on the surface the greatest positive and least negative value. \~ - \param[in] surface - \ru Исследуемая поверхность. - \en Test surface. \~ + \param[in] surf - \ru Исследуемая поверхность. + \en Test surface. \~ \param[in] func - \ru Функция расчета кривизны в точке. \en The function of calculating the curvature at a point. \~ \param[out] maxNegCurv - \ru Наибольшее по модулю отрицательное значение кривизны (0, если нет такого). @@ -241,8 +241,8 @@ MATH_FUNC( void ) FacesMinMaxCurvature( const RPArray & faces, \en Find the points on the surface at which the major normal curvatures take the largest values in the module. \~ \details \ru Ищутся точки на поверхности, в которых главные нормальные кривизны принимают наибольшее положительное и наименьшее отрицательное значение. \en Looks for points on the surface at which the major normal curvatures take the largest positive and smallest negative values. \~ - \param[in] surface - \ru Исследуемая поверхность. - \en Test surface. \~ + \param[in] surf - \ru Исследуемая поверхность. + \en Test surface. \~ \param[out] maxNegCurv - \ru Наибольшее по модулю отрицательное значение кривизны (0, если нет такого). \en The largest in modulus value negative curvature (0, if there is no such). \~ \param[out] maxNegLoc - \ru Точка, в которой кривизна принимает наибольшее по модулю отрицательное значение. @@ -321,7 +321,7 @@ MATH_FUNC( void ) FacesMinMaxCurvature( const RPArray & faces, */ MATH_FUNC( double ) CurveOrientedCurvature( const MbCurve3D & curve, double & param, - const MbVector3D * planeNorm = c3d_null ); + const MbVector3D * planeNorm = NULL ); //------------------------------------------------------------------------------ @@ -358,10 +358,10 @@ MATH_FUNC( void ) CurveMinMaxCurvature( const MbCurve3D & curve, double & maxParam, double & minCurv, double & minParam, - c3d::DoubleVector * bendPoints = c3d_null, - c3d::DoubleVector * maxPoints = c3d_null, - c3d::DoubleVector * minPoints = c3d_null, - c3d::DoublePairsVector * rapPoints = c3d_null ); + c3d::DoubleVector * bendPoints = NULL, + c3d::DoubleVector * maxPoints = NULL, + c3d::DoubleVector * minPoints = NULL, + c3d::DoublePairsVector * rapPoints = NULL ); //------------------------------------------------------------------------------ diff --git a/C3d/Include/action_b_shaper.h b/C3d/Include/action_b_shaper.h index 98bb480..42be300 100644 --- a/C3d/Include/action_b_shaper.h +++ b/C3d/Include/action_b_shaper.h @@ -341,8 +341,8 @@ public: To fit surface use corresponding methods SegmentMesh or FitSurfaceToSegment. \n \~ \param[in] idxSegment - \ru Индекс сегмента полигональной сетки. \en Index of a mesh segment. \~ - \return \ru Возвращает указатель на поверхность для сегмента, если поверхность определена, иначе - c3d_null. - \en Returns pointer to segment surface if it exists, else - c3d_null. \~ + \return \ru Возвращает указатель на поверхность для сегмента, если поверхность определена, иначе - NULL. + \en Returns pointer to segment surface if it exists, else - NULL. \~ \ingroup Polygonal_Objects */ virtual const MbSurface * GetSegmentSurface( size_t idxSegment ) const = 0; diff --git a/C3d/Include/action_curve.h b/C3d/Include/action_curve.h index 098f93b..2e86ae0 100644 --- a/C3d/Include/action_curve.h +++ b/C3d/Include/action_curve.h @@ -430,7 +430,7 @@ MATH_FUNC (MbCurve *) DuplicateCurve( const MbCurve & curve ); // --- MATH_FUNC (MbContour *) DuplicateContour( const MbContour & cntr, bool modifySegments, - MbSNameMaker * names = c3d_null ); + MbSNameMaker * names = NULL ); //------------------------------------------------------------------------------ @@ -694,12 +694,12 @@ MATH_FUNC (MbResultType) SurfaceBoundContour( const MbSurface & surface, or for contour pt_Contour if its first segment is of one of the listed types. \~ \param[in] segment - \ru Изменяемая кривая. \en The modified curve. \~ - \param[in] p - \ru Новая начальная точка. - \en A new start point. \~ + \param[in] p1 - \ru Новая начальная точка. + \en A new start point. \~ \ingroup Algorithms_2D */ // --- -MATH_FUNC (bool) ChangeFirstPoint( MbCurve * segment, const MbCartPoint & p ); +MATH_FUNC (bool) ChangeFirstPoint( MbCurve * segment, const MbCartPoint & p1 ); //------------------------------------------------------------------------------ @@ -717,25 +717,23 @@ MATH_FUNC (bool) ChangeFirstPoint( MbCurve * segment, const MbCartPoint & p ); or for contour pt_Contour if its last segment is of one of the listed types. \~ \param[in] segment - \ru Изменяемая кривая. \en The modified curve. \~ - \param[in] p - \ru Новая начальная точка. - \en A new start point. \~ + \param[in] p1 - \ru Новая начальная точка. + \en A new start point. \~ \ingroup Algorithms_2D */ // --- -MATH_FUNC (bool) ChangeLastPoint( MbCurve * segment, const MbCartPoint & p ); +MATH_FUNC (bool) ChangeLastPoint( MbCurve * segment, const MbCartPoint & p2 ); //------------------------------------------------------------------------------ /** \brief \ru Является ли кривая прямолинейной независимо от ее параметризации. - \en Whether the curve is like straight-line regardless of its parameterization. \~ + \en Whether the curve is like straight-line regardless of its parameterisation. \~ \details \ru Является ли кривая прямолинейной независимо от ее параметризации.\n - \en Whether the curve is like straight-line regardless of its parameterization. \~ + \en Whether the curve is like straight-line regardless of its parameterisation. \~ \param[in] curve - \ru Кривая. \en Curve. \~ \param[in] eps - \ru Точность. \en Accuracy. \~ - \return \ru Возвращает true, если кривая геометрически прямолинейна. - \en Returns true, if a curve is geometrically straight. \~ \ingroup Curve_Modeling */ // --- @@ -760,7 +758,7 @@ MATH_FUNC (bool) IsLikeStraightLine( const MbCurve & curve, double eps ); // --- MATH_FUNC( MbContour * ) DeleteDegenerateSegments( const MbContour & cntr, bool modifySegments, - MbSNameMaker * names = c3d_null ); + MbSNameMaker * names = NULL ); #endif // __ACTION_CURVE_H diff --git a/C3d/Include/action_curve3d.h b/C3d/Include/action_curve3d.h index f29adff..fb759d4 100644 --- a/C3d/Include/action_curve3d.h +++ b/C3d/Include/action_curve3d.h @@ -279,11 +279,11 @@ MATH_FUNC (MbResultType) SpiralCurve( const MbPlacement3D & place, \details \ru Создать спираль. \n Если spiralAxis == true, то lawCurve - определяет плоскую ось спирали. \n Если spiralAxis == false, то lawCurve - определяет закон изменения радиуса спирали. \n - Если lawCurve == c3d_null, то строится коническая спираль с углом конусности angle. \n + Если lawCurve == NULL, то строится коническая спираль с углом конусности angle. \n \en Create a spiral. \n If 'spiralAxis' == true, 'lawCurve' determines the axis of a spiral. \n If spiralAxis == false, then 'lawCurve' - determines a radius law. \n - If lawCurve == c3d_null, a conical spiral is created with the specified taper angle. \n \~ + If lawCurve == NULL, a conical spiral is created with the specified taper angle. \n \~ \param[in] point0 - \ru Начало локальной системы координат (ЛСК). \en The origin of local coordinate system (LCS). \~ \param[in] point1 - \ru Точка на оси Z ЛСК. @@ -640,7 +640,7 @@ MATH_FUNC (MbResultType) CreatePolyArcCurve3D( const MbCurve3D & curve, MATH_FUNC (bool) GetSpaceCurve( const MbItem & item, bool keepPlacement, SPtr & curve0, - std::vector< SPtr > * curves = c3d_null ); + std::vector< SPtr > * curves = NULL ); //------------------------------------------------------------------------------- @@ -662,9 +662,9 @@ MATH_FUNC (bool) GetSpaceCurve( const MbItem & item, \param[in] deviationAngle - \ru Параметру точности. \en The parameter of accuracy. \~ \return \ru Возвращает указатель на построенную кривую с нулевум счетчиком ссылок \n - или c3d_null, если не удалось построить развертку для заданных параметров. + или NULL, если не удалось построить развертку для заданных параметров. \en The pointer to the constructed curve with zero counter of references\n - return c3d_null, if unwrap curve can't be construvted for this parameters + return NULL, if unwrap curve can't be construvted for this parameters \ingroup Curve3D_Modeling */ // --- @@ -719,8 +719,6 @@ MATH_FUNC (MbResultType) EvolutionSection( const MbSweptData & generCurves, \en Curve. \~ \param[in] eps - \ru Точность. \en Accuracy. \~ - \return \ru Возвращает true, если кривая геометрически прямолинейна. - \en Returns true, if a curve is geometrically straight. \~ \ingroup Curve3D_Modeling */ // --- @@ -1258,14 +1256,11 @@ MATH_FUNC( MbResultType ) AddKnotNurbs( MbNurbs3D * curve, \en Insert a knot into the onesegmented NURBS curve.\n The output parameter of the method is a NURBS curve of first segment. \~ - \param[in] curve - \ru NURBS кривая в произвольном формате. - \en NURBS curve in any format. \~ - \param[in] data - \ru Данные построения кривой. - \en The curve construction data. \~ - \param[out] resCurve - \ru NURBS Кривая. - \en NURBS curve. \~ - \return \ru Возвращает значение результата операции. - \en Returns operation result value. + \param[in] curve - \ru NURBS кривая в произвольном формате. \en NURBS curve in any format. \~ + \param[in] data - \ru Данные построения кривой. \en The curve construction data. \~ + \param[out] result - \ru NURBS Кривая. \en NURBS curve. \~ + \return \ru Возвращает значение результата операции. \en Returns operation result value. + \ingroup Curve3D_Modeling */ MATH_FUNC( MbResultType ) ExtractExtrapolFromSegment( MbNurbs3D * curve, @@ -1315,7 +1310,7 @@ MATH_FUNC(MbResultType) ConicNurbs( MbNurbs3D * curve, \en The curve length evaluation. \~ \param[in] accuracy - \ru Относительная точность рассчёта длины кривой. \en Relative accuracy calculate the length of a curve. \~ - \param[in,out] maxCurvatre - \ru Максимально допустимая кривизна кривой. + \param[in/out] maxCurvatre - \ru Максимально допустимая кривизна кривой. \en The maximum curvature of the resulting curve. \~ \param[out] result - \ru Построенная кривая. \en The resulting curve. \~ diff --git a/C3d/Include/action_mesh.h b/C3d/Include/action_mesh.h index f35afad..9f75df8 100644 --- a/C3d/Include/action_mesh.h +++ b/C3d/Include/action_mesh.h @@ -61,8 +61,8 @@ MATH_FUNC (void) CalculatePolygon( const MbCurve & curve, локальной системы координат. \en Create a polygonal object for two-dimensional object in the XOY-plane of the local coordinate system. \~ - \param[in] obj - \ru Двумерный объект (если c3d_null, то объект не создаётся). - \en Two-dimensional object (if c3d_null, object isn't created). \~ + \param[in] obj - \ru Двумерный объект (если NULL, то объект не создаётся). + \en Two-dimensional object (if NULL, object isn't created). \~ \param[in] plane - \ru Локальная система координат. \en A local coordinate system. \~ \param[in] sag - \ru Максимальное отклонение полигонального объекта от оригинала по прогибу. diff --git a/C3d/Include/action_phantom.h b/C3d/Include/action_phantom.h index b5cc68b..c26309b 100644 --- a/C3d/Include/action_phantom.h +++ b/C3d/Include/action_phantom.h @@ -184,7 +184,7 @@ MATH_FUNC (MbResultType) OffsetPhantom( const MbSolid & solid, const SweptValues & params, const MbSNameMaker & operNames, MbFaceShell *& result, - size_t * hpShellFaceInd = c3d_null ); // \ru Номер грани в исходной оболочки для построения хот-точки); \en The face number in the initial shell for a hot-point creation); + size_t * hpShellFaceInd = NULL ); // \ru Номер грани в исходной оболочки для построения хот-точки); \en The face number in the initial shell for a hot-point creation); //------------------------------------------------------------------------------ @@ -261,7 +261,7 @@ MATH_FUNC (MbResultType) SmoothPositionData( const MbSolid & sol const SmoothValues & params, RPArray & result, double edgeParam = 0.5, - const MbCurveEdge * dimensionEdge = c3d_null ); + const MbCurveEdge * dimensionEdge = NULL ); //------------------------------------------------------------------------------ @@ -293,7 +293,7 @@ MATH_FUNC (MbResultType) SmoothPositionData( const MbSolid & sol const SmoothValues & params, RPArray & result, double edgeParam = 0.5, - const MbCurveEdge * dimensionEdge = c3d_null ); + const MbCurveEdge * dimensionEdge = NULL ); //------------------------------------------------------------------------------ @@ -303,18 +303,15 @@ MATH_FUNC (MbResultType) SmoothPositionData( const MbSolid & sol \en A function creation for behavior of selected curve coordinate with curve parameter. \n \param[in] curve - \ru Кривая. \en The curve. \~ - \param[in] place - \ru Локальная система координат, в которой используется кривая. - \en The local coordinate system that uses the curve. \~ - \param[in] coordinate - \ru Номер (0,1,2) координаты кривой в локальной системе координат для построения функции. - \en The number (0,1,2) of the curve coordinate in the local coordinate system for constructing the function. \~ + \param[in] coordinate - \ru Номер координаты пространства. + \en The number of curve coordinate. \~ \return \ru Возвращает построенную функцию. \en Returns the created function. \~ \ingroup Algorithms_3D */ // --- MATH_FUNC (MbFunction *) CreateFunction( const MbCurve3D & curve, - const MbPlacement3D & place, - size_t coordinate ); + size_t coordinate ); #endif // __ACTION_PHANTOM_H diff --git a/C3d/Include/action_point.h b/C3d/Include/action_point.h index 70ce11b..43c3a97 100644 --- a/C3d/Include/action_point.h +++ b/C3d/Include/action_point.h @@ -39,8 +39,8 @@ class MATH_CLASS MbFaceShell; \en Number of elements in the array. \~ \param[out] res - \ru Результат операции. \en The operation result. \~ - \return \ru Возвращает массив элементов, если он создан, или c3d_null в противном случае. - \en Returns an array of elements if it has been created, otherwise returns c3d_null. \~ + \return \ru Возвращает массив элементов, если он создан, или NULL в противном случае. + \en Returns an array of elements if it has been created, otherwise returns NULL. \~ \ingroup Algorithms_3D */ // --- @@ -48,11 +48,11 @@ template inline SArray * CreateArray( size_t cnt, MbResultType & res ) { SArray * arr = new SArray ( cnt, 1 ); - if ( arr != c3d_null && arr->GetAddr() == c3d_null ) { + if ( arr != NULL && arr->GetAddr() == NULL ) { delete arr; - arr = c3d_null; + arr = NULL; } - if ( arr == c3d_null ) + if ( arr == NULL ) res = rt_TooManyPoints; return arr; @@ -79,7 +79,7 @@ template inline bool ReserveArray( SArray & arr, size_t n, MbResultType & res ) { arr.Reserve( n ); - if ( arr.GetAddr() == c3d_null ) { + if ( arr.GetAddr() == NULL ) { res = rt_TooManyPoints; return false; } @@ -107,7 +107,7 @@ template inline bool AddItem( SArray & arr, const Type & item, MbResultType & res ) { arr.Add( item ); - if ( arr.GetAddr() == c3d_null ) { + if ( arr.GetAddr() == NULL ) { res = rt_TooManyPoints; return false; } diff --git a/C3d/Include/action_sheet.h b/C3d/Include/action_sheet.h index 2fe5ea3..92f3f33 100644 --- a/C3d/Include/action_sheet.h +++ b/C3d/Include/action_sheet.h @@ -613,7 +613,7 @@ MATH_FUNC (MbResultType) UnbendSheetSolid( MbSolid & sol const MbCartPoint & fixedPoint, const MbSNameMaker & nameMaker, MbSolid *& result, - RPArray * ribContours = c3d_null ); + RPArray * ribContours = NULL ); //------------------------------------------------------------------------------ @@ -958,51 +958,6 @@ MATH_FUNC (MbResultType) CreateStampParts( const MbPlacement3D & placement, MbSolid *& partToSubtract ); -//------------------------------------------------------------------------------ -/** \brief \ru Создание составляющих частей штамповки одного тела другим телом. - \en Stamping with a tool solid (punch or die). \~ - \details \ru Штамповка строится на основе произвольного тела-инструмента и заданной плоской листовой грани. - Штамповка подрезается границами листовой грани, которую пересекает тело.\n - \en The stamping is created based on a tool body and a flat sheet face. - The stamping is trimmed by the boundary of the sheet face which contains the sketch.\n \~ - \param[in] solid - \ru Исходное листовое тело. - \en The source sheet solid. \~ - \param[in] sameShell - \ru Флаг удаления оболочки исходного тела. - \en Whether to delete the shell of the source solid. \~ - \param[in] targetFace - \ru Грань штамповки. - \en The face for stamping. \~ - \param[in] toolSolid - \ru Оболочка тела-инструмента. - \en A shell of tool solid. \~ - \param[in] sameShellTool - \ru Флаг удаления оболочки тела-инструмента. - \en Whether to delete the shell of the tool solid. \~ - \param[in] punch - \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] partToAdd - \ru Добавляемая часть штамповки. - \en Added part of the stamp. \~ - \param[out] partToSubtract - \ru Вычитаемая часть штамповки. - \en Deductible part of the stamp. \~ - \ingroup Sheet_Metal_Modeling -*/ -// --- -MATH_FUNC(MbResultType) CreateStampWithToolSolidParts( MbSolid & solid, - MbeCopyMode sameShell, - const MbFace & targetFace, - MbSolid & toolSolid, - MbeCopyMode sameShellTool, - bool punch, - const RPArray& pierceFaces, - const MbToolStampingValues & params, - const MbSNameMaker & nameMaker, - MbSolid *& partToAdd, - MbSolid *& partToSubtract ); - - //------------------------------------------------------------------------------ /** \brief \ru Штамповка. \en Stamping. \~ @@ -1221,7 +1176,6 @@ MATH_FUNC (MbResultType) CreateBeadParts( const MbFace * face, //------------------------------------------------------------------------------ // устаревшая // --- -DEPRECATE_DECLARE MATH_FUNC (MbResultType) CreateBeadParts( const MbPlacement3D & placement, const RPArray & contours, const SArray & centers, @@ -1276,7 +1230,6 @@ MATH_FUNC (MbResultType) CreateBead( MbSolid & solid, // устаревшая -DEPRECATE_DECLARE MATH_FUNC (MbResultType) CreateBead( MbSolid & solid, MbeCopyMode sameShell, const MbFace & face, @@ -1328,7 +1281,6 @@ MATH_FUNC (MbResultType) CreateJalousieParts( const MbFace * fac //------------------------------------------------------------------------------ // устаревшая // --- -DEPRECATE_DECLARE MATH_FUNC (MbResultType) CreateJalousieParts( const MbPlacement3D & placement, const RPArray & segments, const MbJalousieValues & params, @@ -2417,7 +2369,7 @@ MATH_FUNC (MbResultType) RemoveOperationResult( MbSolid & solid, \en The initial face for sheet metall solid building. \~ \param[in] sense - \ru Направление придания толщины относительно нормали исходной грани. \en Direction of sheet metal building relative to initial face normal. \~ - \param[in,out] parameters - \ru Параметры операции. + \param[in/out] parameters - \ru Параметры операции. \en Operation parameters. \~ \param[in] nameMaker - \ru Именователь. \en An object for naming the new objects. \~ diff --git a/C3d/Include/action_shell.h b/C3d/Include/action_shell.h index 524385f..9c6487a 100644 --- a/C3d/Include/action_shell.h +++ b/C3d/Include/action_shell.h @@ -263,17 +263,17 @@ MATH_FUNC (MbResultType) MeshShell( MeshSurfaceValues & pars, \ingroup Shell_Modeling */ // --- -MATH_FUNC (MbResultType) TruncateShell( MbSolid & initSolid, - SArray & selIndices, +MATH_FUNC (MbResultType) TruncateShell( MbSolid & initSolid, + SArray & selIndices, MbeCopyMode initCopyMode, - const MbSNameMaker & operNames, + const MbSNameMaker & operNames, RPArray & truncatingItems, - SArray & truncatingOrients, + SArray & truncatingOrients, bool truncatingSplitMode, MbeCopyMode truncatingCopyMode, - const MbMergingFlags & mergeFlags, - MbSolid *& result, - MbPlacement3D *& resultPlace ); + const MbMergingFlags & mergeFlags, + MbSolid *& result, + MbPlacement3D *& resultPlace ); //------------------------------------------------------------------------------ @@ -652,11 +652,11 @@ MATH_FUNC (MbResultType) SurfaceShell( const MbSurface & surface, /** \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. \~ + \en Create solids as a result of cutting a solids by its silhouette contour.\n\~ + \param[in] shell - \ru Исходное тело. + \en The solid\~ \param[in] sameShell - \ru Способ передачи данных при копировании оболочек. - \en Methods of transferring data while copying shells. \~ + \en Methods of transferring data while copying shells \~ \param[in] eye - \ru Направление взгляда. \en Eye's direction. \~ \param[in] operNames - \ru Именователь с версией. @@ -859,9 +859,9 @@ MATH_FUNC (MbResultType) RectifyFace( const MbFace & face, \ingroup Shell_Modeling */ // --- -MATH_FUNC (MbResultType) OctaLattice( const MbCartPoint3D & point0, - const MbCartPoint3D & point1, - const MbCartPoint3D & point2, +MATH_FUNC (MbResultType) OctaLattice( const MbCartPoint3D & point_0, + const MbCartPoint3D & point_1, + const MbCartPoint3D & point_2, double xRadius, double yRadius, double zRadius, diff --git a/C3d/Include/action_solid.h b/C3d/Include/action_solid.h index 99e2a4a..cf77770 100644 --- a/C3d/Include/action_solid.h +++ b/C3d/Include/action_solid.h @@ -180,7 +180,7 @@ MATH_FUNC (MbResultType) MeshSolid( const MbMesh & mesh, const GridsToShellValues & params, const MbSNameMaker & names, MbSolid *& result, - IProgressIndicator * prog = c3d_null ); + IProgressIndicator * prog = NULL ); //------------------------------------------------------------------------------ @@ -202,7 +202,7 @@ MATH_FUNC (MbResultType) MeshSolid( const MbMesh & mesh, MATH_FUNC (MbResultType) GridSolid( const MbGrid & grid, const MbSNameMaker & names, MbSolid *& result, - IProgressIndicator * prog = c3d_null ); + IProgressIndicator * prog = NULL ); //------------------------------------------------------------------------------ @@ -224,7 +224,7 @@ MATH_FUNC (MbResultType) GridSolid( const MbGrid & grid, MATH_FUNC (MbResultType) CollectionSolid( const MbCollection & grid, const MbSNameMaker & names, MbSolid *& result, - IProgressIndicator * progBar = c3d_null ); + IProgressIndicator * progBar = NULL ); //------------------------------------------------------------------------------ @@ -611,8 +611,8 @@ MATH_FUNC (MbResultType) EvolutionSolid( const MbSweptData & sweptData \en An array of generating contours coordinate systems. \~ \param[in] c - \ru Множество образующих контуров. \en An array of generating contours. \~ - \param[in] spine - \ru Направляющая кривая (может быть c3d_null). - \en A guide curve (can be c3d_null). \~ + \param[in] spine - \ru Направляющая кривая (может быть NULL). + \en A guide curve (can be NULL). \~ \param[in] params - \ru Параметры операции. \en The operation parameters. \~ \param[in] ps - \ru Множество точек на образующих контурах, задающий их начальные точки. @@ -647,8 +647,8 @@ MATH_FUNC (MbResultType) LoftedSolid( SArray & pl, \en An array of generating contours coordinate systems. \~ \param[in] c - \ru Множество образующих контуров. \en An array of generating contours. \~ - \param[in] spine - \ru Осевая кривая (может быть c3d_null). - \en A guide curve (can be c3d_null). \~ + \param[in] spine - \ru Осевая кривая (может быть NULL). + \en A guide curve (can be NULL). \~ \param[in] params - \ru Параметры операции. \en The operation parameters. \~ \param[in] guideCurves - \ru Множество направляющих кривых, задающих траектории соответствующих точек контуров. @@ -668,7 +668,7 @@ MATH_FUNC (MbResultType) LoftedSolid( SArray & pl, // --- MATH_FUNC (MbResultType) LoftedSolid( SArray & pl, RPArray & c, - const MbCurve3D * spine, // осевая линия может быть c3d_null + const MbCurve3D * spine, // осевая линия может быть NULL const LoftedValues & params, RPArray * guideCurves, SArray * ps, @@ -686,8 +686,8 @@ MATH_FUNC (MbResultType) LoftedSolid( SArray & pl, \en An array of surfaces of generating contours. \~ \param[in] c - \ru Множество образующих контуров. \en An array of generating contours. \~ - \param[in] spine - \ru Осевая кривая (может быть c3d_null). - \en A guide curve (can be c3d_null). \~ + \param[in] spine - \ru Осевая кривая (может быть NULL). + \en A guide curve (can be NULL). \~ \param[in] params - \ru Параметры операции. \en The operation parameters. \~ \param[in] guideCurves - \ru Множество направляющих кривых, задающих траектории соответствующих точек контуров. @@ -707,7 +707,7 @@ MATH_FUNC (MbResultType) LoftedSolid( SArray & pl, // --- MATH_FUNC (MbResultType) LoftedSolid( RPArray & surfs, RPArray & c, - const MbCurve3D * spine, // осевая линия может быть c3d_null + const MbCurve3D * spine, // осевая линия может быть NULL const LoftedValues & params, RPArray * guideCurves, SArray * ps, @@ -942,8 +942,8 @@ MATH_FUNC(MbResultType) EvolutionResult( MbSolid & solid, \en An array of generating contours coordinate systems. \~ \param[in] c - \ru Множество образующих контуров. \en An array of generating contours. \~ - \param[in] spine - \ru Направляющая кривая (может быть c3d_null). - \en A guide curve (can be c3d_null). \~ + \param[in] spine - \ru Направляющая кривая (может быть NULL). + \en A guide curve (can be NULL). \~ \param[in] params - \ru Параметры операции. \en The operation parameters. \~ \param[in] oType - \ru Тип булевой операции. @@ -995,8 +995,8 @@ MATH_FUNC(MbResultType) LoftedResult( MbSolid & solid, \en An array of generating contours surfaces. \~ \param[in] c - \ru Множество образующих контуров. \en An array of generating contours. \~ - \param[in] spine - \ru Осевая кривая (может быть c3d_null). - \en A guide curve (can be c3d_null). \~ + \param[in] spine - \ru Осевая кривая (может быть NULL). + \en A guide curve (can be NULL). \~ \param[in] params - \ru Параметры операции. \en The operation parameters. \~ \param[in] oType - \ru Тип булевой операции. @@ -1962,7 +1962,7 @@ MATH_FUNC (MbResultType) UnionResult( MbSolid * solid, const MbSNameMaker & names, bool isArray, MbSolid *& result, - RPArray * notGluedSolids = c3d_null ); + RPArray * notGluedSolids = NULL ); //------------------------------------------------------------------------------ @@ -2005,7 +2005,7 @@ MATH_FUNC (MbResultType) UnionSolid( RPArray & solids, const MbSNameMaker & names, bool isArray, MbSolid *& result, - RPArray * notGluedSolids = c3d_null ); + RPArray * notGluedSolids = NULL ); //------------------------------------------------------------------------------ @@ -2365,8 +2365,8 @@ 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==c3d_null. \n - \en Create a hole, a pocket, a groove in the solid or create a drill, a boss if 'solid' == c3d_null. \n \~ + \details \ru Cоздать отверстие, карман, фигурный паз в теле или создать cверло, бобышку, если solid==NULL. \n + \en Create a hole, a pocket, a groove in the solid or create a drill, a boss if 'solid' == NULL. \n \~ \param[in] solid - \ru Исходное тело. \en The source solid. \~ \param[in] sameShell - \ru Режим копирования тела. diff --git a/C3d/Include/action_surface.h b/C3d/Include/action_surface.h index 16a41f1..b216fc8 100644 --- a/C3d/Include/action_surface.h +++ b/C3d/Include/action_surface.h @@ -784,8 +784,8 @@ MATH_FUNC (MbResultType) MiddlePlaces( const MbCurve3D & curve1 \en The first guide curve. \~ \param[in] g2 - \ru Вторая направляющая кривая (g1==g2 совпадает с первой при cs_Round). \en The second guide curve (g1==g2 the same first guide for st_Round). \~ - \param[in] c0 - \ru Дополнительная направляющая кривая (может быть c3d_null). - \en The additional guide curve (may be c3d_null). \~ + \param[in] c0 - \ru Дополнительная направляющая кривая (может быть NULL). + \en The additional guide curve (may be NULL). \~ \param[in] form - \ru Форма сечения поверхности (0, 1, 2, 3). \en The form of the surface section (0, 1, 2, 3). \~ \param[in] sense - \ru Направление нормали поверхности направляющей кривой (для guide1==guide2). diff --git a/C3d/Include/action_surface_curve.h b/C3d/Include/action_surface_curve.h index a46695a..2d3dc64 100644 --- a/C3d/Include/action_surface_curve.h +++ b/C3d/Include/action_surface_curve.h @@ -172,8 +172,8 @@ MATH_FUNC (MbResultType) OffsetCurve( const MbCurve3D & curve, //------------------------------------------------------------------------------ /** \brief \ru Создать проекцию кривой на поверхность. \en Create a curve projection onto the surface. \~ - \details \ru Создать проекцию кривой curve на поверхность surface (направление проецирования direction может быть c3d_null). \n - \en Create the projection of a curve onto surface 'surface' (the projection direction 'direction' can be c3d_null). \n \~ + \details \ru Создать проекцию кривой curve на поверхность surface (направление проецирования direction может быть NULL). \n + \en Create the projection of a curve onto surface 'surface' (the projection direction 'direction' can be NULL). \n \~ \param[in] surface - \ru Поверхность для проецирования. \en The surface to project onto. \~ \param[in] curve - \ru Проецируемая кривая. @@ -402,7 +402,7 @@ MATH_FUNC (MbResultType) SilhouetteCurve( const MbFace & face, \en The axis of lathe section. \~ \param[in] removeOnSurfaceBounds - \ru Удалить линии очерка, совпадающие с границами поверхности. \en Remove the isocline curves coincident with the surface bounds. \~ - \param[out] curves - \ru Выходной массив линий очерка. + \param[out] result - \ru Выходной массив линий очерка. \en The output array of isocline curves. \~ \param[in] version - \ru Версия построения. \en The version. \~ @@ -686,13 +686,13 @@ MATH_FUNC( MbResultType ) IntersectionCurve( const MbSurface & surf1, bool ext1, \ingroup Curve3D_Modeling */ //--- -MATH_FUNC (MbResultType) SpaceSplineThrough( const SArray & points, - MbeSplineParamType paramType, - size_t degree, - bool closed, - RPArray & transitions, - const MbSNameMaker & snMaker, - MbWireFrame *& result ); +MATH_FUNC (MbResultType) SpaceSplineThrough( const SArray & points, + MbeSplineParamType paramType, + size_t degree, + bool closed, + RPArray< MbPntMatingData > & transitions, + const MbSNameMaker & snMaker, + MbWireFrame *& result ); //------------------------------------------------------------------------------ @@ -724,14 +724,14 @@ MATH_FUNC (MbResultType) SpaceSplineThrough( const SArray & */ //--- MATH_FUNC (MbResultType) SpaceSplineBy( const SArray & points, - size_t degree, - bool closed, + size_t degree, + bool closed, const SArray * weights, const SArray * knots, - c3d::PntMatingData3D * begData, - c3d::PntMatingData3D * endData, + MbPntMatingData * begData, + MbPntMatingData * endData, const MbSNameMaker & snMaker, - MbWireFrame *& result ); + MbWireFrame *& result ); //------------------------------------------------------------------------------ @@ -776,14 +776,14 @@ MATH_FUNC (MbResultType) SpaceSplineBy( const SArray & points, \ingroup Curve3D_Modeling */ //--- -MATH_FUNC (MbResultType) SurfaceSpline( const MbSurface & surface, - bool throughPoints, - SArray & paramPnts, - SArray & paramWts, - bool paramClosed, - RPArray & spaceTransitions, - const MbSNameMaker & snMaker, - MbWireFrame *& result ); +MATH_FUNC (MbResultType) SurfaceSpline( const MbSurface & surface, + bool throughPoints, + SArray & paramPnts, + SArray & paramWts, + bool paramClosed, + RPArray< MbPntMatingData > & spaceTransitions, + const MbSNameMaker & snMaker, + MbWireFrame *& result ); //------------------------------------------------------------------------------ @@ -936,7 +936,7 @@ MATH_FUNC (MbResultType) ConnectingSpline( const MbCurve3D & curve1, double t1, что начало кривой сопряжения будет находится в точке с параметором t1, t1 и t2 - параметры кривых curve1 и curve2, в соответствующих точках которых начинается и заканчивается скругление. \n Параметр sense - прямое или обратное направление кривой скругления. \n - Кривая filletCurve - это кривая сопряжения, дуга (когда surface == c3d_null) или кривая на поверхности цилиндра surface. \n + Кривая filletCurve - это кривая сопряжения, дуга (когда surface == NULL) или кривая на поверхности цилиндра surface. \n Поверхность surface - это цилиндрическая поверхность, на которой строится кривая сопряжения в общем случае. Для управления жизненным циклом поверхномти следует миспользовать методы ::AddRefItem(surface) и ::ReleaseItem(surface). \n \en Create a fillet curve for curves. \n @@ -952,22 +952,22 @@ MATH_FUNC (MbResultType) ConnectingSpline( const MbCurve3D & curve1, double t1, that the fillet curve start is at the point with parameter t1, t1 and t2 are parameters of curves 'curve1' and 'curve2' which correspond to the start point and the end point of the fillet. \n Parameter 'sense' determines forward or backward orientation of the fillet curve. \n - Curve filletCurve is a fillet curve, an arc (when 'surface' == c3d_null) or a curve on a cylindric surface 'surface'. \n + Curve filletCurve is a fillet curve, an arc (when 'surface' == NULL) or a curve on a cylindric surface 'surface'. \n Surface 'surface' is a cylindric surface on which the fillet curve is constructed in general case. Use ::AddRefItem(surface) and ::ReleaseItem(surface) methods to manage the surface lifecycle. \n \~ \param[in] curve1 - \ru Соединяемая кривая 1. \en A curve 1 to be connected. \~ - \param[in,out] t1 - \ru Параметр точки на кривой 1 соединения с кривой соединения. + \param[in/out] t1 - \ru Параметр точки на кривой 1 соединения с кривой соединения. \en A point parameter on curve 1 of connection with fillet curve. \~ \param[out] w1 - \ru Параметр края на кривой 1. \en The parameter of curve 1 end point. \~ \param[in] curve2 - \ru Соединяемая кривая 2. \en A curve 2 to be connected. \~ - \param[in,out] t2 - \ru Параметр точки на кривой 2 соединения с кривой соединения. + \param[in/out] t2 - \ru Параметр точки на кривой 2 соединения с кривой соединения. \en A point parameter on curve 2 of connection with fillet curve. \~ \param[out] w2 - \ru Параметр края на кривой 2. \en The parameter of curve 2 end point. \~ - \param[in,out] radius - \ru Радиус дуги или цилиндра. + \param[in/out] radius - \ru Радиус дуги или цилиндра. \en The radius of an arc or a cylinder. \~ \param[in] sense - \ru Прямое (true) или обратное (false) направление кривой скругления. \en The forward (true) or the backward (false) direction of the fillet curve. \~ @@ -977,8 +977,8 @@ MATH_FUNC (MbResultType) ConnectingSpline( const MbCurve3D & curve1, double t1, \en The fillet type. \~ \param[in] names - \ru Именователь кривых каркаса. \en An object defining the frame curves names. \~ - \param[out] surface - \ru Поверхность, которая будет создана и на которой базируется соединительная кривая, (может быть возращён c3d_null). - \en A surface on which the fillet curve is based on, it will be created by the method (can be c3d_null). \~ + \param[out] surface - \ru Поверхность, которая будет создана и на которой базируется соединительная кривая, (может быть возращён NULL). + \en A surface on which the fillet curve is based on, it will be created by the method (can be NULL). \~ \param[out] result - \ru Каркас с построенными кривыми. \en The frame with the constructed curves. \~ \return \ru Возвращает код результата операции. diff --git a/C3d/Include/alg_base.h b/C3d/Include/alg_base.h index 39b329e..3f9ef51 100644 --- a/C3d/Include/alg_base.h +++ b/C3d/Include/alg_base.h @@ -464,7 +464,7 @@ bool IsMonotonic( const TypeVector & items, bool isAscending, bool allowEqual = isOk = true; if ( allowEqual ) { - for ( size_t k = 1; k < cnt; ++k ) { + for ( size_t k = 1; k < cnt; k++ ) { if ( isAscending && items[k] < items[k-1] ) { isOk = false; break; @@ -476,7 +476,7 @@ bool IsMonotonic( const TypeVector & items, bool isAscending, bool allowEqual = } } else { - for ( size_t k = 1; k < cnt; ++k ) { + for ( size_t k = 1; k < cnt; k++ ) { if ( isAscending && items[k] <= items[k-1] ) { isOk = false; break; @@ -614,7 +614,7 @@ bool IsPlanar( const SpacePointsVector & pnts, MbPlacement3D * place, double mEp } } } - if ( isPlanar && place != c3d_null ) + if ( isPlanar && place != NULL ) place->Init( wrkPlace ); } } diff --git a/C3d/Include/alg_curve_delete_part.h b/C3d/Include/alg_curve_delete_part.h index 3e8d763..d141186 100644 --- a/C3d/Include/alg_curve_delete_part.h +++ b/C3d/Include/alg_curve_delete_part.h @@ -92,8 +92,8 @@ MATH_FUNC (MbeState) DeleteCurvePart( const MbCartPoint & p1, \en The point indicating the piece of a curve to be kept. \~ \param[in, out] curve - \ru Изменяемая кривая. \en The curve to be modified. \~ - \param[in, out] part2 - \ru Всегда c3d_null. - \en This value is always c3d_null. \~ + \param[in, out] part2 - \ru Всегда NULL. + \en This value is always NULL. \~ \return \ru Состояние кривой после ее модификации. \en The state of a curve after its modification. \~ \warning \ru Для внутреннего использования. @@ -124,8 +124,8 @@ MATH_FUNC (MbeState) TrimmCurvePart( List & curveList, \en The point indicating the piece of a closed curve to be kept \~ \param[in, out] curve - \ru Изменяемая кривая. \en The curve to be modified. \~ - \param[in, out] part2 - \ru Всегда c3d_null. - \en This value is always c3d_null. \~ + \param[in, out] part2 - \ru Всегда NULL. + \en This value is always NULL. \~ \return \ru Состояние кривой после ее модификации. \en The state of a curve after its modification. \~ \warning \ru Для внутреннего использования. @@ -155,8 +155,8 @@ MATH_FUNC (MbeState) TrimmCurvePart( const MbCartPoint & p1, \en Boundary curve for justification. \~ \param[in] pnt - \ru Точка для выбора нужной части кривой. \en The point for selecting the piece of a curve. \~ - \param[in, out] part2 - \ru Всегда c3d_null. - \en This value is always c3d_null. \~ + \param[in, out] part2 - \ru Всегда NULL. + \en This value is always NULL. \~ \return \ru Состояние кривой после ее модификации. \en The state of a curve after modification. \~ \warning \ru Для внутреннего использования. @@ -222,8 +222,8 @@ MATH_FUNC (MbeState) BreakByClosedCurves( MbCurve & curve, const RPArray & limits, bool inside, PArray & part2, - SArray * cross = c3d_null, - bool * isEqualCurve = c3d_null, + SArray * cross = NULL, + bool * isEqualCurve = NULL, bool cutOnCurve = false ); diff --git a/C3d/Include/alg_dimension.h b/C3d/Include/alg_dimension.h index 11ab760..3b69601 100644 --- a/C3d/Include/alg_dimension.h +++ b/C3d/Include/alg_dimension.h @@ -440,7 +440,7 @@ MATH_FUNC (MbeProcessState) MinMaxDistances( const MbSurface & surface1, MbMinMaxSurfDists & allResults, MbMinMaxSurfDists & minResults, MbMinMaxSurfDists & maxResults, - IProgressIndicator * indicator = c3d_null ); + IProgressIndicator * indicator = NULL ); #endif // __ALG_DIMENSION_H diff --git a/C3d/Include/alg_draw.h b/C3d/Include/alg_draw.h index 4eefbd5..8d077cb 100644 --- a/C3d/Include/alg_draw.h +++ b/C3d/Include/alg_draw.h @@ -1028,7 +1028,7 @@ void DrawVertexEdges( const Vertex * vertex, int vR, int vG, int vB, MbStepData stepData( ist_SpaceStep, Math::visualSag ); MbFormNote note(true, false); for ( size_t k = 0, cnt = edges.size(); k < cnt; ++k ) { - if ( edges[k] != c3d_null ) { + if ( edges[k] != NULL ) { edges[k]->GetCurve().CalculateMesh( stepData, note, edgeMesh ); DrawGI::DrawMesh( &edgeMesh, TRGB_WHITE ); DrawGI::DrawMesh( &edgeMesh, eR, eG, eB ); diff --git a/C3d/Include/alg_indicator.h b/C3d/Include/alg_indicator.h index 658a593..a6f46ad 100644 --- a/C3d/Include/alg_indicator.h +++ b/C3d/Include/alg_indicator.h @@ -124,7 +124,7 @@ public: }; -#define EMPTY_STR StrData( c3d_null ) ///< \ru Создание пустой строки \en Creation of an empty string +#define EMPTY_STR StrData( NULL ) ///< \ru Создание пустой строки \en Creation of an empty string //------------------------------------------------------------------------------ @@ -279,14 +279,14 @@ MATH_FUNC (ProgressBarWrapper *) CreateProgressBar( IProgressIndicator * progInd \en The wrapper of the execution progress indicator. \~ \param[in] msg - \ru Данные о строке. \en Data of a string \~ - \return \ru true, если progBar != c3d_null и удалось задать имя процесса. + \return \ru true, если progBar != NULL и удалось задать имя процесса. \en true if 'progBar' is not null and the process name is successfully set. \~ \ingroup Base_Items */ // --- inline bool SetProgressBarName( ProgressBarWrapper * progBar, IStrData & msg ) { - if ( progBar != c3d_null ) + if ( progBar != NULL ) return progBar->SetName( msg ); return false; } @@ -308,7 +308,7 @@ inline bool SetProgressBarName( ProgressBarWrapper * progBar, IStrData & msg ) // --- inline bool SetProgressBarValue( ProgressBarWrapper * progBar, size_t v ) { - if ( progBar != c3d_null && !progBar->IsCancel() ) + if ( progBar != NULL && !progBar->IsCancel() ) return progBar->SetProgress( v ); return false; } @@ -328,7 +328,7 @@ inline bool SetProgressBarValue( ProgressBarWrapper * progBar, size_t v ) // --- inline void FinishProgressBar( ProgressBarWrapper * progBar ) { - if ( progBar != c3d_null ) { + if ( progBar != NULL ) { if ( progBar->IsCancel() ) progBar->Stop(); else progBar->Success(); } @@ -347,7 +347,7 @@ inline void FinishProgressBar( ProgressBarWrapper * progBar ) // --- inline bool StopProgressBar( ProgressBarWrapper * progBar ) { - if ( progBar != c3d_null && progBar->IsCancel() ) { + if ( progBar != NULL && progBar->IsCancel() ) { progBar->Stop(); return true; } @@ -362,14 +362,14 @@ inline bool StopProgressBar( ProgressBarWrapper * progBar ) \en The wrapper of the execution progress indicator. \~ \param[in] useParentName - \ru Флаг использования имени родителя. \en The flag of using the parent name. \~ - \return \ru true, если progBar != c3d_null. + \return \ru true, если progBar != NULL. \en true if 'progBar' is not null. \~ \ingroup Base_Items */ // --- inline bool UseParentName( ProgressBarWrapper * progBar, bool useParentName ) { - if ( progBar != c3d_null ) { + if ( progBar != NULL ) { progBar->UseParentName( useParentName ); return true; } @@ -389,7 +389,7 @@ inline bool UseParentName( ProgressBarWrapper * progBar, bool useParentName ) // --- inline bool IsParentNameUsed( const ProgressBarWrapper * progBar ) { - if ( progBar != c3d_null ) + if ( progBar != NULL ) return progBar->IsParentNameUsed(); return false; diff --git a/C3d/Include/alg_mesh_to_brep.h b/C3d/Include/alg_mesh_to_brep.h index fec6646..d19605d 100644 --- a/C3d/Include/alg_mesh_to_brep.h +++ b/C3d/Include/alg_mesh_to_brep.h @@ -76,7 +76,7 @@ MbFaceShell * ConvertGridToShell( const MbGrid & grid, const GridsToShellValues & params, const MbSNameMaker & snMaker, MbResultType & res, - IProgressIndicator * progBar = c3d_null ); + IProgressIndicator * progBar = NULL ); //------------------------------------------------------------------------------ @@ -86,7 +86,7 @@ MbFaceShell * ConvertMeshToShell( const MbMesh & mesh, const GridsToShellValues & params, const MbSNameMaker & snMaker, MbResultType & res, - IProgressIndicator * progBar = c3d_null ); + IProgressIndicator * progBar = NULL ); //------------------------------------------------------------------------------ diff --git a/C3d/Include/alg_nurbs_conic.h b/C3d/Include/alg_nurbs_conic.h index d93d98f..637741f 100644 --- a/C3d/Include/alg_nurbs_conic.h +++ b/C3d/Include/alg_nurbs_conic.h @@ -57,9 +57,9 @@ class MbVector3D; \en The discriminant is less than 1. Otherwise it will be set to 0.99999999 automatically. \~ \return \ru Указатель на построенную кривую \n - c3d_null, если не удалось построить конику для заданных параметров. + NULL, если не удалось построить конику для заданных параметров. \en The pointer to the constructed curve \n - is c3d_null if a try to construct a conic for a given parameters has failed. \~ + is NULL if a try to construct a conic for a given parameters has failed. \~ \ingroup Curve3D_Modeling */ // --- @@ -87,9 +87,9 @@ MATH_FUNC ( MbCurve3D * ) NurbsConic_1( const MbCartPoint3D & mbPoint0, const Mb \en The discriminant is less than 1. Otherwise it will be set to 0.99999999 automatically. \~ \return \ru Указатель на построенную кривую \n - c3d_null, если не удалось построить конику для заданных параметров. + NULL, если не удалось построить конику для заданных параметров. \en The pointer to the constructed curve \n - is c3d_null if a try to construct a conic for a given parameters has failed. \~ + is NULL if a try to construct a conic for a given parameters has failed. \~ \ingroup Curve_Modeling */ // --- @@ -113,9 +113,9 @@ MATH_FUNC ( MbCurve * ) NurbsConic_1( const MbCartPoint & mbPoint0, const MbCart \param[in] mbVertex - \ru Координаты вершины угла, в который надо вписать конику. \en Coordinates of the vertex of angle which should be inscribed into the conic. \~ \return \ru Указатель на построенную кривую \n - c3d_null, если не удалось постороить конику для заданных параметров. + NULL, если не удалось постороить конику для заданных параметров. \en The pointer to the constructed curve \n - is c3d_null if a try to construct a conic for given parameters has failed. \~ + is NULL if a try to construct a conic for given parameters has failed. \~ \ingroup Curve3D_Modeling */ // --- @@ -138,9 +138,9 @@ MATH_FUNC ( MbCurve3D * ) NurbsConic_2( std::vector & vmbConicPoi \param[in] mbVertex - \ru Координаты вершины угла, в который надо вписать конику. \en Coordinates of the vertex of angle which should be inscribed into the conic. \~ \return \ru Указатель на построенную кривую \n - c3d_null, если не удалось постороить конику для заданных параметров. + NULL, если не удалось постороить конику для заданных параметров. \en The pointer to the constructed curve \n - is c3d_null if a try to construct a conic for given parameters has failed. \~ + is NULL if a try to construct a conic for given parameters has failed. \~ \ingroup Curve_Modeling */ // --- @@ -165,9 +165,9 @@ MATH_FUNC ( MbCurve * ) NurbsConic_2( std::vector & vmbConicPoints, \param[in] mbTangent2 - \ru Наклон в конце кривой. \en Inclination at end of a curve. \~ \return \ru Указатель на построенную кривую \n - c3d_null, если не удалось постороить конику для заданных параметров. + NULL, если не удалось постороить конику для заданных параметров. \en The pointer to the constructed curve \n - is c3d_null if a try to construct a conic for given parameters has failed. \~ + is NULL if a try to construct a conic for given parameters has failed. \~ \ingroup Curve3D_Modeling */ // --- @@ -193,9 +193,9 @@ MATH_FUNC ( MbCurve3D * ) NurbsConic_3( const std::vector & vmbCo \param[in] mbTangent2 - \ru Наклон в конце кривой. \en Inclination at end of a curve. \~ \return \ru Указатель на построенную кривую \n - c3d_null, если не удалось постороить конику для заданных параметров. + NULL, если не удалось постороить конику для заданных параметров. \en The pointer to the constructed curve \n - is c3d_null if a try to construct a conic for given parameters has failed. \~ + is NULL if a try to construct a conic for given parameters has failed. \~ \ingroup Curve_Modeling */ // --- @@ -224,9 +224,9 @@ MATH_FUNC ( MbCurve * ) NurbsConic_3( const std::vector & vmbConicP \en The discriminant is less than 1. Otherwise it will be set to 0.99999999 automatically. \~ \return \ru Указатель на построенную кривую \n - c3d_null, если не удалось построить конику для заданных параметров. + NULL, если не удалось построить конику для заданных параметров. \en The pointer to the constructed curve \n - is c3d_null if a try to construct a conic for given parameters has failed. \~ + is NULL if a try to construct a conic for given parameters has failed. \~ \ingroup Curve3D_Modeling */ // --- @@ -256,9 +256,9 @@ MATH_FUNC ( MbCurve3D * ) NurbsConic_4( const MbCartPoint3D & mbPoint1, const Mb \en The discriminant is less than 1. Otherwise it will be set to 0.99999999 automatically. \~ \return \ru Указатель на построенную кривую \n - c3d_null, если не удалось построить конику для заданных параметров. + NULL, если не удалось построить конику для заданных параметров. \en The pointer to the constructed curve \n - is c3d_null if a try to construct a conic for given parameters has failed. \~ + is NULL if a try to construct a conic for given parameters has failed. \~ \ingroup Curve_Modeling */ // --- @@ -288,9 +288,9 @@ MATH_FUNC ( MbCurve * ) NurbsConic_4( const MbCartPoint & mbPoint1, const MbCart \param[in] tanPntNb - \ru Номер точке, в которой задан наклон. \en Point number at which the inclination is specified. \~ \return \ru Указатель на построенную кривую \n - c3d_null, если не удалось постороить конику для заданных параметров. + NULL, если не удалось постороить конику для заданных параметров. \en The pointer to the constructed curve \n - is c3d_null if a try to construct a conic for given parameters has failed. \~ + is NULL if a try to construct a conic for given parameters has failed. \~ \ingroup Curve3D_Modeling */ // --- @@ -319,9 +319,9 @@ MATH_FUNC ( MbCurve3D * ) NurbsConic_5( const std::vector & vmbCo \param[in] tanPntNb - \ru Номер точке, в которой задан наклон. \en Point number at which the inclination is specified. \~ \return \ru Указатель на построенную кривую \n - c3d_null, если не удалось постороить конику для заданных параметров. + NULL, если не удалось постороить конику для заданных параметров. \en The pointer to the constructed curve \n - is c3d_null if a try to construct a conic for given parameters has failed. \~ + is NULL if a try to construct a conic for given parameters has failed. \~ \ingroup Curve_Modeling */ // --- @@ -342,9 +342,9 @@ MATH_FUNC ( MbCurve * ) NurbsConic_5( const std::vector & vmbConicP \en The container for points of a conic: the first point is start point, the last point is end point. there should be exactly 5 points. \~ \return \ru Указатель на построенную кривую \n - c3d_null, если не удалось постороить конику для заданных параметров. + NULL, если не удалось постороить конику для заданных параметров. \en The pointer to the constructed curve \n - is c3d_null if a try to construct a conic for given parameters has failed. \~ + is NULL if a try to construct a conic for given parameters has failed. \~ \ingroup Curve3D_Modeling */ // --- @@ -365,9 +365,9 @@ MATH_FUNC ( MbCurve3D * ) NurbsConic_6( const std::vector & vmbCo \en The container for points of a conic: the first point is start point, the last point is end point. there should be exactly 5 points. \~ \return \ru Указатель на построенную кривую \n - c3d_null, если не удалось постороить конику для заданных параметров. + NULL, если не удалось постороить конику для заданных параметров. \en The pointer to the constructed curve \n - is c3d_null if a try to construct a conic for given parameters has failed. \~ + is NULL if a try to construct a conic for given parameters has failed. \~ \ingroup Curve_Modeling */ // --- diff --git a/C3d/Include/alg_polyline.h b/C3d/Include/alg_polyline.h index b6732f8..2fd6656 100644 --- a/C3d/Include/alg_polyline.h +++ b/C3d/Include/alg_polyline.h @@ -43,14 +43,14 @@ class MATH_CLASS MbCubicSpline3D; радиус скругления в этой точке. При создании заполняются поля m_lineSeg и m_arcSeg. m_lineSeg - это прямолинейный сегмент из этой точки в следующую. Для последней точки и замкнутой ломаной - из последней в первую. m_arcSeg - дуга скругления в данной точке. - Если какой-то сегмент был полностью удален или не создан, то его указатель должен быть c3d_null. + Если какой-то сегмент был полностью удален или не создан, то его указатель должен быть NULL. Объектами m_lineSeg и m_arcSeg не владеет, поэтому и не удаляет их. Объекты из полилинии. \en Some points may be deleted while the construction, therefore the old index is entered, it is filled and used in a model. Parameters of a point are its coordinates and fillet radius in this point. In a time of creation the fields 'm_lineSeg' and 'm_lineSeg' are being filled. 'm_lineSeg' is the straight-line segment from this point to the next point. For the last point and a closed polyline - from the last point to the first point. 'm_arcSeg'is the arc of a fillet in the given point. - If a segment has been fully deleted or it was not created then the pointer should be c3d_null. + If a segment has been fully deleted or it was not created then the pointer should be NULL. Object 'm_lineSeg' and 'm_arcSeg' are not owned, therefore they are not deleted. Objects from a polyline. \~ \ingroup Data_Structures */ @@ -69,8 +69,8 @@ public: : m_oldIndex( SYS_MAX_T ) , m_point () , m_radius ( 0.0 ) - , m_lineSeg ( c3d_null ) - , m_arcSeg ( c3d_null ) + , m_lineSeg ( NULL ) + , m_arcSeg ( NULL ) {} /// \ru Конструктор копирования. \en Copy constructor. Polyline3DPoint( const Polyline3DPoint & other ) @@ -250,9 +250,9 @@ MATH_FUNC (void) CreateSmoothFromBezier( const MbBezier & bez, RPArray /** \brief \ru Создать кривую заданного типа базе NURBS-кривой. \en Create a curve of a given type as NURBS-curve. \~ \details \ru Работает для двух типов: pt_LineSegment и pt_Arc. Если не удалось - аппроксимировать с заданной точностью функция вернет c3d_null. + аппроксимировать с заданной точностью функция вернет NULL. \en It works for the two types: 'pt_LineSegment' and 'pt_Arc'. If approximation with the given tolerance has failed - then the function returns c3d_null. \~ + then the function returns NULL. \~ \param[in] nurbs - \ru Исходная NURBS-кривая. \en The initial NURBS-curve. \~ \param[in] type - \ru Тип кривой, которую требуется создать. @@ -288,7 +288,7 @@ MATH_FUNC (MbCurve *) ConvertNurbsToCurveOfType( const MbNurbs & nurbs, MbePlane */ // --- MATH_FUNC (MbCurve *) GetFlatCurve( const MbCurve3D & curve3D, const MbMatrix3D & into, - MbRect1D * pRgn = c3d_null, VERSION version = Math::DefaultMathVersion() ); + MbRect1D * pRgn = NULL, VERSION version = Math::DefaultMathVersion() ); //------------------------------------------------------------------------------ diff --git a/C3d/Include/assembly.h b/C3d/Include/assembly.h index 62c8ef4..971b4c9 100644 --- a/C3d/Include/assembly.h +++ b/C3d/Include/assembly.h @@ -94,10 +94,10 @@ public: // \ru Общие функции геометрического объекта \en Common functions of a geometric object virtual MbeSpaceType IsA() const; // \ru Тип объекта. \en An object type. - virtual MbSpaceItem & Duplicate( MbRegDuplicate * iReg = c3d_null ) const; // \ru Создать копию. \en Create a copy. - virtual void Transform( const MbMatrix3D &, MbRegTransform * iReg = c3d_null ); // \ru Преобразовать согласно матрице. \en Transform according to the matrix. - virtual void Move( const MbVector3D &, MbRegTransform * iReg = c3d_null ); // \ru Сдвинуть вдоль вектора. \en Move along a vector. - virtual void Rotate( const MbAxis3D &, double angle, MbRegTransform * iReg = c3d_null ); // \ru Повернуть вокруг оси. \en Rotate about an axis. + virtual MbSpaceItem & Duplicate( MbRegDuplicate * iReg = NULL ) const; // \ru Создать копию. \en Create a copy. + virtual void Transform( const MbMatrix3D &, MbRegTransform * iReg = NULL ); // \ru Преобразовать согласно матрице. \en Transform according to the matrix. + virtual void Move( const MbVector3D &, MbRegTransform * iReg = NULL ); // \ru Сдвинуть вдоль вектора. \en Move along a vector. + virtual void Rotate( const MbAxis3D &, double angle, MbRegTransform * iReg = NULL ); // \ru Повернуть вокруг оси. \en Rotate about an axis. virtual bool IsSame( const MbSpaceItem & other, double accuracy = LENGTH_EPSILON ) const; // \ru Являются ли объекты равными? \en Are the objects equal? virtual bool IsSimilar( const MbSpaceItem & ) const; // \ru Являются ли объекты подобными? \en Are the objects similar? virtual bool SetEqual ( const MbSpaceItem & ); // \ru Сделать объекты равным \en Make the objects equal @@ -151,11 +151,11 @@ public: virtual const MbItem * GetItemByName( SimpleName n, MbPath & path, MbMatrix3D & from ) const; // \ru Преобразовать согласно матрице c использованием регистратора селектированные содержимые объекты. \en Transform selected objects according to the matrix using the registrator. - virtual void TransformSelected( const MbMatrix3D & matr, MbRegTransform * iReg = c3d_null ); + virtual void TransformSelected( const MbMatrix3D & matr, MbRegTransform * iReg = NULL ); // \ru Сдвинуть вдоль вектора с использованием регистратора селектированные содержимые объекты. \en Move selected objects along the vector using the registrator. - virtual void MoveSelected( const MbVector3D & to, MbRegTransform * iReg = c3d_null ); + virtual void MoveSelected( const MbVector3D & to, MbRegTransform * iReg = NULL ); // \ru Повернуть вокруг оси на заданный угол с использованием регистратора селектированные содержимые объекты. \en Rotate selected objects about the axis by the given angle using the registrator. - virtual void RotateSelected( const MbAxis3D & axis, double angle, MbRegTransform * iReg = c3d_null ); + virtual void RotateSelected( const MbAxis3D & axis, double angle, MbRegTransform * iReg = NULL ); /// \ru Отдать селектированные содержимые объекты. \en Get selected objects. bool DetachSelected( RPArray & items, SArray & matrs, bool selected = true ); /// \ru Отцепить все видимые или невидимые объекты. \en Detach all visible or invisible objects. \~ @@ -310,8 +310,8 @@ template MbAssembly::MbAssembly( const ItemsVector & items ) : MbItem() , assemblyItems() - , constraintSystem( c3d_null ) - , m_reactor( c3d_null ) + , constraintSystem( NULL ) + , m_reactor( NULL ) { #ifdef C3D_DEBUG // Check a condition of the single owner. @@ -336,7 +336,7 @@ MbAssembly::MbAssembly( const ItemsVector & items ) template void MbAssembly::_Init( const ItemsVector & items ) { - C3D_ASSERT( assemblyItems.empty() && (constraintSystem == c3d_null) ); + C3D_ASSERT( assemblyItems.empty() && (constraintSystem == NULL) ); SimpleName idCounter = 0; for ( size_t i = 0, iCount = items.size(); i < iCount; ++i ) @@ -383,7 +383,7 @@ void MbAssembly::GetFacesSet( FacesVector & faces ) const template void MbInstance::GetFacesSet( FacesVector & faces ) const { - if ( item != c3d_null ) { + if ( item != NULL ) { if ( item->IsA() == st_Solid ) static_cast( *item ).GetFacesSet( faces ); else if ( item->IsA() == st_Assembly ) diff --git a/C3d/Include/assisting_item.h b/C3d/Include/assisting_item.h index 06a7861..73fa9df 100644 --- a/C3d/Include/assisting_item.h +++ b/C3d/Include/assisting_item.h @@ -51,10 +51,10 @@ public : // \ru Общие функции геометрического объекта. \en Common functions of a geometric object. virtual MbeSpaceType IsA() const; // \ru Тип объекта. \en An object type. - virtual MbSpaceItem & Duplicate( MbRegDuplicate * = c3d_null ) const; // \ru Создать копию. \en Create a copy. - virtual void Transform( const MbMatrix3D &, MbRegTransform * = c3d_null ); // \ru Преобразовать согласно матрице. \en Transform according to the matrix. - virtual void Move ( const MbVector3D &, MbRegTransform * = c3d_null ); // \ru Сдвинуть вдоль вектора. \en Move along a vector. - virtual void Rotate ( const MbAxis3D &, double angle, MbRegTransform * = c3d_null ); // \ru Повернуть вокруг оси. \en Rotate about an axis. + virtual MbSpaceItem & Duplicate( MbRegDuplicate * = NULL ) const; // \ru Создать копию. \en Create a copy. + virtual void Transform( const MbMatrix3D &, MbRegTransform * = NULL ); // \ru Преобразовать согласно матрице. \en Transform according to the matrix. + virtual void Move ( const MbVector3D &, MbRegTransform * = NULL ); // \ru Сдвинуть вдоль вектора. \en Move along a vector. + virtual void Rotate ( const MbAxis3D &, double angle, MbRegTransform * = NULL ); // \ru Повернуть вокруг оси. \en Rotate about an axis. virtual bool IsSame ( const MbSpaceItem & other, double accuracy = LENGTH_EPSILON ) const; // \ru Являются ли объекты равными? \en Whether the objects are equal? virtual bool IsSimilar( const MbSpaceItem & init ) const; // \ru Являются ли объекты подобными? \en Whether the objects are similar? virtual bool SetEqual ( const MbSpaceItem & init ); // \ru Сделать объекты равным. \en Make the objects equal. diff --git a/C3d/Include/attr_color.h b/C3d/Include/attr_color.h index 625fa0c..3d9c8f4 100644 --- a/C3d/Include/attr_color.h +++ b/C3d/Include/attr_color.h @@ -182,7 +182,7 @@ public : virtual MbeAttributeType AttributeType() const; // \ru Дать подтип атрибута. \en Get subtype of an attribute. - virtual MbAttribute & Duplicate( MbRegDuplicate * = c3d_null ) const; // \ru Сделать копию элемента. \en Create a copy of the element. + virtual MbAttribute & Duplicate( MbRegDuplicate * = NULL ) const; // \ru Сделать копию элемента. \en Create a copy of the element. virtual bool IsSame( const MbAttribute &, double accuracy ) const; // \ru Определить, являются ли объекты равными. \en Determine whether objects are equal. virtual bool Init( const MbAttribute & ); // \ru Инициализировать данные по присланным. \en Initialize data. @@ -231,7 +231,7 @@ public : // \ru Общие функции объекта \en Common functions of object. virtual MbeAttributeType AttributeType() const; // \ru Дать подтип атрибута. \en Get subtype of an attribute. - virtual MbAttribute & Duplicate( MbRegDuplicate * = c3d_null ) const; // \ru Сделать копию элемента. \en Create a copy of the element. + virtual MbAttribute & Duplicate( MbRegDuplicate * = NULL ) const; // \ru Сделать копию элемента. \en Create a copy of the element. virtual bool IsSame( const MbAttribute &, double accuracy ) const; // \ru Определить, являются ли объекты равными. \en Determine whether objects are equal. virtual bool Init( const MbAttribute & ); // \ru Инициализировать данные по присланным. \en Initialize data. @@ -277,7 +277,7 @@ public : // \ru Общие функции объекта \en Common functions of object. virtual MbeAttributeType AttributeType() const; // \ru Дать подтип атрибута. \en Get subtype of an attribute. - virtual MbAttribute & Duplicate( MbRegDuplicate * = c3d_null ) const; // \ru Сделать копию элемента. \en Create a copy of the element. + virtual MbAttribute & Duplicate( MbRegDuplicate * = NULL ) const; // \ru Сделать копию элемента. \en Create a copy of the element. virtual bool IsSame( const MbAttribute &, double accuracy ) const; // \ru Определить, являются ли объекты равными. \en Determine whether objects are equal. virtual bool Init( const MbAttribute & ); // \ru Инициализировать данные по присланным. \en Initialize data. @@ -330,7 +330,7 @@ public : // \ru Общие функции объекта \en Common functions of object. virtual MbeAttributeType AttributeType() const; // \ru Дать подтип атрибута. \en Get subtype of an attribute. - virtual MbAttribute & Duplicate( MbRegDuplicate * = c3d_null ) const; // \ru Сделать копию элемента. \en Create a copy of the element. + virtual MbAttribute & Duplicate( MbRegDuplicate * = NULL ) const; // \ru Сделать копию элемента. \en Create a copy of the element. virtual bool IsSame( const MbAttribute &, double accuracy ) const; // \ru Определить, являются ли объекты равными. \en Determine whether objects are equal. virtual bool Init( const MbAttribute & ); // \ru Инициализировать данные по присланным. \en Initialize data. @@ -411,7 +411,7 @@ public : // \ru Общие функции объекта \en Common functions of object. virtual MbeAttributeType AttributeType() const; // \ru Дать подтип атрибута. \en Get subtype of an attribute. - virtual MbAttribute & Duplicate( MbRegDuplicate * = c3d_null ) const; // \ru Сделать копию элемента. \en Create a copy of the element. + virtual MbAttribute & Duplicate( MbRegDuplicate * = NULL ) const; // \ru Сделать копию элемента. \en Create a copy of the element. virtual bool IsSame( const MbAttribute &, double accuracy ) const; // \ru Определить, являются ли объекты равными. \en Determine whether objects are equal. virtual bool Init( const MbAttribute & ); // \ru Инициализировать данные по присланным. \en Initialize data. diff --git a/C3d/Include/attr_common_attribute.h b/C3d/Include/attr_common_attribute.h index f8a479b..ae22d14 100644 --- a/C3d/Include/attr_common_attribute.h +++ b/C3d/Include/attr_common_attribute.h @@ -37,7 +37,7 @@ protected : public : virtual MbeAttributeType AttributeFamily() const; // \ru Выдать тип атрибута. \en Get attribute type. virtual MbeAttributeType AttributeType() const = 0; // \ru Выдать подтип атрибута. \en Get subtype of an attribute. - virtual MbAttribute & Duplicate( MbRegDuplicate * = c3d_null ) const = 0; // \ru Сделать копию элемента. \en Create a copy of the element. + virtual MbAttribute & Duplicate( MbRegDuplicate * = NULL ) const = 0; // \ru Сделать копию элемента. \en Create a copy of the element. virtual bool IsSame( const MbAttribute &, double accuracy ) const; // \ru Определить, являются ли объекты равными. \en Determine whether objects are equal. virtual bool Init( const MbAttribute & ) = 0; // \ru Инициализировать данные по присланным. \en Initialize data. @@ -46,13 +46,13 @@ public : // \ru Выполнить действия при конвертации владельца. \en Perform actions when converting the owner. virtual void OnConvertOwner( const MbAttributeContainer & owner, MbAttributeContainer & other ); // \ru Выполнить действия при трансформировании владельца. \en Perform actions when transforming the owner. - virtual void OnTransformOwner( const MbAttributeContainer & owner, const MbMatrix3D &, MbRegTransform * = c3d_null ); + virtual void OnTransformOwner( const MbAttributeContainer & owner, const MbMatrix3D &, MbRegTransform * = NULL ); // \ru Выполнить действия при перемещении владельца. \en Perform actions when moving the owner. - virtual void OnMoveOwner( const MbAttributeContainer & owner, const MbVector3D &, MbRegTransform * = c3d_null ); + virtual void OnMoveOwner( const MbAttributeContainer & owner, const MbVector3D &, MbRegTransform * = NULL ); // \ru Выполнить действия при вращении владельца. \en Perform actions when rotating the owner. - virtual void OnRotateOwner( const MbAttributeContainer & owner, const MbAxis3D &, double angle, MbRegTransform * = c3d_null ); + virtual void OnRotateOwner( const MbAttributeContainer & owner, const MbAxis3D &, double angle, MbRegTransform * = NULL ); // \ru Выполнить действия при копировании владельца. \en Perform actions when copying the owner. - virtual void OnCopyOwner( const MbAttributeContainer & owner, MbAttributeContainer & other, MbRegDuplicate * = c3d_null ); + virtual void OnCopyOwner( const MbAttributeContainer & owner, MbAttributeContainer & other, MbRegDuplicate * = NULL ); // \ru Выполнить действия при объединении владельца. \en Perform actions when merging he owner. virtual void OnMergeOwner( const MbAttributeContainer & owner, MbAttributeContainer & other ); // \ru Выполнить действия при замене владельца. \en Perform actions when replacing the owner. @@ -101,7 +101,7 @@ public: public: virtual MbeAttributeType AttributeType() const; // \ru Выдать подтип атрибута. \en Get subtype of an attribute. virtual void GetCharValue( TCHAR * v ) const; // \ru Выдать строковое значение свойства. \en Get a string value of the property. - virtual MbAttribute & Duplicate( MbRegDuplicate * = c3d_null ) const; // \ru Сделать копию элемента. \en Create a copy of the element. + virtual MbAttribute & Duplicate( MbRegDuplicate * = NULL ) const; // \ru Сделать копию элемента. \en Create a copy of the element. virtual bool IsSame( const MbAttribute &, double accuracy ) const; // \ru Определить, являются ли объекты равными. \en Determine whether objects are equal. virtual bool Init( const MbAttribute & ); // \ru Инициализировать данные по присланным. \en Initialize data. virtual void GetProperties( MbProperties & ); // \ru Выдать свойства объекта. \en Get properties of the object. @@ -137,7 +137,7 @@ public: public: virtual MbeAttributeType AttributeType() const; // \ru Выдать подтип атрибута. \en Get subtype of an attribute. virtual void GetCharValue( TCHAR * v ) const; // \ru Выдать строковое значение свойства. \en Get a string value of the property. - virtual MbAttribute & Duplicate( MbRegDuplicate * = c3d_null ) const; // \ru Сделать копию элемента. \en Create a copy of the element. + virtual MbAttribute & Duplicate( MbRegDuplicate * = NULL ) const; // \ru Сделать копию элемента. \en Create a copy of the element. virtual bool IsSame( const MbAttribute &, double accuracy ) const; // \ru Определить, являются ли объекты равными. \en Determine whether objects are equal. virtual bool Init( const MbAttribute & ); // \ru Инициализировать данные по присланным. \en Initialize data. virtual void GetProperties( MbProperties & ); // \ru Выдать свойства объекта. \en Get properties of the object. @@ -173,7 +173,7 @@ public: public: virtual MbeAttributeType AttributeType() const; // \ru Выдать подтип атрибута. \en Get subtype of an attribute. virtual void GetCharValue( TCHAR * v ) const; // \ru Выдать строковое значение свойства. \en Get a string value of the property. - virtual MbAttribute & Duplicate( MbRegDuplicate * = c3d_null ) const; // \ru Сделать копию элемента. \en Create a copy of the element. + virtual MbAttribute & Duplicate( MbRegDuplicate * = NULL ) const; // \ru Сделать копию элемента. \en Create a copy of the element. virtual bool IsSame( const MbAttribute &, double accuracy ) const; // \ru Определить, являются ли объекты равными. \en Determine whether objects are equal. virtual bool Init( const MbAttribute & ); // \ru Инициализировать данные по присланным. \en Initialize data. virtual void GetProperties( MbProperties & ); // \ru Выдать свойства объекта. \en Get properties of the object. @@ -209,7 +209,7 @@ public: public: virtual MbeAttributeType AttributeType() const; // \ru Выдать подтип атрибута. \en Get subtype of an attribute. virtual void GetCharValue( TCHAR * v ) const; // \ru Выдать строковое значение свойства. \en Get a string value of the property. - virtual MbAttribute & Duplicate( MbRegDuplicate * = c3d_null ) const; // \ru Сделать копию элемента. \en Create a copy of the element. + virtual MbAttribute & Duplicate( MbRegDuplicate * = NULL ) const; // \ru Сделать копию элемента. \en Create a copy of the element. virtual bool IsSame( const MbAttribute &, double accuracy ) const; // \ru Определить, являются ли объекты равными. \en Determine whether objects are equal. virtual bool Init( const MbAttribute & ); // \ru Инициализировать данные по присланным. \en Initialize data. virtual void GetProperties( MbProperties & ); // \ru Выдать свойства объекта. \en Get properties of the object. @@ -243,7 +243,7 @@ public: public: virtual MbeAttributeType AttributeType() const; // \ru Выдать подтип атрибута. \en Get subtype of an attribute. virtual void GetCharValue( TCHAR * v ) const; // \ru Выдать строковое значение свойства. \en Get a string value of the property. - virtual MbAttribute & Duplicate( MbRegDuplicate * = c3d_null ) const; // \ru Сделать копию элемента. \en Create a copy of the element. + virtual MbAttribute & Duplicate( MbRegDuplicate * = NULL ) const; // \ru Сделать копию элемента. \en Create a copy of the element. virtual bool IsSame( const MbAttribute &, double accuracy ) const; // \ru Определить, являются ли объекты равными. \en Determine whether objects are equal. virtual bool Init( const MbAttribute & ); // \ru Инициализировать данные по присланным. \en Initialize data. virtual void GetProperties( MbProperties & ); // \ru Выдать свойства объекта. \en Get properties of the object. @@ -280,7 +280,7 @@ public: public: virtual MbeAttributeType AttributeType() const; // \ru Выдать подтип атрибута. \en Get subtype of an attribute. virtual void GetCharValue( TCHAR * v ) const; // \ru Выдать строковое значение свойства. \en Get a string value of the property. - virtual MbAttribute & Duplicate( MbRegDuplicate * = c3d_null ) const; // \ru Сделать копию элемента. \en Create a copy of the element. + virtual MbAttribute & Duplicate( MbRegDuplicate * = NULL ) const; // \ru Сделать копию элемента. \en Create a copy of the element. virtual bool IsSame( const MbAttribute &, double accuracy ) const; // \ru Определить, являются ли объекты равными. \en Determine whether objects are equal. virtual bool Init( const MbAttribute & ); // \ru Инициализировать данные по присланным. \en Initialize data. virtual void GetProperties( MbProperties & ); // \ru Выдать свойства объекта. \en Get properties of the object. diff --git a/C3d/Include/attr_dencity.h b/C3d/Include/attr_dencity.h index 06efd72..025963d 100644 --- a/C3d/Include/attr_dencity.h +++ b/C3d/Include/attr_dencity.h @@ -38,7 +38,7 @@ public : // \ru Общие функции объекта \en Common functions of object. virtual MbeAttributeType AttributeType() const; // \ru Дать подтип атрибута. \en Get subtype of an attribute. - virtual MbAttribute & Duplicate( MbRegDuplicate * = c3d_null ) const; // \ru Сделать копию элемента. \en Create a copy of the element. + virtual MbAttribute & Duplicate( MbRegDuplicate * = NULL ) const; // \ru Сделать копию элемента. \en Create a copy of the element. virtual bool IsSame( const MbAttribute &, double accuracy ) const; // \ru Определить, являются ли объекты равными. \en Determine whether objects are equal. virtual bool Init( const MbAttribute & ); // \ru Инициализировать данные по присланным. \en Initialize data. @@ -86,7 +86,7 @@ public : // \ru Общие функции объекта \en Common functions of object. virtual MbeAttributeType AttributeType() const; // \ru Дать подтип атрибута. \en Get subtype of an attribute. - virtual MbAttribute & Duplicate( MbRegDuplicate * = c3d_null ) const; // \ru Сделать копию элемента. \en Create a copy of the element. + virtual MbAttribute & Duplicate( MbRegDuplicate * = NULL ) const; // \ru Сделать копию элемента. \en Create a copy of the element. virtual bool IsSame( const MbAttribute &, double accuracy ) const; // \ru Определить, являются ли объекты равными. \en Determine whether objects are equal. virtual bool Init( const MbAttribute & ); // \ru Инициализировать данные по присланным. \en Initialize data. @@ -137,7 +137,7 @@ public : // \ru Общие функции объекта \en Common functions of object. virtual MbeAttributeType AttributeType() const; // \ru Дать подтип атрибута. \en Get subtype of an attribute. - virtual MbAttribute & Duplicate( MbRegDuplicate * = c3d_null ) const; // \ru Сделать копию элемента. \en Create a copy of the element. + virtual MbAttribute & Duplicate( MbRegDuplicate * = NULL ) const; // \ru Сделать копию элемента. \en Create a copy of the element. virtual bool IsSame( const MbAttribute &, double accuracy ) const; // \ru Определить, являются ли объекты равными. \en Determine whether objects are equal. virtual bool Init( const MbAttribute & ); // \ru Инициализировать данные по присланным. \en Initialize data. diff --git a/C3d/Include/attr_elementary_attribute.h b/C3d/Include/attr_elementary_attribute.h index a9acab6..c5fd3bf 100644 --- a/C3d/Include/attr_elementary_attribute.h +++ b/C3d/Include/attr_elementary_attribute.h @@ -30,7 +30,7 @@ public: public : virtual MbeAttributeType AttributeFamily() const; // \ru Тип атрибута \en Type of an attribute virtual MbeAttributeType AttributeType() const = 0; // \ru Выдать подтип атрибута \en Get subtype of an attribute. - virtual MbAttribute & Duplicate( MbRegDuplicate * = c3d_null ) const = 0; // \ru Сделать копию элемента \en Create a copy of the element. + virtual MbAttribute & Duplicate( MbRegDuplicate * = NULL ) const = 0; // \ru Сделать копию элемента \en Create a copy of the element. virtual bool IsSame( const MbAttribute &, double accuracy ) const = 0; // \ru Определить, являются ли объекты равными. \en Determine whether objects are equal. virtual bool Init( const MbAttribute & ) = 0; // \ru Инициализировать данные по присланным \en Initialize data. @@ -39,13 +39,13 @@ public : // \ru Действия при конвертации владельца. \en Actions when converting the owner. virtual void OnConvertOwner( const MbAttributeContainer & owner, MbAttributeContainer & other ); /// \ru Действия при трансформировании владельца. \en Actions when transforming the owner. - virtual void OnTransformOwner( const MbAttributeContainer & owner, const MbMatrix3D &, MbRegTransform * = c3d_null ); + virtual void OnTransformOwner( const MbAttributeContainer & owner, const MbMatrix3D &, MbRegTransform * = NULL ); // \ru Действия при перемещении владельца. \en Actions when moving the owner. - virtual void OnMoveOwner( const MbAttributeContainer & owner, const MbVector3D &, MbRegTransform * = c3d_null ); + virtual void OnMoveOwner( const MbAttributeContainer & owner, const MbVector3D &, MbRegTransform * = NULL ); // \ru Действия при вращении владельца. \en Actions when rotating the owner. - virtual void OnRotateOwner( const MbAttributeContainer & owner, const MbAxis3D &, double angle, MbRegTransform * = c3d_null ); + virtual void OnRotateOwner( const MbAttributeContainer & owner, const MbAxis3D &, double angle, MbRegTransform * = NULL ); // \ru Действия при копировании владельца. \en Actions when copying the owner. - virtual void OnCopyOwner( const MbAttributeContainer & owner, MbAttributeContainer & other, MbRegDuplicate * = c3d_null ); + virtual void OnCopyOwner( const MbAttributeContainer & owner, MbAttributeContainer & other, MbRegDuplicate * = NULL ); // \ru Действия при объединении владельца. \en Actions when merging the owner. virtual void OnMergeOwner( const MbAttributeContainer & owner, MbAttributeContainer & other ); // \ru Действия при замене владельца. \en Actions when replacing the owner. diff --git a/C3d/Include/attr_flange_attribute.h b/C3d/Include/attr_flange_attribute.h index a7b62bc..74c3a00 100644 --- a/C3d/Include/attr_flange_attribute.h +++ b/C3d/Include/attr_flange_attribute.h @@ -43,20 +43,20 @@ public: // \ru Выдать подтип атрибута. \en Get subtype of an attribute. virtual MbeAttributeType AttributeType() const; // \ru Сделать копию элемента. \en Create a copy of the element. - virtual MbAttribute & Duplicate( MbRegDuplicate * = c3d_null ) const; + virtual MbAttribute & Duplicate( MbRegDuplicate * = NULL ) const; // \ru Определить, являются ли объекты равными. \en Determine whether objects are equal. virtual bool IsSame( const MbAttribute &, double accuracy ) const; // \ru Инициализировать данные по присланным. \en Initialize data. virtual bool Init( const MbAttribute & ); // \ru Выполнить действия при трансформировании владельца. \en Perform actions when transforming the owner. - virtual void OnTransformOwner( const MbAttributeContainer & owner, const MbMatrix3D &, MbRegTransform * = c3d_null ); + virtual void OnTransformOwner( const MbAttributeContainer & owner, const MbMatrix3D &, MbRegTransform * = NULL ); // \ru Выполнить действия при перемещении владельца. \en Perform actions when moving the owner. - virtual void OnMoveOwner( const MbAttributeContainer & owner, const MbVector3D &, MbRegTransform * = c3d_null ); + virtual void OnMoveOwner( const MbAttributeContainer & owner, const MbVector3D &, MbRegTransform * = NULL ); // \ru Выполнить действия при вращении владельца. \en Perform actions when rotating the owner. - virtual void OnRotateOwner( const MbAttributeContainer & owner, const MbAxis3D &, double angle, MbRegTransform * = c3d_null ); + virtual void OnRotateOwner( const MbAttributeContainer & owner, const MbAxis3D &, double angle, MbRegTransform * = NULL ); // \ru Выполнить действия при копировании владельца. \en Perform actions when copying the owner. - virtual void OnCopyOwner( const MbAttributeContainer & owner, MbAttributeContainer & other, MbRegDuplicate * = c3d_null ); + virtual void OnCopyOwner( const MbAttributeContainer & owner, MbAttributeContainer & other, MbRegDuplicate * = NULL ); // \ru Выполнить действия при объединении владельца. \en Perform actions when merging the owner. virtual void OnMergeOwner( const MbAttributeContainer & owner, MbAttributeContainer & other ); diff --git a/C3d/Include/attr_geometric_attribute.h b/C3d/Include/attr_geometric_attribute.h index e229a30..05968b1 100644 --- a/C3d/Include/attr_geometric_attribute.h +++ b/C3d/Include/attr_geometric_attribute.h @@ -52,19 +52,19 @@ public: // \ru Выдать подтип атрибута. \en Get subtype of an attribute. virtual MbeAttributeType AttributeType() const; // \ru Сделать копию элемента. \en Create a copy of the element. - virtual MbAttribute & Duplicate( MbRegDuplicate * = c3d_null ) const; + virtual MbAttribute & Duplicate( MbRegDuplicate * = NULL ) const; // \ru Определить, являются ли объекты равными. \en Determine whether objects are equal. virtual bool IsSame( const MbAttribute &, double accuracy ) const; // \ru Инициализировать данные по присланным. \en Initialize data. virtual bool Init( const MbAttribute & ); // \ru Выполнить действия при трансформировании владельца. \en Perform actions when transforming the owner. - virtual void OnTransformOwner( const MbAttributeContainer & owner, const MbMatrix3D &, MbRegTransform * = c3d_null ); + virtual void OnTransformOwner( const MbAttributeContainer & owner, const MbMatrix3D &, MbRegTransform * = NULL ); // \ru Выполнить действия при перемещении владельца. \en Perform actions when moving the owner. - virtual void OnMoveOwner( const MbAttributeContainer & owner, const MbVector3D &, MbRegTransform * = c3d_null ); + virtual void OnMoveOwner( const MbAttributeContainer & owner, const MbVector3D &, MbRegTransform * = NULL ); // \ru Выполнить действия при вращении владельца. \en Perform actions when rotating the owner. - virtual void OnRotateOwner( const MbAttributeContainer & owner, const MbAxis3D &, double angle, MbRegTransform * = c3d_null ); + virtual void OnRotateOwner( const MbAttributeContainer & owner, const MbAxis3D &, double angle, MbRegTransform * = NULL ); // \ru Выполнить действия при копировании владельца. \en Perform actions when copying the owner. - virtual void OnCopyOwner( const MbAttributeContainer & owner, MbAttributeContainer & other, MbRegDuplicate * = c3d_null ); + virtual void OnCopyOwner( const MbAttributeContainer & owner, MbAttributeContainer & other, MbRegDuplicate * = NULL ); // \ru Выполнить действия при объединении владельца. \en Perform actions when merging the owner. virtual void OnMergeOwner( const MbAttributeContainer & owner, MbAttributeContainer & other ); diff --git a/C3d/Include/attr_identifier.h b/C3d/Include/attr_identifier.h index 637b918..adfe68e 100644 --- a/C3d/Include/attr_identifier.h +++ b/C3d/Include/attr_identifier.h @@ -39,7 +39,7 @@ public : // \ru Общие функции объекта. \en Common functions of object. virtual MbeAttributeType AttributeType() const; // \ru Дать подтип атрибута. \en Get subtype of an attribute. - virtual MbAttribute & Duplicate( MbRegDuplicate * = c3d_null ) const; // \ru Сделать копию элемента. \en Create a copy of the element. + virtual MbAttribute & Duplicate( MbRegDuplicate * = NULL ) const; // \ru Сделать копию элемента. \en Create a copy of the element. virtual bool IsSame( const MbAttribute &, double accuracy ) const; // \ru Определить, являются ли объекты равными. \en Determine whether objects are equal. virtual bool Init( const MbAttribute & ); // \ru Инициализировать данные по присланным. \en Initialize data. virtual void GetProperties( MbProperties & ); // \ru Выдать свойства объекта. \en Get properties of the object. @@ -92,7 +92,7 @@ public : // \ru Общие функции объекта \en Common functions of object. virtual MbeAttributeType AttributeType() const; // \ru Дать подтип атрибута. \en Get subtype of an attribute. - virtual MbAttribute & Duplicate( MbRegDuplicate * = c3d_null ) const; // \ru Сделать копию элемента. \en Create a copy of the element. + virtual MbAttribute & Duplicate( MbRegDuplicate * = NULL ) const; // \ru Сделать копию элемента. \en Create a copy of the element. virtual bool IsSame( const MbAttribute &, double accuracy ) const; // \ru Определить, являются ли объекты равными. \en Determine whether objects are equal. virtual bool Init( const MbAttribute & ); // \ru Инициализировать данные по присланным. \en Initialize data. @@ -159,7 +159,7 @@ public : // \ru Общие функции объекта \en Common functions of object virtual MbeAttributeType AttributeType() const; // \ru Дать подтип атрибута. \en Get subtype of an attribute. - virtual MbAttribute & Duplicate( MbRegDuplicate * = c3d_null ) const; // \ru Сделать копию элемента. \en Create a copy of the element. + virtual MbAttribute & Duplicate( MbRegDuplicate * = NULL ) const; // \ru Сделать копию элемента. \en Create a copy of the element. virtual bool IsSame( const MbAttribute &, double accuracy ) const; // \ru Определить, являются ли объекты равными. \en Determine whether objects are equal. virtual bool Init( const MbAttribute & ); // \ru Инициализировать данные по присланным. \en Initialize data. @@ -221,7 +221,7 @@ public : virtual MbeAttributeType AttributeFamily() const; // \ru Дать тип атрибута. \en Get type of an attribute. virtual MbeAttributeType AttributeType() const; // \ru Дать подтип атрибута. \en Get subtype of an attribute. - virtual MbAttribute & Duplicate( MbRegDuplicate * = c3d_null ) const; // \ru Сделать копию элемента. \en Create a copy of the element. + virtual MbAttribute & Duplicate( MbRegDuplicate * = NULL ) const; // \ru Сделать копию элемента. \en Create a copy of the element. virtual bool IsSame( const MbAttribute &, double accuracy ) const; // \ru Определить, являются ли объекты равными. \en Determine whether objects are equal. virtual bool Init( const MbAttribute & ); // \ru Инициализировать данные по присланным. \en Initialize data. @@ -233,13 +233,13 @@ public : // \ru Выполнить действия при конвертации владельца \en Perform actions when converting the owner. virtual void OnConvertOwner( const MbAttributeContainer & owner, MbAttributeContainer & other ); // \ru Выполнить действия при трансформировании владельца. \en Perform actions when transforming the owner. - virtual void OnTransformOwner( const MbAttributeContainer & owner, const MbMatrix3D &, MbRegTransform * = c3d_null ); + virtual void OnTransformOwner( const MbAttributeContainer & owner, const MbMatrix3D &, MbRegTransform * = NULL ); // \ru Выполнить действия при перемещении владельца. \en Perform actions when moving the owner. - virtual void OnMoveOwner( const MbAttributeContainer & owner, const MbVector3D &, MbRegTransform * = c3d_null ); + virtual void OnMoveOwner( const MbAttributeContainer & owner, const MbVector3D &, MbRegTransform * = NULL ); // \ru Выполнить действия при вращении владельца. \en Perform actions when rotating the owner. - virtual void OnRotateOwner( const MbAttributeContainer & owner, const MbAxis3D &, double angle, MbRegTransform * = c3d_null ); + virtual void OnRotateOwner( const MbAttributeContainer & owner, const MbAxis3D &, double angle, MbRegTransform * = NULL ); // \ru Выполнить действия при копировании владельца. \en Perform actions when copying the owner. - virtual void OnCopyOwner( const MbAttributeContainer & owner, MbAttributeContainer & other, MbRegDuplicate * = c3d_null ); + virtual void OnCopyOwner( const MbAttributeContainer & owner, MbAttributeContainer & other, MbRegDuplicate * = NULL ); // \ru Выполнить действия при объединении владельца. \en Perform actions when merging the owner. virtual void OnMergeOwner( const MbAttributeContainer & owner, MbAttributeContainer & other ); // \ru Выполнить действия при замене владельца. \en Perform actions when replacing the owner. @@ -289,7 +289,7 @@ public: // \ru Общие функции объекта. \en Common functions of object. virtual MbeAttributeType AttributeType() const; // \ru Дать подтип атрибута. \en Get subtype of an attribute. - virtual MbAttribute & Duplicate( MbRegDuplicate * = c3d_null ) const; // \ru Сделать копию элемента. \en Create a copy of the element. + virtual MbAttribute & Duplicate( MbRegDuplicate * = NULL ) const; // \ru Сделать копию элемента. \en Create a copy of the element. virtual bool IsSame( const MbAttribute &, double ) const; // \ru Определить, являются ли объекты равными. \en Determine whether objects are equal. virtual bool Init( const MbAttribute & ); // \ru Инициализировать данные по атрибуту. \en Initialize by attribute. virtual void GetProperties( MbProperties & ); // \ru Выдать свойства объекта. \en Get properties of the object. diff --git a/C3d/Include/attr_product.h b/C3d/Include/attr_product.h index 5dad842..2132e73 100644 --- a/C3d/Include/attr_product.h +++ b/C3d/Include/attr_product.h @@ -37,7 +37,7 @@ public : // Выдать подтип атрибута (временно). virtual MbeAttributeType AttributeType() const = 0; // Сделать копию элемента. - virtual MbAttribute & Duplicate( MbRegDuplicate * = c3d_null ) const = 0; + virtual MbAttribute & Duplicate( MbRegDuplicate * = NULL ) const = 0; virtual bool IsSame( const MbAttribute &, double accuracy ) const = 0; // \ru Определить, являются ли объекты равными. \en Determine whether objects are equal. // Инициализировать данные по присланным. virtual bool Init( const MbAttribute & ) = 0; @@ -49,13 +49,13 @@ public : // Действия при конвертации владельца. virtual void OnConvertOwner( const MbAttributeContainer & owner, MbAttributeContainer & other ); // Действия при трансформировании владельца. - virtual void OnTransformOwner( const MbAttributeContainer & owner, const MbMatrix3D &, MbRegTransform * = c3d_null ); + virtual void OnTransformOwner( const MbAttributeContainer & owner, const MbMatrix3D &, MbRegTransform * = NULL ); // Действия при перемещении владельца. - virtual void OnMoveOwner( const MbAttributeContainer & owner, const MbVector3D &, MbRegTransform * = c3d_null ); + virtual void OnMoveOwner( const MbAttributeContainer & owner, const MbVector3D &, MbRegTransform * = NULL ); // Действия при вращении владельца. - virtual void OnRotateOwner( const MbAttributeContainer & owner, const MbAxis3D &, double angle, MbRegTransform * = c3d_null ); + virtual void OnRotateOwner( const MbAttributeContainer & owner, const MbAxis3D &, double angle, MbRegTransform * = NULL ); // Действия при копировании владельца. - virtual void OnCopyOwner( const MbAttributeContainer & owner, MbAttributeContainer & other, MbRegDuplicate * = c3d_null ); + virtual void OnCopyOwner( const MbAttributeContainer & owner, MbAttributeContainer & other, MbRegDuplicate * = NULL ); // Действия при объединении владельца. virtual void OnMergeOwner( const MbAttributeContainer & owner, MbAttributeContainer & other ); // Действия при замене владельца. @@ -100,7 +100,7 @@ public : // Выдать подтип атрибута (временно). virtual MbeAttributeType AttributeType() const; // Сделать копию элемента. - virtual MbAttribute & Duplicate( MbRegDuplicate * = c3d_null ) const; + virtual MbAttribute & Duplicate( MbRegDuplicate * = NULL ) const; virtual bool IsSame( const MbAttribute &, double accuracy ) const; // Определить, являются ли объекты равными. // Инициализировать данные по присланным. virtual bool Init( const MbAttribute & ) ; @@ -319,7 +319,7 @@ public : // Выдать подтип атрибута (временно). virtual MbeAttributeType AttributeType() const; // Сделать копию элемента. - virtual MbAttribute & Duplicate( MbRegDuplicate * = c3d_null ) const ; + virtual MbAttribute & Duplicate( MbRegDuplicate * = NULL ) const ; virtual bool IsSame( const MbAttribute &, double accuracy ) const; // Определить, являются ли объекты равными. // Инициализировать данные по присланным. virtual bool Init( const MbAttribute & ) ; diff --git a/C3d/Include/attr_selected.h b/C3d/Include/attr_selected.h index f808f21..da48371 100644 --- a/C3d/Include/attr_selected.h +++ b/C3d/Include/attr_selected.h @@ -37,7 +37,7 @@ public : // \ru Общие функции объекта. \en Common functions of object. virtual MbeAttributeType AttributeType() const; // \ru Дать подтип атрибута. \en Get subtype of an attribute. - virtual MbAttribute & Duplicate( MbRegDuplicate * = c3d_null ) const; // \ru Сделать копию элемента. \en Create a copy of the element. + virtual MbAttribute & Duplicate( MbRegDuplicate * = NULL ) const; // \ru Сделать копию элемента. \en Create a copy of the element. virtual bool IsSame( const MbAttribute &, double accuracy ) const; // \ru Определить, являются ли объекты равными. \en Determine whether objects are equal. virtual bool Init( const MbAttribute & ); // \ru Инициализировать данные по присланным. \en Initialize data by given attribute. @@ -83,7 +83,7 @@ public : // \ru Общие функции объекта. \en Common functions of object. virtual MbeAttributeType AttributeType() const; // \ru Дать подтип атрибута. \en Get subtype of an attribute. - virtual MbAttribute & Duplicate( MbRegDuplicate * = c3d_null ) const; // \ru Сделать копию элемента. \en Create a copy of the element. + virtual MbAttribute & Duplicate( MbRegDuplicate * = NULL ) const; // \ru Сделать копию элемента. \en Create a copy of the element. virtual bool IsSame( const MbAttribute &, double accuracy ) const; // \ru Определить, являются ли объекты равными. \en Determine whether objects are equal. virtual bool Init( const MbAttribute & ); // \ru Инициализировать данные по присланным. \en Initialize data by given attribute. @@ -129,7 +129,7 @@ public : // \ru Общие функции объекта. \en Common functions of object. virtual MbeAttributeType AttributeType() const; // \ru Дать подтип атрибута. \en Get subtype of an attribute. - virtual MbAttribute & Duplicate( MbRegDuplicate * = c3d_null ) const; // \ru Сделать копию элемента. \en Create a copy of the element. + virtual MbAttribute & Duplicate( MbRegDuplicate * = NULL ) const; // \ru Сделать копию элемента. \en Create a copy of the element. virtual bool IsSame( const MbAttribute &, double accuracy ) const; // \ru Определить, являются ли объекты равными. \en Determine whether objects are equal. virtual bool Init( const MbAttribute & ); // \ru Инициализировать данные по присланным. \en Initialize data by given attribute. diff --git a/C3d/Include/attr_stamprib_attribute.h b/C3d/Include/attr_stamprib_attribute.h index 1833d3e..73c787e 100644 --- a/C3d/Include/attr_stamprib_attribute.h +++ b/C3d/Include/attr_stamprib_attribute.h @@ -49,20 +49,20 @@ public: // \ru Выдать подтип атрибута. \en Get subtype of an attribute. virtual MbeAttributeType AttributeType() const; // \ru Сделать копию элемента. \en Create a copy of the element. - virtual MbAttribute & Duplicate( MbRegDuplicate * = c3d_null ) const; + virtual MbAttribute & Duplicate( MbRegDuplicate * = NULL ) const; // \ru Определить, являются ли объекты равными. \en Determine whether objects are equal. virtual bool IsSame( const MbAttribute &, double accuracy ) const; // \ru Инициализировать данные по присланным. \en Initialize data. virtual bool Init( const MbAttribute & ); // \ru Выполнить действия при трансформировании владельца. \en Perform actions when transforming the owner. - virtual void OnTransformOwner( const MbAttributeContainer & owner, const MbMatrix3D &, MbRegTransform * = c3d_null ); + virtual void OnTransformOwner( const MbAttributeContainer & owner, const MbMatrix3D &, MbRegTransform * = NULL ); // \ru Выполнить действия при перемещении владельца. \en Perform actions when moving the owner. - virtual void OnMoveOwner( const MbAttributeContainer & owner, const MbVector3D &, MbRegTransform * = c3d_null ); + virtual void OnMoveOwner( const MbAttributeContainer & owner, const MbVector3D &, MbRegTransform * = NULL ); // \ru Выполнить действия при вращении владельца. \en Perform actions when rotating the owner. - virtual void OnRotateOwner( const MbAttributeContainer & owner, const MbAxis3D &, double angle, MbRegTransform * = c3d_null ); + virtual void OnRotateOwner( const MbAttributeContainer & owner, const MbAxis3D &, double angle, MbRegTransform * = NULL ); // \ru Выполнить действия при копировании владельца. \en Perform actions when copying the owner. - virtual void OnCopyOwner( const MbAttributeContainer & owner, MbAttributeContainer & other, MbRegDuplicate * = c3d_null ); + virtual void OnCopyOwner( const MbAttributeContainer & owner, MbAttributeContainer & other, MbRegDuplicate * = NULL ); // \ru Выполнить действия при объединении владельца. \en Perform actions when merging the owner. virtual void OnMergeOwner( const MbAttributeContainer & owner, MbAttributeContainer & other ); diff --git a/C3d/Include/attr_user_attribute.h b/C3d/Include/attr_user_attribute.h index ecb3a9d..e986818 100644 --- a/C3d/Include/attr_user_attribute.h +++ b/C3d/Include/attr_user_attribute.h @@ -108,7 +108,7 @@ public: /// \ru Выдать подтип пользовательского атрибута по пользовательскому типу. \en Get subtype of an user attribute by user-defined type. static MbeAttributeType AttributeType( const MbUserAttribType & userType ); - virtual MbAttribute & Duplicate( MbRegDuplicate * = c3d_null ) const; // \ru Сделать копию элемента. \en Create a copy of the element. + virtual MbAttribute & Duplicate( MbRegDuplicate * = NULL ) const; // \ru Сделать копию элемента. \en Create a copy of the element. virtual bool IsSame( const MbAttribute &, double accuracy ) const; // \ru Определить, являются ли объекты равными. \en Determine whether objects are equal. virtual bool Init( const MbAttribute & ); // \ru Инициализировать данные по присланным. \en Initialize data by given attribute. @@ -117,13 +117,13 @@ public: // \ru Выполнить действия при конвертации владельца \en Perform actions when converting the owner virtual void OnConvertOwner( const MbAttributeContainer & owner, MbAttributeContainer & other ); // \ru Выполнить действия при трансформировании владельца \en Perform actions when transforming the owner - virtual void OnTransformOwner( const MbAttributeContainer & owner, const MbMatrix3D &, MbRegTransform * = c3d_null ); + virtual void OnTransformOwner( const MbAttributeContainer & owner, const MbMatrix3D &, MbRegTransform * = NULL ); // \ru Выполнить действия при перемещении владельца. \en Perform actions when moving the owner. - virtual void OnMoveOwner( const MbAttributeContainer & owner, const MbVector3D &, MbRegTransform * = c3d_null ); + virtual void OnMoveOwner( const MbAttributeContainer & owner, const MbVector3D &, MbRegTransform * = NULL ); // \ru Выполнить действия при вращении владельца. \en Perform actions when rotating the owner. - virtual void OnRotateOwner( const MbAttributeContainer & owner, const MbAxis3D &, double angle, MbRegTransform * = c3d_null ); + virtual void OnRotateOwner( const MbAttributeContainer & owner, const MbAxis3D &, double angle, MbRegTransform * = NULL ); // \ru Выполнить действия при копировании владельца \en Perform actions when copying the owner. - virtual void OnCopyOwner( const MbAttributeContainer & owner, MbAttributeContainer & other, MbRegDuplicate * = c3d_null ); + virtual void OnCopyOwner( const MbAttributeContainer & owner, MbAttributeContainer & other, MbRegDuplicate * = NULL ); // \ru Выполнить действия при объединении владельца \en Perform actions when merging the owner. virtual void OnMergeOwner( const MbAttributeContainer & owner, MbAttributeContainer & other ); // \ru Выполнить действия при замене владельца. \en Perform actions when replacing the owner. @@ -197,7 +197,7 @@ public : /// \ru Выдать подтип атрибута. \en Get subtype of an attribute. virtual MbUserAttribType AttrTypeEx() const = 0; - virtual MbAttribute & Duplicate( MbRegDuplicate * = c3d_null ) const = 0; // \ru Сделать копию элемента. \en Create a copy of the element. + virtual MbAttribute & Duplicate( MbRegDuplicate * = NULL ) const = 0; // \ru Сделать копию элемента. \en Create a copy of the element. virtual bool IsSame( const MbAttribute &, double accuracy ) const = 0; // \ru Определить, являются ли объекты равными. \en Determine whether objects are equal. virtual bool Init( const MbAttribute & ) = 0; // \ru Инициализировать данные по присланным. \en Initialize data. @@ -206,13 +206,13 @@ public : // \ru Выполнить действия при конвертации владельца. \en Perform actions when converting the owner. virtual void OnConvertOwner( const MbAttributeContainer & owner, MbAttributeContainer & other ); // \ru Выполнить действия при трансформировании владельца. \en Perform actions when transforming the owner. - virtual void OnTransformOwner( const MbAttributeContainer & owner, const MbMatrix3D &, MbRegTransform * = c3d_null ); + virtual void OnTransformOwner( const MbAttributeContainer & owner, const MbMatrix3D &, MbRegTransform * = NULL ); // \ru Выполнить действия при перемещении владельца. \en Perform actions when moving the owner. - virtual void OnMoveOwner( const MbAttributeContainer & owner, const MbVector3D &, MbRegTransform * = c3d_null ); + virtual void OnMoveOwner( const MbAttributeContainer & owner, const MbVector3D &, MbRegTransform * = NULL ); // \ru Выполнить действия при вращении владельца. \en Perform actions when rotating the owner. - virtual void OnRotateOwner( const MbAttributeContainer & owner, const MbAxis3D &, double angle, MbRegTransform * = c3d_null ); + virtual void OnRotateOwner( const MbAttributeContainer & owner, const MbAxis3D &, double angle, MbRegTransform * = NULL ); // \ru Выполнить действия при копировании владельца. \en Perform actions when copying the owner. - virtual void OnCopyOwner( const MbAttributeContainer & owner, MbAttributeContainer & other, MbRegDuplicate * = c3d_null ); + virtual void OnCopyOwner( const MbAttributeContainer & owner, MbAttributeContainer & other, MbRegDuplicate * = NULL ); // \ru Выполнить действия при объединении владельца. \en Perform actions when merging the owner. virtual void OnMergeOwner( const MbAttributeContainer & owner, MbAttributeContainer & other ); // \ru Выполнить действия при замене владельца. \en Perform actions when replacing the owner. @@ -256,7 +256,7 @@ public: /// \ru Выдать идентификатор атрибута. \en Get attribute identifier. const MbUserAttribType & GetUserAttrId() const { return userAttrId; } /// \ru Выдать атрибуты. \en Get attributes. - const MbAttribute * GetAttribute( size_t k ) const { return ((k < attributes.size()) ? attributes[k] : c3d_null); } + const MbAttribute * GetAttribute( size_t k ) const { return ((k < attributes.size()) ? attributes[k] : NULL); } // \ru Выдать количество атрибутов. \en Get the number of attributes. size_t AttributesCount() const { return attributes.size(); } @@ -300,7 +300,7 @@ MbUserAttribute * UserAttrDefinition::ReduceUserAttrib( const MbExter MbUserAttribute * resAttr = new MbUserAttribute( _T("AttrClass"), attrId ); resAttr->InitActions( source ); { - const char * charBuf = c3d_null; + const char * charBuf = NULL; size_t memLen = 0; { membuf memBuf; @@ -330,7 +330,7 @@ MbUserAttribute * UserAttrDefinition::ReduceUserAttrib( const MbExter template MbExternalAttribute * UserAttrDefinition::AdvanceUserAttrib( const MbUserAttribute & source ) { - AttrClass * resAttr = c3d_null; + AttrClass * resAttr = NULL; MbUserAttribType attrId; source.GetUserAttribId( attrId ); { @@ -360,7 +360,7 @@ MbExternalAttribute * UserAttrDefinition::AdvanceUserAttrib( const Mb // --- template MbFixAttrSet * UserAttrDefinition::DisassembleUserAttrib( const MbExternalAttribute & /*source*/ ) { - return c3d_null; + return NULL; } @@ -379,7 +379,7 @@ bool UserAttrDefinition::ReassembleUserAttrib( const MbFixAttrSet & / template UserAttrDefinitionInstance::UserAttrDefinitionInstance( const MbUserAttribType & type ) : AttrDefInstance( type ) - , attrDef( c3d_null ) + , attrDef( NULL ) { } @@ -390,7 +390,7 @@ UserAttrDefinitionInstance::UserAttrDefinitionInstance( const MbUs template UserAttrDefinitionInstance::~UserAttrDefinitionInstance() { - if ( attrDef != c3d_null ) + if ( attrDef != NULL ) delete attrDef; } @@ -401,7 +401,7 @@ UserAttrDefinitionInstance::~UserAttrDefinitionInstance() template IAttrDefinition * UserAttrDefinitionInstance::GetAttrDefinition() { - if ( attrDef == c3d_null ) { + if ( attrDef == NULL ) { ScopedLock ll( GetLock() ); attrDef = new AttrDefClass(); } diff --git a/C3d/Include/attribute.h b/C3d/Include/attribute.h index 379f4e8..4720c80 100644 --- a/C3d/Include/attribute.h +++ b/C3d/Include/attribute.h @@ -290,7 +290,7 @@ public : /// \ru Выдать подтип атрибута. \en Get subtype of an attribute. virtual MbeAttributeType AttributeType() const = 0; /// \ru Сделать копию элемента. \en Create a copy of the element. - virtual MbAttribute & Duplicate( MbRegDuplicate * iReg = c3d_null ) const = 0; + virtual MbAttribute & Duplicate( MbRegDuplicate * iReg = NULL ) const = 0; /** \brief \ru Определить, являются ли объекты равными. \en Determine whether objects are equal. \~ \details \ru Равными считаются однотипные объекты, все данные которых одинаковы (равны). @@ -335,7 +335,7 @@ public : \en Perform actions when transforming the owner, \n This function is called after transforming the owning object in a case when GetActionForTransform() == trn_Self. The registrator of transformed objects may be passed as input parameter. \~ */ - virtual void OnTransformOwner( const MbAttributeContainer & owner, const MbMatrix3D &, MbRegTransform * = c3d_null ) = 0; + virtual void OnTransformOwner( const MbAttributeContainer & owner, const MbMatrix3D &, MbRegTransform * = NULL ) = 0; /**\ru Выполнить действия при перемещении владельца. \n Вызывается после перемещения владеющего объекта при условии GetActionForTransform() == trn_Self. @@ -343,7 +343,7 @@ public : \en Perform actions when moving the owner. \n This function is called after moving the owning object in a case when GetActionForTransform() == trn_Self. The registrator of transformed objects may be passed as input parameter. \~ */ - virtual void OnMoveOwner( const MbAttributeContainer & owner, const MbVector3D &, MbRegTransform * = c3d_null ) = 0; + virtual void OnMoveOwner( const MbAttributeContainer & owner, const MbVector3D &, MbRegTransform * = NULL ) = 0; /**\ru Выполнить действия при вращении владельца. \n Вызывается после вращения владеющего объекта при условии GetActionForTransform() == trn_Self. @@ -351,7 +351,7 @@ public : \en Perform actions when rotating the owner. \n This function is called after rotating the owning object in a case when GetActionForTransform() == trn_Self. The registrator of transformed objects may be passed as input parameter. \~ */ - virtual void OnRotateOwner( const MbAttributeContainer & owner, const MbAxis3D &, double angle, MbRegTransform * = c3d_null ) = 0; + virtual void OnRotateOwner( const MbAttributeContainer & owner, const MbAxis3D &, double angle, MbRegTransform * = NULL ) = 0; /**\ru Выполнить действия при копировании владельца. \n Вызывается после копирования владеющего объекта при условии GetActionForCopy() == cpy_Self. \n @@ -359,7 +359,7 @@ public : \en Perform actions when copying the owner. \n This function is called after copying the owning object in a case when GetActionForCopy() == cpy_Self. \n The following objects are passed as input parameters: the owning object copy and registrator of copied objects. \~ */ - virtual void OnCopyOwner( const MbAttributeContainer & owner, MbAttributeContainer & other, MbRegDuplicate * = c3d_null ) = 0; + virtual void OnCopyOwner( const MbAttributeContainer & owner, MbAttributeContainer & other, MbRegDuplicate * = NULL ) = 0; /**\ru Выполнить действия при объединении владельца. \n Вызывается перед слиянием владельца при условии GetActionForMerge() == mrg_Self. \n diff --git a/C3d/Include/attribute_container.h b/C3d/Include/attribute_container.h index 3cac365..ad82ea5 100644 --- a/C3d/Include/attribute_container.h +++ b/C3d/Include/attribute_container.h @@ -169,13 +169,13 @@ public: /// \ru Выполнить действия при конвертации атрибутов. \en Perform actions when converting the attributes. void AttributesConvert( MbAttributeContainer & other ) const; /// \ru Выполнить действия при трансформировании атрибутов. \en Perform actions when transforming the attributes. - void AttributesTransform( const MbMatrix3D &, MbRegTransform * = c3d_null ); + void AttributesTransform( const MbMatrix3D &, MbRegTransform * = NULL ); /// \ru Выполнить действия при перемещении атрибутов. \en Perform actions when moving the attributes. - void AttributesMove ( const MbVector3D &, MbRegTransform * = c3d_null ); + void AttributesMove ( const MbVector3D &, MbRegTransform * = NULL ); /// \ru Выполнить действия при вращении атрибутов. \en Perform actions when rotating the attributes. - void AttributesRotate ( const MbAxis3D &, double angle, MbRegTransform * = c3d_null ); + void AttributesRotate ( const MbAxis3D &, double angle, MbRegTransform * = NULL ); /// \ru Выполнить действия при копировании атрибутов. \en Perform actions when copying the attributes. - void AttributesCopy ( MbAttributeContainer & other, MbRegDuplicate * = c3d_null ) const; + void AttributesCopy ( MbAttributeContainer & other, MbRegDuplicate * = NULL ) const; /// \ru Выполнить действия при объединении атрибутов. \en Perform actions when merging the attributes. void AttributesMerge ( MbAttributeContainer & other ); /// \ru Выполнить действия при замене атрибутов. \en Perform actions when replacing the attributes. @@ -226,7 +226,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 ) != c3d_null); } + bool IsColored() const { return (GetSimpleAttribute( at_Color ) != NULL); } /// \ru Изменить цвет объекта. \en Change color of the object. void SetColor( uint32 ); /// \ru Изменить цвет объекта (0-255). \en Change color of the object (0-255). @@ -317,7 +317,7 @@ MATH_FUNC (bool) GetCommonAttributes( const MbAttributeContainer & attrItem, con */ // --- MATH_FUNC (bool) AddCommonAttributes( const MbAttributeContainer & srcItem, MbeAttributeType attrType, const c3d::string_t & attrPrompt, - MbAttributeContainer & dstItem, c3d::AttrVector * bufAttrs = c3d_null ); + MbAttributeContainer & dstItem, c3d::AttrVector * bufAttrs = NULL ); //------------------------------------------------------------------------------ /** \brief \ru Удалить обобщенные атрибуты. diff --git a/C3d/Include/cdet_data.h b/C3d/Include/cdet_data.h index b101d50..657ae38 100644 --- a/C3d/Include/cdet_data.h +++ b/C3d/Include/cdet_data.h @@ -45,8 +45,8 @@ typedef const void * cdet_app_item; //---------------------------------------------------------------------------------------- // Constants //--- -const cdet_item CDET_NULL = c3d_null; ///< \ru Пустой объект набора для контроля столкновений. \en Empty object of the collision query set. -const cdet_app_item CDET_APP_NULL = c3d_null; ///< \ru "Нулевой" объект модели приложения. \en "Null object" of the client app. +const cdet_item CDET_NULL = C3D_NULL_PTR; ///< \ru Пустой объект набора для контроля столкновений. \en Empty object of the collision query set. +const cdet_app_item CDET_APP_NULL = C3D_NULL_PTR; ///< \ru "Нулевой" объект модели приложения. \en "Null object" of the client app. //---------------------------------------------------------------------------------------- // Base class to implement collision query details @@ -77,8 +77,8 @@ struct cdet_query const MbRefItem * refItem; const MbMatrix3D * wMatrix; geom_element() - : appItem( c3d_null ) - , refItem( c3d_null ) + : appItem( C3D_NULL_PTR ) + , refItem( C3D_NULL_PTR ) , wMatrix( &MbMatrix3D::identity ) {} }; @@ -117,7 +117,7 @@ struct cdet_query_result: public cdet_query private: static cback_res QueryFunc( cdet_query * query, message code, cback_data & ) { - C3D_ASSERT( c3d_null != query ); + C3D_ASSERT( C3D_NULL_PTR != query ); cdet_query_result * q = static_cast( query ); switch( code ) { @@ -162,7 +162,7 @@ private: { case CDET_QUERY_STARTED: // The collision query is started for all solids of the set { - q->first = q->second = c3d_null; + q->first = q->second = C3D_NULL_PTR; return CBACK_VOID; } case CDET_FINISHED: // A pair of solids is finished. @@ -358,7 +358,7 @@ public: MbCollisionFace( const MbFace & f ) : item( CDET_NULL ) , mathFace( &f ) - , partFace( c3d_null ) + , partFace( C3D_NULL_PTR ) {} const MbFace & Face() const { return *mathFace; } diff --git a/C3d/Include/cdet_utility.h b/C3d/Include/cdet_utility.h index f7ab039..0d5e68d 100644 --- a/C3d/Include/cdet_utility.h +++ b/C3d/Include/cdet_utility.h @@ -15,7 +15,6 @@ class MtRefItem; class MbItem; class MbSolid; -class MbMesh; class MbAssembly; struct MbLumpAndFaces; class MbCollisionDetector; @@ -156,7 +155,7 @@ public: /* // Use AppItem() insead this cdet_app_item Component( size_t solIdx ) const; // The func is deprecated. Instead, use CheckCollisions - cdet_result InterferenceDetect( void * formalPar = c3d_null ) const; + cdet_result InterferenceDetect( void * formalPar = C3D_NULL_PTR ) const; // The func is deprecated. Use SetDistanceTracking instead. void SetDistanceComputationObjects( const MbLumpAndFaces &, const MbLumpAndFaces & ); // The func is deprecated. Use AddSolid/AddItem instead. @@ -167,13 +166,6 @@ public: /* const MtRefItem * _ComputeBVTree( cdet_item ); private: - /** - \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 ); - /* \brief \ru Добавить объект геометрической модели в набор для контроля столкновений. \en Add an object of geometric model to the set of collision detection control. \~ @@ -197,7 +189,7 @@ inline cdet_result MbCollisionDetectionUtility::CheckCollisions() /// \ru Узел дерева объемов. \en A node of the bounding volume tree. typedef const MtRefItem * cdet_bvt_node; /// \ru Пустое дерево объемов. \en An empty bounding volume tree. -const cdet_bvt_node CDET_BVT_NULL = c3d_null; +const cdet_bvt_node CDET_BVT_NULL = C3D_NULL_PTR; /// \ru Пара ветвей поддерева объемов. \en A pair of branches of the bounding volume subtree. typedef std::pair cdet_bvt_pair; diff --git a/C3d/Include/check_geometry.h b/C3d/Include/check_geometry.h index a1efc4b..46e6fed 100644 --- a/C3d/Include/check_geometry.h +++ b/C3d/Include/check_geometry.h @@ -70,13 +70,13 @@ public: public: /// \ru Пересечение - есть тело. \en Intersection is a solid. - bool IsSolid() const { return ((solid != c3d_null) || (isSolid && !edges.empty())); } + bool IsSolid() const { return ((solid != NULL) || (isSolid && !edges.empty())); } /// \ru Пересечение касательной областью поверхности. \en Intersection by a tangent region of a surface. bool IsSurface() const { return !isTangentCurve && !edges.empty(); } /// \ru Пересечение вдоль касательной линии. \en Intersection along a tangent line. bool IsCurve() const { return isTangentCurve && !edges.empty(); } /// \ru Пересечение точкой (еще не реализовано). \en Intersection is a point (not implemented yet). - bool IsPoint() const { return ((pointFrame != c3d_null) && (pointFrame->GetVerticesCount() > 0)); } + bool IsPoint() const { return ((pointFrame != NULL) && (pointFrame->GetVerticesCount() > 0)); } /// \ru Установить флаг пересечения вдоль касательной линии. \en Set the flag of intersection along a tangent line. //void SetTangent( bool b ) { isTangentCurve = b; } @@ -92,7 +92,7 @@ public: template void GetCurves( EdgesVector & curves ) const; /// \ru Получить указатель на кривую пересечения по индексу. \en Get a pointer to an intersection curve by the index. - const MbCurveEdge * GetCurve( size_t k ) const { return ((k < edges.size()) ? edges[k].get() : c3d_null); } + const MbCurveEdge * GetCurve( size_t k ) const { return ((k < edges.size()) ? edges[k].get() : NULL); } /// \ru Получить номера касающихся граней первого/второго тела. \en Get numbers concerning faces of the first/second solid. template void GetFaceNumbers( bool first, OutputIndicesVector & ) const; @@ -101,7 +101,7 @@ public: void GetFaceNumbersPairs( OutputIndicesPairsVector & ) const; /// \ru Количество точек касания. \en The number of touch points. - size_t GetPointsCount() const { return ((pointFrame != c3d_null) ? pointFrame->GetVerticesCount() : 0); } + size_t GetPointsCount() const { return ((pointFrame != NULL) ? pointFrame->GetVerticesCount() : 0); } /// \ru Получить набор точек касания. \en Get a set of touch points. const MbPointFrame * GetPointFrame() const { return pointFrame; } @@ -117,8 +117,8 @@ MbShellsIntersectionData::MbShellsIntersectionData( const EdgesVector & initEdge : edges ( ) , faceIndices1 ( ) , faceIndices2 ( ) - , solid ( c3d_null ) - , pointFrame ( c3d_null ) + , solid ( NULL ) + , pointFrame ( NULL ) , isTangentCurve( false ) , isSolid ( isSolidEgdes ) { @@ -127,7 +127,7 @@ MbShellsIntersectionData::MbShellsIntersectionData( const EdgesVector & initEdge c3d::EdgeSPtr edge; edges.reserve( addCnt ); for ( size_t k = 0; k < addCnt; ++k ) { - if ( initEdges[k] != c3d_null ) { + if ( initEdges[k] != NULL ) { edge = const_cast( &(*initEdges[k]) ); edges.push_back( edge ); } @@ -146,8 +146,8 @@ MbShellsIntersectionData::MbShellsIntersectionData( const EdgesVector & in : edges ( ) , faceIndices1 ( ) , faceIndices2 ( ) - , solid ( c3d_null ) - , pointFrame ( c3d_null ) + , solid ( NULL ) + , pointFrame ( NULL ) , isTangentCurve( false ) , isSolid ( false ) { @@ -157,7 +157,7 @@ MbShellsIntersectionData::MbShellsIntersectionData( const EdgesVector & in c3d::EdgeSPtr edge; edges.reserve( edgesCnt ); for ( size_t k = 0; k < edgesCnt; ++k ) { - if ( initEdges[k] != c3d_null ) { + if ( initEdges[k] != NULL ) { edge = const_cast(&(*initEdges[k])); edges.push_back( edge ); } @@ -177,8 +177,8 @@ MbShellsIntersectionData::MbShellsIntersectionData( const EdgesVector & : edges ( ) , faceIndices1 ( ) , faceIndices2 ( ) - , solid ( c3d_null ) - , pointFrame ( c3d_null ) + , solid ( NULL ) + , pointFrame ( NULL ) , isTangentCurve( false ) , isSolid ( false ) { @@ -189,7 +189,7 @@ MbShellsIntersectionData::MbShellsIntersectionData( const EdgesVector & edges.reserve( edgesCnt ); size_t k; for ( k = 0; k < edgesCnt; ++k ) { - if ( initEdges[k] != c3d_null ) { + if ( initEdges[k] != NULL ) { edge = const_cast(&(*initEdges[k])); edges.push_back( edge ); } @@ -340,9 +340,9 @@ bool CheckBoundaryEdges( const Edges & allEdges, Edges * boundaryEdges ) if ( boundaryEdges != &allEdges ) { for ( size_t i = 0, cnt = allEdges.size(); i < cnt; ++i ) { - if ( allEdges[i] != c3d_null && allEdges[i]->IsBoundaryFace( METRIC_PRECISION ) ) { + if ( allEdges[i] != NULL && allEdges[i]->IsBoundaryFace( METRIC_PRECISION ) ) { isBoundary = true; - if ( boundaryEdges != c3d_null ) + if ( boundaryEdges != NULL ) boundaryEdges->push_back( allEdges[i] ); else break; @@ -415,9 +415,9 @@ bool CheckInexactVertices( const Vertices & vertArr, double mAcc, Vertices * ine if ( inexactVerts != &vertArr ) { for ( size_t i = 0, icnt = vertArr.size(); i < icnt; ++i ) { MbVertex * v = vertArr[i]; - if ( v != c3d_null && v->GetTolerance() > mAcc ) { + if ( v != NULL && v->GetTolerance() > mAcc ) { isInexactVertex = true; - if ( inexactVerts != c3d_null ) + if ( inexactVerts != NULL ) inexactVerts->push_back( v ); else break; @@ -480,12 +480,12 @@ bool CheckInexactEdges( const Edges & allEdges, double mAcc, Edges * inexactEdge bool isInexactEdge = false; for ( size_t i = 0, icnt = allEdges.size(); i < icnt; ++i ) { - if ( allEdges[i] != c3d_null) { + if ( allEdges[i] != NULL) { bool isSpaceNear = !::IsInexactEdge( *allEdges[i], mAcc ); if ( !isSpaceNear ) { isInexactEdge = true; - if ( inexactEdges != c3d_null ) + if ( inexactEdges != NULL ) inexactEdges->push_back( allEdges[i] ); else break; @@ -498,7 +498,7 @@ bool CheckInexactEdges( const Edges & allEdges, double mAcc, Edges * inexactEdge double mLen = allEdges[i]->GetLengthEvaluation(); if ( mLen > METRIC_PRECISION && mLen > mTol + METRIC_PRECISION ) { isInexactEdge = true; - if ( inexactEdges != c3d_null ) + if ( inexactEdges != NULL ) inexactEdges->push_back( allEdges[i] ); else break; @@ -797,26 +797,10 @@ MATH_FUNC( bool ) RepairEdges( MbFaceShell & shell, bool updateFacesBounds = tru //------------------------------------------------------------------------------ /** \brief \ru Устранить наличие общих подложек поверхностей. \en Remove common surface substrates. \~ - \details \ru Найти и устранить общие поверхности-подложки в гранях оболочки. \n - \en Find and eliminate common underlying surfaces of a shell faces. \n \~ - \param[in] shell - \ru Модифицируемая оболочка. - \en A shell to be modified. \~ - \return \ru Возвращает true, если была выполнена модификация оболочки. - \en Returns true if the shell modification was performed. \~ - \ingroup Algorithms_3D -*/ -// --- -DEPRECATE_DECLARE -MATH_FUNC( bool ) CheckIdenticalBaseSufaces( MbFaceShell & shell ); - - -//------------------------------------------------------------------------------ -/** \brief \ru Устранить наличие общих подложек поверхностей. - \en Remove common surface substrates. \~ - \details \ru Найти и устранить общие поверхности-подложки в гранях оболочки. \n - \en Find and eliminate common underlying surfaces of a shell faces. \n \~ - \param[in] shell - \ru Модифицируемая оболочка. - \en A shell to be modified. \~ + \details \ru Устранить наличие общих подложек поверхностей. \n + \en Remove common surface substrates. \n \~ + \param[in] shell - \ru Оболочка. + \en A shell. \~ \return \ru Возвращает true, если была выполнена модификация оболочки. \en Returns true if the shell modification was performed. \~ \ingroup Algorithms_3D diff --git a/C3d/Include/collection.h b/C3d/Include/collection.h index 36f6f05..57477b0 100644 --- a/C3d/Include/collection.h +++ b/C3d/Include/collection.h @@ -84,10 +84,10 @@ public: // \ru Общие функции геометрического объекта \en Common functions of a geometric object virtual MbeSpaceType IsA() const; // \ru Тип объекта. \en A type of an object. virtual MbeSpaceType Type() const; // \ru Групповой тип объекта. \en Group type of object. - virtual MbSpaceItem & Duplicate( MbRegDuplicate * = c3d_null ) const; // \ru Создать копию. \en Create a copy. - virtual void Transform( const MbMatrix3D &, MbRegTransform * = c3d_null ); // \ru Преобразовать согласно матрице. \en Transform according to the matrix. - virtual void Move ( const MbVector3D &, MbRegTransform * = c3d_null ); // \ru Сдвинуть вдоль вектора. \en Translate along a vector. - virtual void Rotate ( const MbAxis3D &, double angle, MbRegTransform * = c3d_null ); // \ru Повернуть вокруг оси. \en Rotate about an axis. + virtual MbSpaceItem & Duplicate( MbRegDuplicate * = NULL ) const; // \ru Создать копию. \en Create a copy. + virtual void Transform( const MbMatrix3D &, MbRegTransform * = NULL ); // \ru Преобразовать согласно матрице. \en Transform according to the matrix. + virtual void Move ( const MbVector3D &, MbRegTransform * = NULL ); // \ru Сдвинуть вдоль вектора. \en Translate along a vector. + virtual void Rotate ( const MbAxis3D &, double angle, MbRegTransform * = NULL ); // \ru Повернуть вокруг оси. \en Rotate about an axis. virtual bool IsSame ( const MbSpaceItem & init, double accuracy = LENGTH_EPSILON ) const; // \ru Являются ли объекты равными? \en Are the objects equal? virtual bool SetEqual ( const MbSpaceItem & init ); // \ru Сделать объекты равным. \en Make the objects equal. virtual double DistanceToPoint ( const MbCartPoint3D & ) const; // \ru Вычислить расстояние до точки. \en Calculate the distance to a point. diff --git a/C3d/Include/constraint.h b/C3d/Include/constraint.h index dca840d..b15f24f 100644 --- a/C3d/Include/constraint.h +++ b/C3d/Include/constraint.h @@ -42,8 +42,8 @@ public: public: MtGeomArgument( const MbRefItem * p, const MbItem * h ); MtGeomArgument( const MtGeomArgument & ); - MtGeomArgument() : propItem( c3d_null ), propName( c3d::UNDEFINED_SNAME ) - , hash( c3d::UNDEFINED_SNAME ), item( c3d_null ), root( c3d_null ) {} + MtGeomArgument() : propItem( NULL ), propName( c3d::UNDEFINED_SNAME ) + , hash( c3d::UNDEFINED_SNAME ), item( NULL ), root( NULL ) {} public: /** \brief \ru Получить непосредственный объект сборки, содержащий ссылочный объект. @@ -106,7 +106,7 @@ public: public: /// \ru Возвращает true, если ограничение не действительно. \en Return true if the constraint is invalid. - bool IsNull() const { return m_cItem == c3d_null; } + bool IsNull() const { return m_cItem == NULL; } /// \ru Тип сопряжения (геометрического ограничения). \en Type of geometric constraint. MtMateType ConstraintType() const; /// \ru Текущее значение размера. \en Current value of the dimension. diff --git a/C3d/Include/contour_graph.h b/C3d/Include/contour_graph.h index 9b6fe93..d4fdd11 100644 --- a/C3d/Include/contour_graph.h +++ b/C3d/Include/contour_graph.h @@ -38,8 +38,8 @@ public: /// \ru Конструктор по точке. \en Constructor by point. MpVertex( const MbCartPoint & initP ) : point( initP ) - , begEdge( c3d_null ) - , endEdge( c3d_null ) + , begEdge( NULL ) + , endEdge( NULL ) {} /// \ru Деструктор. \en Destructor. @@ -398,7 +398,7 @@ public: /// \ru Построить вершины. \en Construct vertices. void CreateVertices(); /// \ru Создать контур по циклу. \en Create a contour by the loop. - MbContour * MakeContour( double epsilon = METRIC_ACCURACY ) const; + MbContour * MakeContour() const; /** \} */ /**\ru \name Операции преобразования. @@ -737,7 +737,7 @@ IMPL_PERSISTENT_OPS( MpGraph ) */ // --- inline void DeleteVertex( MpVertex *& vertex ) { delete vertex; - vertex = c3d_null; + vertex = NULL; } @@ -751,7 +751,7 @@ inline void DeleteVertex( MpVertex *& vertex ) { */ // --- inline void DeleteEdge( MpEdge *& edge ) { delete edge; - edge = c3d_null; + edge = NULL; } @@ -765,7 +765,7 @@ inline void DeleteEdge( MpEdge *& edge ) { */ // --- inline void DeleteLoop( MpLoop *& loop ) { delete loop; - loop = c3d_null; + loop = NULL; } @@ -779,7 +779,7 @@ inline void DeleteLoop( MpLoop *& loop ) { */ // --- inline void DeleteGraph( MpGraph *& graph ) { delete graph; - graph = c3d_null; + graph = NULL; } @@ -848,7 +848,7 @@ MATH_FUNC (MpGraph *) EncloseContoursBuilder( const RPArray & curveLi double accuracy, bool strict, VERSION version, - IProgressIndicator * progInd = c3d_null ); + IProgressIndicator * progInd = NULL ); //------------------------------------------------------------------------------ @@ -886,7 +886,7 @@ MATH_FUNC (MpGraph *) OuterContoursBuilder( const RPArray & curveList, double accuracy, bool strict, VERSION version, - IProgressIndicator * progInd = c3d_null ); + IProgressIndicator * progInd = NULL ); //------------------------------------------------------------------------------ /** \brief \ru Перестроить контуры, построенные ранее вокруг точки. @@ -924,7 +924,7 @@ MATH_FUNC (MpGraph *) ContoursReconstructor( const RPArray & curveLis double accuracy, bool strict, VERSION version, - IProgressIndicator * progInd = c3d_null ); + IProgressIndicator * progInd = NULL ); #endif // __CONTOUR_GRAPH_H diff --git a/C3d/Include/conv_model_document.h b/C3d/Include/conv_model_document.h index 1250aeb..2f704a3 100644 --- a/C3d/Include/conv_model_document.h +++ b/C3d/Include/conv_model_document.h @@ -65,7 +65,7 @@ public: /** \brief \ru Прообраз новой интерфейсной функции - получить наполнение. \en Prototype of a new interface function - get the filling. \~ */ - virtual MbItem * GetContent() /*{ return c3d_null; }*/ = 0; + virtual MbItem * GetContent() /*{ return NULL; }*/ = 0; /** \brief \ru Создать документ с новой сборкой при импорте. \en Create a document with a new assembly while importing. \~ @@ -75,8 +75,8 @@ public: \en Assembly name. \~ \param[in] solids - \ru Тела, добавляемые в сборку. \en Solids to add into the assembly. \~ - \return \ru Экземпляр сборки, если операция прошла успешно, c3d_null в противном случае. - \en Instance of an assembly if the operation succeeded, c3d_null - otherwise. \~ + \return \ru Экземпляр сборки, если операция прошла успешно, NULL в противном случае. + \en Instance of an assembly if the operation succeeded, NULL - otherwise. \~ */ virtual ModelAssemblyPtr CreateAssembly( const c3d::ItemsSPtrVector & componentItems, const c3d::string_t& fileName ) = 0; @@ -89,8 +89,8 @@ public: \en Solids to add into a part. \~ \param[in] fileName - \ru Имя детали. \en A part name. \~ - \return \ru Экземпляр детали, если операция прошла успешно, c3d_null в противном случае. - \en Instance of the part if the operation succeeded, c3d_null - otherwise. \~ + \return \ru Экземпляр детали, если операция прошла успешно, NULL в противном случае. + \en Instance of the part if the operation succeeded, NULL - otherwise. \~ */ virtual ModelPartPtr CreatePart( const c3d::ItemsSPtrVector & componentItems, const c3d::string_t& fileName ) = 0; @@ -98,8 +98,8 @@ public: \en Get an assembly for export. \~ \details \ru Увеличить счётчик ссылок результирующей сборки на 1. \en Increase the reference counter of the resultant assembly by 1. \~ - \return \ru Экземпляр сборки, если операция прошла успешно, c3d_null в противном случае. - \en Instance of an assembly if the operation succeeded, c3d_null - otherwise. \~ + \return \ru Экземпляр сборки, если операция прошла успешно, NULL в противном случае. + \en Instance of an assembly if the operation succeeded, NULL - otherwise. \~ */ virtual ModelAssemblyPtr GetInstanceAssembly( ) = 0; @@ -108,8 +108,8 @@ public: \en Get the detail for export. \~ \details \ru Увеличить счётчик ссылок результирующей детали на 1. \en Increase the reference counter of the resultant part by 1. \~ - \return \ru Экземпляр детали, если операция прошла успешно, c3d_null в противном случае. - \en Instance of the part if the operation succeeded, c3d_null - otherwise. \~ + \return \ru Экземпляр детали, если операция прошла успешно, NULL в противном случае. + \en Instance of the part if the operation succeeded, NULL - otherwise. \~ */ virtual ModelPartPtr GetInstancePart( ) = 0; @@ -334,8 +334,8 @@ public: \en LCS of the assembly in the parent's model. \~ \param[in] fileName - \ru Имя сборки. \en Assembly name. \~ - \return \ru Экземпляр сборки, если операция прошла успешно, c3d_null в противном случае. - \en Instance of an assembly if the operation succeeded, c3d_null - otherwise. \~ + \return \ru Экземпляр сборки, если операция прошла успешно, NULL в противном случае. + \en Instance of an assembly if the operation succeeded, NULL - otherwise. \~ */ virtual ModelAssemblyPtr CreateAssembly( const MbPlacement3D &place, const c3d::ItemsSPtrVector & componentItems, const c3d::string_t& fileName ) = 0; @@ -349,23 +349,23 @@ public: \en Solids included in the part. \~ \param[in] fileName - \ru Название детали. \en Solid's name. \~ - \return \ru Экземпляр детали, если операция прошла успешно, c3d_null в противном случае. - \en Instance of the part if the operation succeeded, c3d_null - otherwise. \~ + \return \ru Экземпляр детали, если операция прошла успешно, NULL в противном случае. + \en Instance of the part if the operation succeeded, NULL - 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. \~ - \return \ru Экземпляр сборки, если операция прошла успешно, c3d_null в противном случае. - \en Instance of an assembly if the operation succeeded, c3d_null - otherwise. \~ + \return \ru Экземпляр сборки, если операция прошла успешно, NULL в противном случае. + \en Instance of an assembly if the operation succeeded, NULL - otherwise. \~ */ virtual ModelAssemblyPtr GetInstanceAssembly( ) = 0; /** \brief \ru Получить деталь для экспорта. \en Get the detail for export. \~ - \return \ru Экземпляр детали, если операция прошла успешно, c3d_null в противном случае. - \en Instance of the part if the operation succeeded, c3d_null - otherwise. \~ + \return \ru Экземпляр детали, если операция прошла успешно, NULL в противном случае. + \en Instance of the part if the operation succeeded, NULL - otherwise. \~ */ virtual ModelPartPtr GetInstancePart( ) = 0; @@ -437,15 +437,15 @@ public: \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. \~ - \return \ru Интерфейс вставки, если операция прошла успешно или c3d_null в противном случае. - \en Interface of the instance if the operation succeeded and c3d_null otherwise. \~ + \return \ru Интерфейс вставки, если операция прошла успешно или NULL в противном случае. + \en Interface of the instance if the operation succeeded and NULL 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 Интерфейс вставки, если операция прошла успешно или c3d_null в противном случае. - \en Interface of the insertion if the operation succeeded and c3d_null otherwise. \~ + \return \ru Интерфейс вставки, если операция прошла успешно или NULL в противном случае. + \en Interface of the insertion if the operation succeeded and NULL otherwise. \~ */ virtual ModelInstancePtr NextInstance( bool includeInvisible ) = 0; @@ -516,15 +516,15 @@ public: \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. \~ - \return \ru Интерфейс вставки, если операция прошла успешно или c3d_null в противном случае. - \en Interface of the instance if the operation succeeded and c3d_null otherwise. \~ + \return \ru Интерфейс вставки, если операция прошла успешно или NULL в противном случае. + \en Interface of the instance if the operation succeeded and NULL 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 Интерфейс вставки, если операция прошла успешно или c3d_null в противном случае. - \en Interface of the insertion if the operation succeeded and c3d_null otherwise. \~ + \return \ru Интерфейс вставки, если операция прошла успешно или NULL в противном случае. + \en Interface of the insertion if the operation succeeded and NULL otherwise. \~ */ virtual ModelInstancePtr NextInstance( bool includeInvisible ) = 0; diff --git a/C3d/Include/conv_model_exchange.h b/C3d/Include/conv_model_exchange.h index 3491cc2..b1d4550 100644 --- a/C3d/Include/conv_model_exchange.h +++ b/C3d/Include/conv_model_exchange.h @@ -96,8 +96,8 @@ namespace c3d { */ CONV_FUNC (MbeConvResType) ImportFromFile( MbModel & model, const path_string & fileName, - IConvertorProperty3D * prop = c3d_null, - IProgressIndicator * indicator = c3d_null ); + IConvertorProperty3D * prop = C3D_NULL_PTR, + IProgressIndicator * indicator = C3D_NULL_PTR ); /** \brief \ru Прочитать файл обменного формата в элемент. @@ -120,8 +120,8 @@ namespace c3d { */ CONV_FUNC (MbeConvResType) ImportFromFile( c3d::ItemSPtr& item, const path_string& filePath, - IConvertorProperty3D* prop = c3d_null, - IProgressIndicator* indicator = c3d_null ); + IConvertorProperty3D* prop = C3D_NULL_PTR, + IProgressIndicator* indicator = C3D_NULL_PTR ); /** \brief \ru Прочитать файл обменного формата в модель. \en Read a file of an exchange format into model. \~ @@ -143,8 +143,8 @@ namespace c3d { */ CONV_FUNC (MbeConvResType) ImportFromFile( ItModelDocument & mDoc, const path_string & filePath, - IConvertorProperty3D * prop = c3d_null, - IProgressIndicator * indicator = c3d_null ); + IConvertorProperty3D * prop = C3D_NULL_PTR, + IProgressIndicator * indicator = C3D_NULL_PTR ); /** \brief \ru Записать модель в файл обменного формата. \en Write the model into an exchange format file. \~ @@ -166,8 +166,8 @@ namespace c3d { */ CONV_FUNC (MbeConvResType) ExportIntoFile( MbModel & model, const path_string & filePath, - IConvertorProperty3D * prop = c3d_null, - IProgressIndicator * indicator = c3d_null ); + IConvertorProperty3D * prop = C3D_NULL_PTR, + IProgressIndicator * indicator = C3D_NULL_PTR ); /** \brief \ru Записать модель в файл обменного формата. \en Write the model into an exchange format file. \~ @@ -189,8 +189,8 @@ namespace c3d { */ CONV_FUNC (MbeConvResType ) ExportIntoFile( MbItem& item, const path_string& filePath, - IConvertorProperty3D* prop = c3d_null, - IProgressIndicator* indicator = c3d_null ); + IConvertorProperty3D* prop = C3D_NULL_PTR, + IProgressIndicator* indicator = C3D_NULL_PTR ); /** \brief \ru Записать модельный документ в файл обменного формата. \en Write the model into an exchange format file. \~ @@ -212,8 +212,8 @@ namespace c3d { */ CONV_FUNC (MbeConvResType ) ExportIntoFile( ItModelDocument& mDoc, const path_string& filePath, - IConvertorProperty3D* prop = c3d_null, - IProgressIndicator* indicator = c3d_null ); + IConvertorProperty3D* prop = C3D_NULL_PTR, + IProgressIndicator* indicator = C3D_NULL_PTR ); /** \brief \ru Импортировать данные из буфера в модель. @@ -235,8 +235,8 @@ namespace c3d { CONV_FUNC (MbeConvResType) ImportFromBuffer( MbModel & model, const C3DExchangeBuffer& buffer, MbeModelExchangeFormat modelFormat, - IConvertorProperty3D * prop = c3d_null, - IProgressIndicator * indicator = c3d_null ); + IConvertorProperty3D * prop = C3D_NULL_PTR, + IProgressIndicator * indicator = C3D_NULL_PTR ); /** \brief \ru Импортировать данные из буфера в модель. @@ -258,8 +258,8 @@ namespace c3d { CONV_FUNC(MbeConvResType) ImportFromBuffer( c3d::ItemSPtr& item, const C3DExchangeBuffer& buffer, MbeModelExchangeFormat modelFormat, - IConvertorProperty3D* prop = c3d_null, - IProgressIndicator* indicator = c3d_null ); + IConvertorProperty3D* prop = C3D_NULL_PTR, + IProgressIndicator* indicator = C3D_NULL_PTR ); /** \brief \ru Экспортировать модель в буфер. @@ -281,8 +281,8 @@ namespace c3d { CONV_FUNC (MbeConvResType) ExportIntoBuffer( MbModel & model, MbeModelExchangeFormat modelFormat, C3DExchangeBuffer& buffer, - IConvertorProperty3D * prop = c3d_null, - IProgressIndicator * indicator = c3d_null ); + IConvertorProperty3D * prop = C3D_NULL_PTR, + IProgressIndicator * indicator = C3D_NULL_PTR ); /** \brief \ru Экспортировать модель в буфер. @@ -304,8 +304,8 @@ namespace c3d { CONV_FUNC(MbeConvResType) ExportIntoBuffer( MbItem& item, MbeModelExchangeFormat modelFormat, C3DExchangeBuffer& buffer, - IConvertorProperty3D* prop = c3d_null, - IProgressIndicator* indicator = c3d_null ); + IConvertorProperty3D* prop = C3D_NULL_PTR, + IProgressIndicator* indicator = C3D_NULL_PTR ); //------------------------------------------------------------------------------ @@ -322,7 +322,7 @@ namespace c3d { // \ru Конструктор. \en Constructor. C3DExchangeBuffer() - : data( c3d_null ) + : data( C3D_NULL_PTR ) , count( 0 ) { } @@ -389,10 +389,10 @@ public: \en Implementation of converter's properties interface. \~ \param[in] idoc - \ru Реализация интерфейса документа. \en Implementation of document interface. \~ - \param[in] stream - \ru Поток, из которого производится чтение (может быть c3d_null). - \en Stream from which reading is performed (can be c3d_null). \~ - \param[in] indicator - \ru Индикатор хода процесса (может быть c3d_null). - \en The process progress indicator (can be c3d_null). \~ + \param[in] stream - \ru Поток, из которого производится чтение (может быть NULL). + \en Stream from which reading is performed (can be NULL). \~ + \param[in] indicator - \ru Индикатор хода процесса (может быть NULL). + \en The process progress indicator (can be NULL). \~ \param[in] qeuryStitch - \ru Диалог запроса на сшивку поверхностей. \en Dialog of request for stitching the surfaces. \~ \return \ru Код завершения операции. @@ -413,10 +413,10 @@ public: \en Implementation of converter's properties interface. \~ \param[in] idoc - \ru Реализация интерфейса документа. \en Implementation of document interface. \~ - \param[in] stream - \ru Поток, в который производится запись (может быть c3d_null). - \en Stream in which the record is performed (can be c3d_null). \~ - \param[in] indicator - \ru Индикатор хода процесса (может быть c3d_null). - \en The process progress indicator (can be c3d_null). \~ + \param[in] stream - \ru Поток, в который производится запись (может быть NULL). + \en Stream in which the record is performed (can be NULL). \~ + \param[in] indicator - \ru Индикатор хода процесса (может быть NULL). + \en The process progress indicator (can be NULL). \~ \return \ru Код завершения операции. \en Code of the operation termination. \~ \ingroup ACIS_Exchange @@ -794,8 +794,8 @@ CONV_FUNC (MbeConvResType ) SATRead ( IConvertorProperty3D & prop, ItModelDocume \en Implementation of converter's properties interface. \~ \param[in] idoc - \ru Реализация интерфейса документа. \en Implementation of document interface. \~ -\param[in] indicator - \ru Индикатор хода процесса (может быть c3d_null). - \en The process progress indicator (can be c3d_null). \~ +\param[in] indicator - \ru Индикатор хода процесса (может быть NULL). + \en The process progress indicator (can be NULL). \~ \return \ru Код завершения операции. \en Code of the operation termination. \~ \ingroup ACIS_Exchange @@ -1077,7 +1077,7 @@ namespace c3d { const char* data, size_t length, MbeModelExchangeFormat modelFormat, - IConvertorProperty3D* prop = c3d_null, IProgressIndicator* indicator = c3d_null); + IConvertorProperty3D* prop = NULL, IProgressIndicator* indicator = NULL); /** \brief \ru Экспортировать модель в буфер. \en Export model into buffer. \~ @@ -1126,7 +1126,7 @@ namespace c3d { DEPRECATE_DECLARE CONV_FUNC(MbeConvResType) ExportIntoBuffer( MbItem& item, MbeModelExchangeFormat modelFormat, char*& data, size_t& length, - IConvertorProperty3D* prop = c3d_null, IProgressIndicator* indicator = c3d_null); + IConvertorProperty3D* prop = NULL, IProgressIndicator* indicator = NULL); } diff --git a/C3d/Include/conv_plugin_import.h b/C3d/Include/conv_plugin_import.h deleted file mode 100644 index d9a6c37..0000000 --- a/C3d/Include/conv_plugin_import.h +++ /dev/null @@ -1,807 +0,0 @@ -//////////////////////////////////////////////////////////////////////////////// -/** -\file -\brief \ru API для передачи моделей, прочитанных сторонним модулем. -\en API for models read by 3d party component.\~ -\details \ru Определен интерфейс, который должен реализовать модуль и структуры -для передачи информации о модели, топологии, геометрии. -\en Declared API the module has to implement and structures for structure, -topology and geomentry transmission.\~ -*/ -//////////////////////////////////////////////////////////////////////////////// - -#ifndef __CONV_PUGIN_IMPORT_H -#define __CONV_PUGIN_IMPORT_H - -#include - -//////////////////////////////////////////////////////////////////////////////// -// -// Dynamic-link library API -// -//////////////////////////////////////////////////////////////////////////////// - -//------------------------------------------------------------------------------ -/** \brief \ru Имена функций инициализации и завершения работы плагина. - \en Initialize and release functions of plugin.\~ -\ingroup Data_Interface -*/ -// --- -#define C3D_PLUGIN_INIT_SOURCE InitSource -#define C3D_PLUGIN_RELEASE_SOURCE ReleaseSource - -//------------------------------------------------------------------------------ -/** \brief \ru Имена функций инициализации и завершения работы плагина. - \en Initialize and release functions of plugin.\~ -\ingroup Data_Interface -*/ -// --- -#define C3D_PLUGIN_INIT_SOURCE_NAME "InitSource" -#define C3D_PLUGIN_RELEASE_SOURCE_NAME "ReleaseSource" - - -struct ObModelSource; - - -//------------------------------------------------------------------------------ -/** \brief \ru Объявление функций инициализации и завершения работы плагина. - \en Declare initialize and release functions of plugin.\~ -\ingroup Data_Interface -*/ -// --- -#ifdef WIN32 -#define C3D_PLUGIN_INIT_EXPORT_DECLARE extern "C" __declspec( dllexport ) ObModelSource* _cdecl C3D_PLUGIN_INIT_SOURCE( const char*, const char* ); -#define C3D_PLUGIN_RELEASE_EXPORT_DECLARE extern "C" __declspec( dllexport ) void _cdecl C3D_PLUGIN_RELEASE_SOURCE( ObModelSource* ); -#else -#define C3D_PLUGIN_INIT_EXPORT_DECLARE ObModelSource* C3D_PLUGIN_INIT_SOURCE( const char*, const char* ); -#define C3D_PLUGIN_RELEASE_EXPORT_DECLARE void C3D_PLUGIN_RELEASE_SOURCE( ObModelSource* ); -#endif // WIN32 - - -//------------------------------------------------------------------------------ -/** \brief \ru Объявление типа функций инициализации и завершения работы плагина. - \en Declare types of initialize and release functions of plugin.\~ -\ingroup Data_Interface -*/ -// --- -#ifdef WIN32 -typedef ObModelSource* (_cdecl* C3D_PLUGIN_INIT_SOURCE_CALL)(const char*, const char*); -typedef void(_cdecl* C3D_PLUGIN_RELEASE_SOURCE_CALL)(ObModelSource*); -#else -typedef ObModelSource* (* C3D_PLUGIN_INIT_SOURCE_CALL)(const char*, const char*); -typedef void(* C3D_PLUGIN_RELEASE_SOURCE_CALL)(ObModelSource*); -#endif // WIN32 - - -//////////////////////////////////////////////////////////////////////////////// -// -// Plugin types -// -//////////////////////////////////////////////////////////////////////////////// - - -//------------------------------------------------------------------------------ -/** \brief \ru Объявление булевых значений. -\en Declare boolean values.\~ -\ingroup Data_Interface -*/ -// --- -#define C3D_PLUGIN_BOOL int -#define C3D_PLUGIN_TRUE 1 -#define C3D_PLUGIN_FALSE 0 - -//#define C3D_SYMBOL_COMPOSITE_TEXT 3 -#define C3D_SYMBOL_TEXT_LINE 0 -//#define C3D_SYMBOL_PRREDEFINED 1 - -#define C3D_SYMBOL_ARC_LENGTH 1 -#define C3D_SYMBOL_CONICAL_TAPER 2 -#define C3D_SYMBOL_COUNTERBORE 3 -#define C3D_SYMBOL_COUNTERSINK 4 -#define C3D_SYMBOL_DEPTH 5 -#define C3D_SYMBOL_DIAMETER 6 -#define C3D_SYMBOL_PLUS_MINUS 7 -#define C3D_SYMBOL_SLOPE 8 -#define C3D_SYMBOL_SPHERICAL_DIAMETER 9 -#define C3D_SYMBOL_SPHERICAL_RADIUS 10 -#define C3D_SYMBOL_SQUARE 11 -#define C3D_SYMBOL_ANGULARITY 12 -#define C3D_SYMBOL_CIRCULAR_RUNOUT 13 -#define C3D_SYMBOL_CIRCULARITY 14 -#define C3D_SYMBOL_CONCENTRICITY 15 -#define C3D_SYMBOL_CYLINDRICITY 16 -#define C3D_SYMBOL_FLATNESS 17 -#define C3D_SYMBOL_PARALLELISM 18 -#define C3D_SYMBOL_PERPENDICULARITY 19 -#define C3D_SYMBOL_POSITION 20 -#define C3D_SYMBOL_LINE_PROFILE 21 -#define C3D_SYMBOL_SURFACE_PROFILE 22 -#define C3D_SYMBOL_STRAIGHTNESS 23 -#define C3D_SYMBOL_SYMMETRY 24 -#define C3D_SYMBOL_TOTAL_RUNOUT 25 - - -#define C3D_CALLOUT_GENERAL 0 -#define C3D_CALLOUT_DIMENSION 1 -#define C3D_CALLOUT_PROJECTION 2 - - -#define C3D_TERMINATOR_EMPTY 0 -#define C3D_TERMINATOR_BLANKED_ARROW 1 -#define C3D_TERMINATOR_BLANKED_BOX 2 -#define C3D_TERMINATOR_BLANKED_DOT 3 -#define C3D_TERMINATOR_DIMENSION_ORIGIN 4 -#define C3D_TERMINATOR_FILLED_ARROW 5 -#define C3D_TERMINATOR_FILLED_BOX 6 -#define C3D_TERMINATOR_FILLED_DOT 7 -#define C3D_TERMINATOR_INTEGRAL_SYMBOL 8 -#define C3D_TERMINATOR_OPEN_ARROW 9 -#define C3D_TERMINATOR_SLASH 10 -#define C3D_TERMINATOR_UNFILLED_ARROW 11 - - -#define C3D_DIMENSION_GENERAL 0 -#define C3D_DIMENSION_LINEAR 1 -#define C3D_DIMENSION_ANGULAR 2 - - - -//////////////////////////////////////////////////////////////////////////////// -// -// Curves -// -//////////////////////////////////////////////////////////////////////////////// - - -//------------------------------------------------------------------------------ -/** \brief \ru Примитив трехмерного пространства (точка либо вектор). - \en Spatial primitive (point or vector).\~ -\ingroup Data_Interface -*/ -// --- -struct ObPrimitive3D { - double x, y, z; - - ObPrimitive3D() - : x( 0.0 ), y( 0.0 ), z( 0.0 ) - {} -}; - - -//------------------------------------------------------------------------------ -// Инициализировать примитив -// --- -inline void SetObPrimitiveZero( ObPrimitive3D& ob ) { - ob.x = ob.y = ob.z = 0.0; -} - - -//------------------------------------------------------------------------------ -// Инициализировать примитив -// --- -inline bool IsObPrimitiveZero( const ObPrimitive3D& ob ) { - return (ob.x == 0.0) && (ob.y == 0.0) && (ob.z == 0.0); -} - - -//------------------------------------------------------------------------------ -/** \brief \ru Локальная система координат в трехмерном пространстве. - \en Spatial placement.\~ -\ingroup Data_Interface -*/ -// --- -struct ObLocation3D { - ObPrimitive3D origin, axisX, axisY, axisZ; - - ObLocation3D() - : origin(), axisX(), axisY(), axisZ() - {} -}; - - -//------------------------------------------------------------------------------ -/** \brief \ru Одномерный диапазон. - \en One dimensional range.\~ -\ingroup Data_Interface -*/ -// --- -struct ObRange1D { - double start, end; - - ObRange1D() - : start( 0.0 ), end( 0.0 ) - {} -}; - - -//------------------------------------------------------------------------------ -/** \brief \ru Трехмерный отрезок. - \en Spatial line segment.\~ -\ingroup Data_Interface -*/ -// --- -struct ObSegment3D { - static const int CurveType = 1; - ObRange1D domain; - ObPrimitive3D start, end; - - ObSegment3D() - : domain(), start(), end() - {} -}; - - -//------------------------------------------------------------------------------ -/** \brief \ru Трехмерная полилиния. - \en Spatial polyline.\~ -\ingroup Data_Interface -*/ -// --- -struct ObPolyline3D { - static const int CurveType = 2; - int pointsArrayId; - - ObPolyline3D() - : pointsArrayId( 0 ) - {} -}; - - -//------------------------------------------------------------------------------ -/** \brief \ru Трехмерная дуга. - \en Spatial arc.\~ -\ingroup Data_Interface -*/ -// --- -struct ObArc3D { - static const int CurveType = 3; - ObLocation3D location; - double majorAxis, minorAxis; - ObRange1D domain; - - ObArc3D() - : location(), majorAxis( 0.0 ), minorAxis( 0.0 ), domain() - {} -}; - - -//------------------------------------------------------------------------------ -/** \brief \ru Трехмерная парабола. - \en Spatial parabola.\~ -\ingroup Data_Interface -*/ -// --- -struct ObParabola3D { - static const int CurveType = 4; - ObLocation3D location; - double focalLength; - ObRange1D domain; - - ObParabola3D() - : location(), focalLength( 0.0 ), domain() - {} -}; - - -//------------------------------------------------------------------------------ -/** \brief \ru Трехмерная дуга. - \en Spatial arc.\~ -\ingroup Data_Interface -*/ -// --- -struct ObHyperbola3D { - static const int CurveType = 5; - ObLocation3D location; - double majorSemiAxis, minorSemiAxis; - ObRange1D domain; - - ObHyperbola3D() - : location(), majorSemiAxis( 0.0 ), minorSemiAxis( 0.0 ), domain() - {} -}; - - -//------------------------------------------------------------------------------ -/** \brief \ru Трехмерный сплайн. - \en Spatial spline.\~ -\ingroup Data_Interface -*/ -// --- -struct ObSplineCurve3D { - static const int CurveType = 6; - int knotsId, vertcisId; - int degree; - int closed; - - ObSplineCurve3D() - : knotsId( 0 ), vertcisId( 0 ), degree( 0 ), closed( 0 ) - {} -}; - - -//------------------------------------------------------------------------------ -/** \brief \ru Трехмерный NURBS. - \en Spatial NURBS.\~ -\ingroup Data_Interface -*/ -// --- -struct ObNURBSCurve3D { - static const int CurveType = 7; - int knotsId, vertcisId, weightsId; - int degree; - C3D_PLUGIN_BOOL closed; - ObRange1D domain; - - ObNURBSCurve3D() - : knotsId( 0 ), vertcisId( 0 ), weightsId( 0 ), degree( 0 ), closed( 0 ), domain() - {} -}; - - -//------------------------------------------------------------------------------ -/** \brief \ru Трехмерная составная кривая. - \en Spatial composite curve.\~ -\ingroup Data_Interface -*/ -// --- -struct ObCompositeCurve3D { - static const int CurveType = 8; - int segmentsArrIndicis; - - ObCompositeCurve3D() - : segmentsArrIndicis( 0 ) - {} -}; - - -//////////////////////////////////////////////////////////////////////////////// -// -// Surfaces -// -//////////////////////////////////////////////////////////////////////////////// - - -//------------------------------------------------------------------------------ -/** \brief \ru Плоскость. - \en Plane.\~ -\ingroup Data_Interface -*/ -// --- -struct ObPlane { - static const int SurfaceType = 1; - ObLocation3D location; - ObRange1D uDomain, vDomain; - - ObPlane() - : location(), uDomain(), vDomain() - {} -}; - - -//------------------------------------------------------------------------------ -/** \brief \ru Цилиндрическая поверхность. - \en Cylinder surface.\~ -\ingroup Data_Interface -*/ -// --- -struct ObCylinder { - static const int SurfaceType = 2; - ObLocation3D location; - double r, h; - ObRange1D uDomain, vDomain; - - ObCylinder() - : location(), r( 0.0 ), h( 0.0 ), uDomain(), vDomain() - {} -}; - - -//------------------------------------------------------------------------------ -/** \brief \ru Коническая поверхность. - \en Cone surface.\~ -\ingroup Data_Interface -*/ -// --- -struct ObCone { - static const int SurfaceType = 3; - ObLocation3D location; - double r, h, halfAngle; - ObRange1D uDomain, vDomain; - - ObCone() - : location(), r( 0.0 ), h( 0.0 ), halfAngle( 0.0 ), uDomain(), vDomain() - {} -}; - - -//------------------------------------------------------------------------------ -/** \brief \ru Сферическая поверхность. - \en Sphere surface.\~ -\ingroup Data_Interface -*/ -// --- -struct ObSphere { - static const int SurfaceType = 4; - ObLocation3D location; - double r; - ObRange1D uDomain, vDomain; - - ObSphere() - : location(), r( 0.0 ), uDomain(), vDomain() - {} -}; - - -//------------------------------------------------------------------------------ -/** \brief \ru Тороидальная поверхность. - \en Torus surface.\~ -\ingroup Data_Interface -*/ -// --- -struct ObTorus { - static const int SurfaceType = 5; - ObLocation3D location; - double rMin, rMax; - ObRange1D uDomain, vDomain; - - ObTorus() - : location(), rMin( 0.0 ), rMax( 0.0 ), uDomain(), vDomain() - {} -}; - - -//------------------------------------------------------------------------------ -/** \brief \ru Поверхность выдавливания. - \en Extrusion surface.\~ -\ingroup Data_Interface -*/ -// --- -struct ObExtrusion { - static const int SurfaceType = 6; - int curve; - ObPrimitive3D direction; - - ObExtrusion() - : curve( 0 ), direction() - {} -}; - - -//------------------------------------------------------------------------------ -/** \brief \ru Поверхность вращения. - \en Revolution surface.\~ -\ingroup Data_Interface -*/ -// --- -struct ObRevolution { - static const int SurfaceType = 7; - int curveId; - ObPrimitive3D axisOrigin, axisDirection; - ObRange1D vRange; - - ObRevolution() - : curveId( 0 ), axisOrigin(), axisDirection(), vRange() - {} -}; - - -//------------------------------------------------------------------------------ -/** \brief \ru Линейчатая поверхность. - \en Ruled surface.\~ -\ingroup Data_Interface -*/ -// --- -struct ObRuled { - static const int SurfaceType = 8; - int curve1, curve2; - - ObRuled() - : curve1( 0 ), curve2( 0 ) - {} -}; - - -//------------------------------------------------------------------------------ -/** \brief \ru Сплайновая поверхность. - \en Spline surface.\~ -\ingroup Data_Interface -*/ -// --- -struct ObSplineSurface { - static const int SurfaceType = 9; - int knotsUId, knotsVId, verticisListId; - int degreeU, degreeV; - int closedU, closedV; - - ObSplineSurface() - : knotsUId( 0 ), knotsVId( 0 ), verticisListId( 0 ), degreeU( 0 ), degreeV( 0 ), closedU( 0 ), closedV( 0 ) - {} -}; - - -//------------------------------------------------------------------------------ -/** \brief \ru Сплайновая поверхность. - \en Spline surface.\~ -\ingroup Data_Interface -*/ -// --- -struct ObNURBSSurface { - static const int SurfaceType = 10; - int knotsUId, knotsVId, verticisListListId, weightsListListId; - int degreeU, degreeV; - C3D_PLUGIN_BOOL closedU, closedV; - - ObNURBSSurface() - : knotsUId( 0 ), knotsVId( 0 ), verticisListListId( 0 ), weightsListListId( 0 ), degreeU( 0 ), degreeV( 0 ), closedU( 0 ), closedV( 0 ) - {} -}; - - -//------------------------------------------------------------------------------ -/** \brief \ru Смещённая поверхность. - \en Offset surface.\~ -\ingroup Data_Interface -*/ -// --- -struct ObOffsetSurface { - static const int SurfaceType = 11; - int baseSurface; - double offset; - - ObOffsetSurface() - : baseSurface( 0 ), offset( 0.0 ) - {} -}; - - -//------------------------------------------------------------------------------ -/** \brief \ru Цвет. - \en Colour.\~ -\ingroup Data_Interface -*/ -// --- -struct ObColour { - double red, green, blue; - - ObColour() - : red( 0.0 ), green( 0.0 ), blue( 0.0 ) - {} -}; - - -//------------------------------------------------------------------------------ -/** \brief \ru Неопределённый компонент цвета. - \en Undefined component of colour.\~ -\ingroup Data_Interface -*/ -// --- -const double ObUndefinedColourComponent = -1.0; - - -//------------------------------------------------------------------------------ -/** \brief \ru Элемент аннотации. - \en PMI item.\~ -\ingroup Data_Interface -*/ -// --- -struct ObPMI { - ObLocation3D location; - int visualArray; - int textBlockIdArray; - - ObPMI() - : location(), visualArray( 0 ), textBlockIdArray( 0 ) - {} -}; - - -//------------------------------------------------------------------------------ -/** \brief \ru Элемент текста. - \en Text item.\~ -\ingroup Data_Interface -*/ -// --- -struct ObTextBlock { - double originX, originY; - double dirX, dirY; - double extentX, extentY; - - ObTextBlock() - : originX( 0.0 ), originY( 0.0 ), dirX( 0.0 ), dirY( 0.0 ), extentX( 0.0 ), extentY( 0.0 ) - {} -}; - - -//------------------------------------------------------------------------------ -/** \brief \ru Размер. - \en Dimension.\~ -\ingroup Data_Interface -*/ -// --- -struct ObDimension { - double value; - double deviationMin, deviationMax; - int type; - int calloutArrId; - - ObDimension() - : value( 0.0 ), deviationMin( 0.0 ), deviationMax( 0.0 ), type( 0 ), calloutArrId( 0 ) - {} -}; - - -//------------------------------------------------------------------------------ -/** \brief \ru Особая линия. - \en Special line.\~ -\ingroup Data_Interface -*/ -// --- -struct ObPMICallout { - int type; - //int geometry; - ObPrimitive3D head, tail; - bool isArc; - ObPrimitive3D center; - int terminatorHead; - int terminatorTail; - - ObPMICallout() - : type( 0 ), head(), tail(), isArc( false ), center(), terminatorHead( 0 ), terminatorTail( 0 ) - {} -}; - - -//////////////////////////////////////////////////////////////////////////////// -// -// Model source plugin. Basic interface. -// -//////////////////////////////////////////////////////////////////////////////// - - -//------------------------------------------------------------------------------ -/** \brief \ru Источник данных модели. - \en Model source.\~ -\ingroup Data_Interface -*/ -// --- -struct ObModelSource { - - virtual ~ObModelSource() {}; - - virtual C3D_PLUGIN_BOOL LastOperationSuccess() = 0; - - // Операции с файлом - virtual C3D_PLUGIN_BOOL IsPathWCS() = 0; - virtual C3D_PLUGIN_BOOL Open( const char* ) = 0; - virtual C3D_PLUGIN_BOOL Open( const wchar_t* ) = 0; - virtual void Close() = 0; - - // Значение неопределённого идентификатора. - virtual int UndefinedId() = 0; - - // Управление трассировкой событий - virtual void EnableLog() = 0; - virtual void DisableLog() = 0; - - // Контейнеры - - virtual unsigned int ArrayCount ( int arrayId ) = 0; - virtual int ArrayIdentifier ( int arrayId, unsigned int index ) = 0; - virtual double ArrayFloat ( int arrayId, unsigned int index ) = 0; - virtual ObPrimitive3D ArrayPrimitive ( int arrayId, unsigned int index ) = 0; - - virtual ObColour ItemColour( int itemId ) = 0; - - // Модель - virtual int ModelPart() = 0; - - virtual unsigned int PartInstanceCount( int partId ) = 0; - virtual int PartInstance( int partId, unsigned int inst ) = 0; - - virtual const char* CPartName( int partId ) = 0; - virtual const char* CPartLabel( int partId ) = 0; - virtual const char* CPartAuthor( int partId ) = 0; - virtual const char* CPartOrganization( int partId ) = 0; - virtual const char* CPartDescription( int partId ) = 0; - - virtual int InstancePart( int instanceId ) = 0; - virtual ObLocation3D InstanceLocation( int instanceId ) = 0; - - virtual unsigned int SolidsCount( int partId ) = 0; - - // Топология граничного представления - virtual int Solid( int partId, unsigned int solid ) = 0; - virtual ObLocation3D SolidLocation( int solidId ) = 0; - - virtual unsigned int SpaceCurvesCount( int partId ) = 0; - virtual int SpaceCurve( int partId, unsigned int curve ) = 0; - - virtual unsigned int ShellsCount( int solidId ) = 0; - virtual int Shell( int solid, unsigned int shell ) = 0; - - virtual C3D_PLUGIN_BOOL ShellClosed( int shellId ) = 0; - virtual unsigned int ShellFacesCount( int shellId ) = 0; - virtual int ShellFace( int shellId, unsigned int face ) = 0; - - virtual unsigned int FaceBoundsCount( int faceId ) = 0; - virtual int FaceBound( int faceId, unsigned int bound ) = 0; - virtual C3D_PLUGIN_BOOL FaceSurfaceSameOriented( int faceId ) = 0; - - virtual unsigned int BoundCoedgesCount( int boundId ) = 0; - virtual int BoundCoedge( int boundId, unsigned int coedge ) = 0; - - virtual int CoedgeEdge( int coedgeId ) = 0; - virtual C3D_PLUGIN_BOOL CoedgeEdgeSameOriented( int coedgeId ) = 0; - - virtual int EdgeStartVertex( int edgeId ) = 0; - virtual int EdgeEndVertex( int edgeId ) = 0; - - // Методы получения геометрии - - virtual int FaceGeometry( int faceId ) = 0; - virtual int EdgeGeometry( int edgeId ) = 0; - virtual ObPrimitive3D VertexGeometry( int vertexId ) = 0; - - // Типы геометрических объектов - - virtual int SurfaceType( int surfaceId ) = 0; - virtual int Curve3DType( int curveId ) = 0; - - // Данные геометрии - - // Пространственные кривые - - virtual ObSegment3D LineSegment3D( int curveId ) = 0; - virtual ObPolyline3D Polyline3D( int curveId ) = 0; - virtual ObArc3D Arc3D( int curveId ) = 0; - virtual ObParabola3D Parabola3D( int curveId ) = 0; - virtual ObHyperbola3D Hyperbola3D( int curveId ) = 0; - virtual ObSplineCurve3D SplineCurve3D( int curveId ) = 0; - virtual ObNURBSCurve3D NURBSCurve3D( int curveId ) = 0; - virtual ObCompositeCurve3D CompositeCurve3D( int curveId ) = 0; - - virtual unsigned int CompositeCurveSegmentsCount( int curveId ) = 0; - virtual int CompositeCurveSegment( int curveId, unsigned int index ) = 0; - virtual C3D_PLUGIN_BOOL CompositeCurveSegmentsSameOriented( int curveId, unsigned int index ) = 0; - - // Поверхности - - virtual ObPlane Plane( int surfaceId ) = 0; - virtual ObCylinder Cylinder( int surfaceId ) = 0; - virtual ObCone Cone( int surfaceId ) = 0; - virtual ObSphere Sphere( int surfaceId ) = 0; - virtual ObTorus Torus( int surfaceId ) = 0; - virtual ObExtrusion Extrusion( int surfaceId ) = 0; - virtual ObRevolution Revolution( int surfaceId ) = 0; - virtual ObRuled Ruled( int surfaceId ) = 0; - virtual ObSplineSurface SplineSurface( int surfaceId ) = 0; - virtual ObNURBSSurface NURBSSurface( int surfaceId ) = 0; - virtual ObOffsetSurface OffsetSurface( int surfaceId ) = 0; - - virtual unsigned int PartPMICount( int partIdId ) = 0; - virtual int PartPMI( int partId, unsigned int index ) = 0; - virtual ObPMI PMI( int pmiId ) = 0; - - virtual bool IsDimension( int pmiId ) = 0; - virtual bool Dimension( int pmiId, ObDimension& dim ) = 0; - - virtual ObPMICallout PMICallout( int calloutId ) = 0; - - virtual unsigned int PMITextCount( int textId ) = 0; - virtual int PMIText( int textId, unsigned int index ) = 0; - - virtual int PMITextType( int textBlockId ) = 0; - virtual ObTextBlock PMITextLocation( int textBlockId ) = 0; - virtual int PMITextSymbol( int textBlockId ) = 0; - virtual const char* PMIText( int textBlockId ) = 0; - virtual unsigned int CompositeTextCount( int textId ) = 0; - virtual int CompositeText( int textId, unsigned int index ) = 0; - - virtual unsigned int PMICalloutCount( int pmiId ) = 0; - virtual ObPMICallout PMICallout( int pmiId, unsigned int index ) = 0; - -}; - - -#endif // __CONV_PUGIN_IMPORT_H - diff --git a/C3d/Include/cr_attribute_provider.h b/C3d/Include/cr_attribute_provider.h index b01d81b..086e2e3 100644 --- a/C3d/Include/cr_attribute_provider.h +++ b/C3d/Include/cr_attribute_provider.h @@ -70,20 +70,20 @@ public: ~MbAttributeProvider(); virtual MbeCreatorType IsA() const; // \ru Выдать тип элемента. \en Get an element type. - virtual void Transform( const MbMatrix3D & matr, MbRegTransform * = c3d_null ); // \ru Преобразовать элемент согласно матрице. \en Transform element according to the matrix. - virtual void Move( const MbVector3D & to, MbRegTransform * = c3d_null ); // \ru Сдвинуть вдоль вектора. \en Move along a vector. - virtual void Rotate( const MbAxis3D & axis, double angle, MbRegTransform * = c3d_null ); // \ru Повернуть вокруг оси. \en Rotate about an axis. + virtual void Transform( const MbMatrix3D & matr, MbRegTransform * = NULL ); // \ru Преобразовать элемент согласно матрице. \en Transform element according to the matrix. + virtual void Move( const MbVector3D & to, MbRegTransform * = NULL ); // \ru Сдвинуть вдоль вектора. \en Move along a vector. + virtual void Rotate( const MbAxis3D & axis, double angle, MbRegTransform * = NULL ); // \ru Повернуть вокруг оси. \en Rotate about an axis. virtual bool IsSame( const MbCreator &, double accuracy ) const; // \ru Являются ли объекты равными? \en Determine whether an object is equal? virtual bool IsSimilar( const MbCreator & ) const; // \ru Определить, являются ли объекты подобными. \en Determine whether the objects are similar. virtual bool SetEqual( const MbCreator & ); // \ru Сделать равным. \en Make equal. - virtual MbCreator & Duplicate( MbRegDuplicate * = c3d_null ) const; // \ru Сделать копию. \en Create a copy. + virtual MbCreator & Duplicate( MbRegDuplicate * = NULL ) const; // \ru Сделать копию. \en Create a copy. virtual void GetProperties( MbProperties & ); // \ru Выдать свойства объекта. \en Get properties of the object. virtual void SetProperties( const MbProperties & ); // \ru Записать свойства объекта. \en Set properties of the object. virtual MbePrompt GetPropertyName(); // \ru Выдать заголовок свойства объекта. \en Get a name of object property. virtual bool CreateShell( MbFaceShell *& shell, MbeCopyMode sameShell, - RPArray * items = c3d_null ); // \ru Построение \en Construction. + RPArray * items = NULL ); // \ru Построение \en Construction. // \ru Добавить отдельный атрибут (забрать во владение) \en Add a separate attribute. void AddAttribute( const MbName & name, MbAttribute * attr ); @@ -125,7 +125,7 @@ public: /// \ru Записать полученные атрибуты. \en Save the received attributes. void ReceiveAttributes ( c3d::AttrVector & attrs ); /// \ru Скопировать атрибуты. \en Copy attributes. - void DuplicateAttributes( c3d::AttrVector & attrs, MbRegDuplicate * iReg = c3d_null ) const; + void DuplicateAttributes( c3d::AttrVector & attrs, MbRegDuplicate * iReg = NULL ) const; /// \ru Дать количество атрибутов. \en Get the attributes count. size_t AttributesCount() const { return attributes.size(); } /// \ru Добавить атрибут. \en Add an attribute. diff --git a/C3d/Include/cr_boolean_solid.h b/C3d/Include/cr_boolean_solid.h index 1f3e3dc..d8953c1 100644 --- a/C3d/Include/cr_boolean_solid.h +++ b/C3d/Include/cr_boolean_solid.h @@ -67,10 +67,10 @@ public : // \ru Общие функции математического объекта \en Common functions of the mathematical object virtual MbeCreatorType IsA() const; // \ru Тип элемента. \en A type of element. - virtual void Transform( const MbMatrix3D &, MbRegTransform * ireg = c3d_null ); // \ru Преобразовать элемент согласно матрице. \en Transform element according to the matrix. - virtual void Move ( const MbVector3D &, MbRegTransform * ireg = c3d_null ); // \ru Сдвиг. \en Translation. - virtual void Rotate ( const MbAxis3D &, double angle, MbRegTransform * ireg = c3d_null ); // \ru Повернуть вокруг оси. \en Rotate around an axis. - virtual MbCreator & Duplicate( MbRegDuplicate * = c3d_null ) const ; // \ru Сделать копию \en Create a copy + virtual void Transform( const MbMatrix3D &, MbRegTransform * ireg = NULL ); // \ru Преобразовать элемент согласно матрице. \en Transform element according to the matrix. + virtual void Move ( const MbVector3D &, MbRegTransform * ireg = NULL ); // \ru Сдвиг. \en Translation. + virtual void Rotate ( const MbAxis3D &, double angle, MbRegTransform * ireg = NULL ); // \ru Повернуть вокруг оси. \en Rotate around an axis. + virtual MbCreator & Duplicate( MbRegDuplicate * = NULL ) const ; // \ru Сделать копию \en Create a copy virtual MbePrompt GetPropertyName(); // \ru Выдать заголовок свойства объекта \en Get a name of object property. virtual void GetProperties( MbProperties & ); // \ru Выдать свойства объекта. \en Get properties of the object. @@ -90,7 +90,7 @@ public : // \ru Общие функции твердого тела. \en Common functions of solid. virtual bool CreateShell( MbFaceShell *& shell, MbeCopyMode sameShell, - RPArray * items = c3d_null ); // \ru Построение \en Construction + RPArray * items = NULL ); // \ru Построение \en Construction virtual void SetYourVersion( VERSION version, bool forAll ); @@ -107,7 +107,7 @@ public: /// \ru Общее количество строителей. \en Total count of creators. size_t GetCreatorsCount() const { return creators.size(); } /// \ru Дать строитель. \en Get the creator. - const MbCreator * GetCreator( size_t k ) const { return ( (k < creators.size()) ? creators[k] : c3d_null ); } + const MbCreator * GetCreator( size_t k ) const { return ( (k < creators.size()) ? creators[k] : NULL ); } /// \ru Удалить из журнала строители первого тела. \en Delete first-solid creators from the history tree. bool DeleteFirstCreators(); private : diff --git a/C3d/Include/cr_chamfer_solid.h b/C3d/Include/cr_chamfer_solid.h index f311a8b..5f74396 100644 --- a/C3d/Include/cr_chamfer_solid.h +++ b/C3d/Include/cr_chamfer_solid.h @@ -39,7 +39,7 @@ public : // \ru Общие функции математического объекта \en Common functions of the mathematical object virtual MbeCreatorType IsA() const; // \ru Тип элемента \en A type of element - virtual MbCreator & Duplicate( MbRegDuplicate * = c3d_null ) const ; // \ru Сделать копию \en Create a copy + virtual MbCreator & Duplicate( MbRegDuplicate * = NULL ) const ; // \ru Сделать копию \en Create a copy virtual void GetProperties( MbProperties &properties ); // \ru Выдать свойства объекта \en Get properties of the object virtual void SetProperties( const MbProperties &properties ); // \ru Записать свойства объекта \en Set properties of the object @@ -51,7 +51,7 @@ public : // \ru Общие функции твердого тела \en Common functions of solid virtual bool CreateShell( MbFaceShell *&shell, MbeCopyMode sameShell, - RPArray * items = c3d_null ); // \ru Построение \en Construction + RPArray * items = NULL ); // \ru Построение \en Construction private : virtual void ReadDistances ( reader &in ); diff --git a/C3d/Include/cr_connecting_curve.h b/C3d/Include/cr_connecting_curve.h index 657a176..f9c196b 100644 --- a/C3d/Include/cr_connecting_curve.h +++ b/C3d/Include/cr_connecting_curve.h @@ -59,15 +59,15 @@ public : // \ru Общие функции строителя \en The common functions of the creator virtual MbeCreatorType IsA() const; // \ru Тип элемента \en A type of element - virtual MbCreator & Duplicate( MbRegDuplicate * iReg = c3d_null ) const; // \ru Сделать копию \en Create a copy + virtual MbCreator & Duplicate( MbRegDuplicate * iReg = NULL ) const; // \ru Сделать копию \en Create a copy virtual bool IsSame ( const MbCreator &, double accuracy ) const; // \ru Являются ли объекты равными? \en Determine whether an object is equal? virtual bool IsSimilar( const MbCreator & ) const; // \ru Являются ли объекты подобными \en Whether the objects are similar virtual bool SetEqual ( const MbCreator & ); // \ru Сделать равным \en Make equal - virtual void Transform( const MbMatrix3D &, MbRegTransform * = c3d_null ); // \ru Преобразовать элемент согласно матрице \en Transform element according to the matrix - virtual void Move ( const MbVector3D &, MbRegTransform * = c3d_null ); // \ru Сдвиг \en Translation - virtual void Rotate ( const MbAxis3D &, double angle, MbRegTransform * = c3d_null ); // \ru Повернуть вокруг оси \en Rotate about an axis + virtual void Transform( const MbMatrix3D &, MbRegTransform * = NULL ); // \ru Преобразовать элемент согласно матрице \en Transform element according to the matrix + virtual void Move ( const MbVector3D &, MbRegTransform * = NULL ); // \ru Сдвиг \en Translation + virtual void Rotate ( const MbAxis3D &, double angle, MbRegTransform * = NULL ); // \ru Повернуть вокруг оси \en Rotate about an axis virtual MbePrompt GetPropertyName(); // \ru Дать имя свойства объекта \en Get the object property name virtual void GetProperties( MbProperties & ); // \ru Выдать свойства объекта \en Get properties of the object @@ -77,7 +77,7 @@ public : virtual void SetBasisPoints( const MbControlData3D & ); // \ru Изменить объект по контрольным точкам. \en Change the object by control points. // \ru Построить кривую по журналу построения \en Create a curve from the history tree - virtual bool CreateSpaceCurve( MbWireFrame *&, MbeCopyMode, RPArray * items = c3d_null ); + virtual bool CreateSpaceCurve( MbWireFrame *&, MbeCopyMode, RPArray * items = NULL ); /** \} */ @@ -97,13 +97,13 @@ IMPL_PERSISTENT_OPS( MbConnectingCurveCreator ) \en Create two curves fillet constructor.\n \~ \param[in] curve1 - \ru Кривая 1. \en Curve 1. \~ - \param[in,out] t1 - \ru Параметр точки на кривой 1 соединения с кривой соединения. + \param[in/out] t1 - \ru Параметр точки на кривой 1 соединения с кривой соединения. \en A point parameter on curve 1 of connection with fillet curve. \~ \param[in] curve2 - \ru Кривая 2. \en Curve 2. \~ - \param[in,out] t2 - \ru Параметр точки на кривой 2 соединения с кривой соединения. + \param[in/out] t2 - \ru Параметр точки на кривой 2 соединения с кривой соединения. \en A point parameter on curve 2 of connection with fillet curve. \~ - \param[in,out] radius - \ru Радиус дуги или цилиндра. + \param[in/out] radius - \ru Радиус дуги или цилиндра. \en The radius of an arc or a cylinder. \~ \param[in] type - \ru Тип скругления. \en The fillet type. \~ @@ -111,8 +111,8 @@ IMPL_PERSISTENT_OPS( MbConnectingCurveCreator ) \en An object defining the edges names. \~ \param[out] res - \ru Код результата операции. \en Operation result code. \~ - \param[out] surface - \ru Поверхность, которая будет создана и на которой базируется соединительная кривая, (может быть возращён c3d_null). - \en A surface on which the fillet curve is based on, it will be created by the method (can be c3d_null). \~ + \param[out] surface - \ru Поверхность, которая будет создана и на которой базируется соединительная кривая, (может быть возращён NULL). + \en A surface on which the fillet curve is based on, it will be created by the method (can be NULL). \~ \result \ru Возвращает строитель. \en Returns the constructor. \~ \ingroup Curve3D_Modeling diff --git a/C3d/Include/cr_cutting_solid.h b/C3d/Include/cr_cutting_solid.h index af52814..ffc5c89 100644 --- a/C3d/Include/cr_cutting_solid.h +++ b/C3d/Include/cr_cutting_solid.h @@ -66,10 +66,10 @@ public : // \ru Общие функции математического объекта \en Common functions of the mathematical object virtual MbeCreatorType IsA() const; // \ru Тип элемента \en A type of element - virtual void Transform( const MbMatrix3D &, MbRegTransform * = c3d_null ); // \ru Преобразовать элемент согласно матрице \en Transform element according to the matrix - virtual void Move( const MbVector3D &, MbRegTransform * = c3d_null ); // \ru Сдвиг \en Translation - virtual void Rotate( const MbAxis3D &, double angle, MbRegTransform * = c3d_null ); // \ru Повернуть вокруг оси \en Rotate around an axis - virtual MbCreator & Duplicate( MbRegDuplicate * = c3d_null ) const; // \ru Сделать копию \en Create a copy + virtual void Transform( const MbMatrix3D &, MbRegTransform * = NULL ); // \ru Преобразовать элемент согласно матрице \en Transform element according to the matrix + virtual void Move( const MbVector3D &, MbRegTransform * = NULL ); // \ru Сдвиг \en Translation + virtual void Rotate( const MbAxis3D &, double angle, MbRegTransform * = NULL ); // \ru Повернуть вокруг оси \en Rotate around an axis + virtual MbCreator & Duplicate( MbRegDuplicate * = NULL ) const; // \ru Сделать копию \en Create a copy virtual MbePrompt GetPropertyName(); // \ru Выдать заголовок свойства объекта \en Get a name of object property virtual void GetProperties( MbProperties & ); // \ru Выдать свойства объекта \en Get properties of the object @@ -85,7 +85,7 @@ public : // \ru Общие функции твердого тела \en Common functions of solid virtual bool CreateShell( MbFaceShell *&, MbeCopyMode sameShell, - RPArray * = c3d_null ); // \ru Построение \en Construction + RPArray * = NULL ); // \ru Построение \en Construction // \ru Оставляемая часть (если part больше 0, то оставляем часть тела со стороны нормали поверхности). \en A part to be kept (if part is bigger than 0, then keep a part of solid from the side of surface normal). ThreeStates GetPart() const { return part; } diff --git a/C3d/Include/cr_detach_solid.h b/C3d/Include/cr_detach_solid.h index c61ebd2..a933875 100644 --- a/C3d/Include/cr_detach_solid.h +++ b/C3d/Include/cr_detach_solid.h @@ -42,10 +42,10 @@ public : \en \name Common functions of the mathematical object. \{ */ virtual MbeCreatorType IsA() const; // \ru Тип элемента \en Type of element - virtual MbCreator & Duplicate( MbRegDuplicate * = c3d_null ) const ; // \ru Сделать копию \en Create a copy - virtual void Transform( const MbMatrix3D & matr, MbRegTransform * = c3d_null ); // \ru Преобразовать элемент согласно матрице \en Transform element according to the matrix - virtual void Move( const MbVector3D & to, MbRegTransform * = c3d_null ); // \ru Сдвиг \en Translation - virtual void Rotate( const MbAxis3D & axis, double angle, MbRegTransform * = c3d_null ); // \ru Повернуть вокруг оси \en Rotate about an axis + virtual MbCreator & Duplicate( MbRegDuplicate * = NULL ) const ; // \ru Сделать копию \en Create a copy + virtual void Transform( const MbMatrix3D & matr, MbRegTransform * = NULL ); // \ru Преобразовать элемент согласно матрице \en Transform element according to the matrix + virtual void Move( const MbVector3D & to, MbRegTransform * = NULL ); // \ru Сдвиг \en Translation + virtual void Rotate( const MbAxis3D & axis, double angle, MbRegTransform * = NULL ); // \ru Повернуть вокруг оси \en Rotate about an axis virtual void GetProperties( MbProperties & properties ); // \ru Выдать свойства объекта \en Get properties of the object virtual void SetProperties( const MbProperties & properties ); // \ru Записать свойства объекта \en Set properties of the object @@ -56,7 +56,7 @@ public : virtual bool SetEqual ( const MbCreator & ); // \ru Сделать равным. \en Make equal. virtual bool CreateShell( MbFaceShell *& shell, MbeCopyMode sameShell, - RPArray * items = c3d_null ); // \ru Построение \en Construction + RPArray * items = NULL ); // \ru Построение \en Construction /** \} */ /** \ru \name Функции строителя, разделяющие отдельные части оболочки. \en \name Functions of the creator subdividing separate parts of the shell. @@ -183,7 +183,7 @@ MbCreator * CreateDetach( MbFaceShell & solid, MbResultType & res ) { res = rt_Error; - MbCreator * result = c3d_null; + MbCreator * result = NULL; ::MakeDetachShells( solid, partSolid, sort ); diff --git a/C3d/Include/cr_displace_creator.h b/C3d/Include/cr_displace_creator.h deleted file mode 100644 index 0159523..0000000 --- a/C3d/Include/cr_displace_creator.h +++ /dev/null @@ -1,214 +0,0 @@ -//////////////////////////////////////////////////////////////////////////////// -/** - \file - \brief \ru Строители перемещения объектов в пространстве. - \en Constructors of displacement of an object. -*/ -//////////////////////////////////////////////////////////////////////////////// - -#ifndef __CR_DISPLACE_CREATOR_H -#define __CR_DISPLACE_CREATOR_H - - -#include -#include -#include - - -//------------------------------------------------------------------------------ -/** \brief \ru Перемещение объекта вдоль вектора. - \en The shift of an object. \~ - \details \ru Строитель перемещает объект вдоль вектора на его длину. \n - \en Constructor displaces an object along the vector by its length. \n \~ - \ingroup Model_Creators -*/ -// --- -class MATH_CLASS MbMotionMaker : public MbCreator { -protected: - MbVector3D vector; ///< \ru Вектор перемещения. \en The displacement vector. - -public: // \ru Конструктор по параметрам. \en Constructor by parameters. - MbMotionMaker( const MbVector3D & ); -private: // \ru Конструктор дублирующий. \en Duplication constructor. - MbMotionMaker( const MbMotionMaker &, MbRegDuplicate * ireg ); - // \ru Объявление конструктора копирования без реализации, чтобы не было копирования по умолчанию. \en Declaration without implementation of the copy-constructor to prevent copying by default. - MbMotionMaker( const MbMotionMaker & ); - -public: // \ru Деструктор \en Destructor - ~MbMotionMaker(); - -public: // \ru Общие функции математического объекта \en Common functions of the mathematical object - virtual MbeCreatorType IsA() const; // \ru Тип элемента \en A type of element - virtual MbeCreatorType Type() const; // \ru Получить групповой тип объекта. \en Get the group type of the object. - virtual MbCreator & Duplicate( MbRegDuplicate * = c3d_null ) const; // \ru Сделать копию \en Create a copy - virtual bool IsSame( const MbCreator & other, double accuracy ) const; // \ru Являются ли объекты равными? \en Determine whether an object is equal? - virtual bool SetEqual ( const MbCreator & ); // \ru Сделать равным \en Make equal - virtual void Transform( const MbMatrix3D &, MbRegTransform * = c3d_null ); // \ru Преобразовать по матрице \en Transform according to the matrix - virtual void Move ( const MbVector3D &, MbRegTransform * = c3d_null ); // \ru Сдвиг по вектору \en Translation by a vector - virtual void Rotate ( const MbAxis3D &, double angle, MbRegTransform * = c3d_null ); // \ru Повернуть вокруг оси \en Rotate around an axis - - virtual MbePrompt GetPropertyName(); // \ru Выдать заголовок свойства объекта \en Get a name of object property - virtual void GetProperties( MbProperties & ); // \ru Выдать свойства объекта \en Get properties of the object - virtual void SetProperties( const MbProperties & ); // \ru Записать свойства объекта \en Set properties of the object - - /// \ru Построение оболочки \en Creation of a shell. - virtual bool CreateShell( MbFaceShell *& shell, MbeCopyMode sameShell, - RPArray * items = c3d_null ); - /// \ru Построение каркаса кривых. \en Creation of a wire-frame. - virtual bool CreateWireFrame( MbWireFrame *& frame, MbeCopyMode sameShell, - RPArray * items = c3d_null ); - /// \ru Построение каркаса точек. \en Creation of a point-frame. - virtual bool CreatePointFrame( MbPointFrame *& frame, MbeCopyMode sameShell, - RPArray * items = c3d_null ); - /// \ru Переместить строитель. \en Displace the creator. - virtual bool Perform( MbCreator * ) const; - - // \ru Добавить перемещение объекта вдоль вектора. \en Add a displacement vector. - void AddVector( const MbVector3D & ); - // \ru Дать параметры. \en Get the parameters. - void GetVector( MbVector3D & m ) const { m = vector; } - // \ru Установить параметры. \en Set the parameters. - void SetVector( const MbVector3D & m ) { vector = m; } - -private: - // \ru Объявление оператора присваивания без реализации, чтобы не было присваивания по умолчанию. \en The declaration of the assignment operator without implementation to prevent an assignment by default. - void operator = ( const MbMotionMaker & ); - - DECLARE_PERSISTENT_CLASS_NEW_DEL( MbMotionMaker ) -}; - -IMPL_PERSISTENT_OPS( MbMotionMaker ) - - -//------------------------------------------------------------------------------ -/** \brief \ru Поворот объекта вокруг оси. - \en Rotate an object around an axis. \~ - \details \ru Строитель поворачивает объект вокруг оси на заданный угол. \n - \en Constructor rotates an object around the axis by the specified angle. \n \~ - \ingroup Model_Creators -*/ -// --- -class MATH_CLASS MbRotationMaker : public MbCreator { -protected: - MbAxis3D axis; ///< \ru Ось вращения. \en The axis. - double angle; ///< \ru Угол поворота. \en The angle of rotatation. - -public: // \ru Конструктор по параметрам. \en Constructor by parameters. - MbRotationMaker( const MbAxis3D & ax, double an ); -private: // \ru Конструктор дублирующий. \en Duplication constructor. - MbRotationMaker( const MbRotationMaker &, MbRegDuplicate * ireg ); - // \ru Объявление конструктора копирования без реализации, чтобы не было копирования по умолчанию. \en Declaration without implementation of the copy-constructor to prevent copying by default. - MbRotationMaker( const MbRotationMaker & ); - -public: // \ru Деструктор \en Destructor - ~MbRotationMaker(); - -public: // \ru Общие функции математического объекта \en Common functions of the mathematical object - virtual MbeCreatorType IsA() const; // \ru Тип элемента \en A type of element - virtual MbeCreatorType Type() const; // \ru Получить групповой тип объекта. \en Get the group type of the object. - virtual MbCreator & Duplicate( MbRegDuplicate * = c3d_null ) const; // \ru Сделать копию \en Create a copy - virtual bool IsSame( const MbCreator & other, double accuracy ) const; // \ru Являются ли объекты равными? \en Determine whether an object is equal? - virtual bool SetEqual ( const MbCreator & ); // \ru Сделать равным \en Make equal - virtual void Transform( const MbMatrix3D &, MbRegTransform * = c3d_null ); // \ru Преобразовать по матрице \en Transform according to the matrix - virtual void Move ( const MbVector3D &, MbRegTransform * = c3d_null ); // \ru Сдвиг по вектору \en Translation by a vector - virtual void Rotate ( const MbAxis3D &, double angle, MbRegTransform * = c3d_null ); // \ru Повернуть вокруг оси \en Rotate around an axis - - virtual MbePrompt GetPropertyName(); // \ru Выдать заголовок свойства объекта \en Get a name of object property - virtual void GetProperties( MbProperties & ); // \ru Выдать свойства объекта \en Get properties of the object - virtual void SetProperties( const MbProperties & ); // \ru Записать свойства объекта \en Set properties of the object - - /// \ru Построение оболочки \en Creation of a shell. - virtual bool CreateShell( MbFaceShell *& shell, MbeCopyMode sameShell, - RPArray * items = c3d_null ); - /// \ru Построение каркаса кривых. \en Creation of a wire-frame. - virtual bool CreateWireFrame( MbWireFrame *& frame, MbeCopyMode sameShell, - RPArray * items = c3d_null ); - /// \ru Построение каркаса точек. \en Creation of a point-frame. - virtual bool CreatePointFrame( MbPointFrame *& frame, MbeCopyMode sameShell, - RPArray * items = c3d_null ); - /// \ru Переместить строитель. \en Displace the creator. - virtual bool Perform( MbCreator * ) const; - - // \ru Добавить поворот вокруг оси. \en Add an angle of rotatation. - bool AddAngle( const MbAxis3D & ax, double an ); - // \ru Дать параметры. \en Get the parameters. - void GetAxis3D( MbAxis3D & m ) const { m = axis; } - // \ru Установить параметры. \en Set the parameters. - void SetAxis3D( const MbAxis3D & m ) { axis = m; } - -private: - // \ru Объявление оператора присваивания без реализации, чтобы не было присваивания по умолчанию. \en The declaration of the assignment operator without implementation to prevent an assignment by default. - void operator = ( const MbRotationMaker & ); - - DECLARE_PERSISTENT_CLASS_NEW_DEL( MbRotationMaker ) -}; - -IMPL_PERSISTENT_OPS( MbRotationMaker ) - - -//------------------------------------------------------------------------------ -/** \brief \ru Трансформация объекта по матрице. - \en Transformation of an object by matrix. \~ - \details \ru Строитель трансформирует объект по матрице. \n - \en Constructor transforms an object by the matrix. \n \~ - \ingroup Model_Creators -*/ -// --- -class MATH_CLASS MbTransformationMaker : public MbCreator { -protected: - MbMatrix3D matrix; ///< \ru Матрица преобразования. \en The transform matrix. - -public: // \ru Конструктор по параметрам. \en Constructor by parameters. - MbTransformationMaker( const MbMatrix3D & ); -private: // \ru Конструктор дублирующий. \en Duplication constructor. - MbTransformationMaker( const MbTransformationMaker &, MbRegDuplicate * ireg ); - // \ru Объявление конструктора копирования без реализации, чтобы не было копирования по умолчанию. \en Declaration without implementation of the copy-constructor to prevent copying by default. - MbTransformationMaker( const MbTransformationMaker & ); - -public: // \ru Деструктор \en Destructor - ~MbTransformationMaker(); - -public: // \ru Общие функции математического объекта \en Common functions of the mathematical object - virtual MbeCreatorType IsA() const; // \ru Тип элемента \en A type of element - virtual MbeCreatorType Type() const; // \ru Получить групповой тип объекта. \en Get the group type of the object. - virtual MbCreator & Duplicate( MbRegDuplicate * = c3d_null ) const; // \ru Сделать копию \en Create a copy - virtual bool IsSame( const MbCreator & other, double accuracy ) const; // \ru Являются ли объекты равными? \en Determine whether an object is equal? - virtual bool SetEqual ( const MbCreator & ); // \ru Сделать равным \en Make equal - virtual void Transform( const MbMatrix3D &, MbRegTransform * = c3d_null ); // \ru Преобразовать по матрице \en Transform according to the matrix - virtual void Move ( const MbVector3D &, MbRegTransform * = c3d_null ); // \ru Сдвиг по вектору \en Translation by a vector - virtual void Rotate ( const MbAxis3D &, double angle, MbRegTransform * = c3d_null ); // \ru Повернуть вокруг оси \en Rotate around an axis - - virtual MbePrompt GetPropertyName(); // \ru Выдать заголовок свойства объекта \en Get a name of object property - virtual void GetProperties( MbProperties & ); // \ru Выдать свойства объекта \en Get properties of the object - virtual void SetProperties( const MbProperties & ); // \ru Записать свойства объекта \en Set properties of the object - - /// \ru Построение оболочки \en Creation of a shell. - virtual bool CreateShell( MbFaceShell *& shell, MbeCopyMode sameShell, - RPArray * items = c3d_null ); - /// \ru Построение каркаса кривых. \en Creation of a wire-frame. - virtual bool CreateWireFrame( MbWireFrame *& frame, MbeCopyMode sameShell, - RPArray * items = c3d_null ); - /// \ru Построение каркаса точек. \en Creation of a point-frame. - virtual bool CreatePointFrame( MbPointFrame *& frame, MbeCopyMode sameShell, - RPArray * items = c3d_null ); - /// \ru Переместить строитель. \en Displace the creator. - virtual bool Perform( MbCreator * ) const; - - // \ru Добавить модификацию по матрице \en Add a modification by a matrix - void AddMatrix( const MbMatrix3D & ); - // \ru Дать параметры. \en Get the parameters. - void GetMatrix( MbMatrix3D & m ) const { m = matrix; } - // \ru Установить параметры. \en Set the parameters. - void SetMatrix( const MbMatrix3D & m ) { matrix = m; } - -private: - // \ru Объявление оператора присваивания без реализации, чтобы не было присваивания по умолчанию. \en The declaration of the assignment operator without implementation to prevent an assignment by default. - void operator = ( const MbTransformationMaker & ); - - DECLARE_PERSISTENT_CLASS_NEW_DEL( MbTransformationMaker ) -}; - -IMPL_PERSISTENT_OPS( MbTransformationMaker ) - - -#endif // __CR_DISPLACE_CREATOR_H diff --git a/C3d/Include/cr_draft_solid.h b/C3d/Include/cr_draft_solid.h index b7c916b..c15ef1f 100644 --- a/C3d/Include/cr_draft_solid.h +++ b/C3d/Include/cr_draft_solid.h @@ -47,7 +47,7 @@ public: , fp ( faceProp ) , np ( new MbPlacement3D( nPlace ) ) , edgeNb ( -1 ) - , pl ( c3d_null ) + , pl ( NULL ) , reverse ( rev ) , step ( false ) { @@ -65,7 +65,7 @@ public: , angle ( ang ) , faceIndices( ) , fp ( faceProp ) - , np ( nPlace ? new MbPlacement3D( *nPlace ) : c3d_null ) + , np ( nPlace ? new MbPlacement3D( *nPlace ) : NULL ) , edgeNb ( edgeInd ) , pl ( new SArray( partLines ) ) , reverse ( rev ) @@ -82,10 +82,10 @@ public : // \ru Общие функции математического объекта \en Common functions of the mathematical object virtual MbeCreatorType IsA() const; // \ru Тип элемента \en A type of element - virtual MbCreator & Duplicate( MbRegDuplicate * = c3d_null ) const; - virtual void Transform( const MbMatrix3D &, MbRegTransform * = c3d_null ); // \ru Преобразовать элемент согласно матрице \en Transform element according to the matrix - virtual void Move ( const MbVector3D &, MbRegTransform * = c3d_null ); // \ru Сдвиг \en Translation - virtual void Rotate ( const MbAxis3D &, double angle, MbRegTransform * = c3d_null ); // \ru Повернуть вокруг оси \en Rotate around an axis + virtual MbCreator & Duplicate( MbRegDuplicate * = NULL ) const; + virtual void Transform( const MbMatrix3D &, MbRegTransform * = NULL ); // \ru Преобразовать элемент согласно матрице \en Transform element according to the matrix + virtual void Move ( const MbVector3D &, MbRegTransform * = NULL ); // \ru Сдвиг \en Translation + virtual void Rotate ( const MbAxis3D &, double angle, MbRegTransform * = NULL ); // \ru Повернуть вокруг оси \en Rotate around an axis virtual void GetProperties( MbProperties & ); // \ru Выдать свойства объекта \en Get properties of the object virtual void SetProperties( const MbProperties & ); // \ru Записать свойства объекта \en Set properties of the object @@ -98,7 +98,7 @@ public : // \ru Общие функции твердого тела \en Common functions of solid virtual bool CreateShell( MbFaceShell *&, MbeCopyMode sameShell, - RPArray * = c3d_null ); // \ru Построение \en Construction + RPArray * = NULL ); // \ru Построение \en Construction private : // \ru Объявление оператора присваивания без реализации, чтобы не было присваивания по умолчанию. \en The declaration of the assignment operator without implementation to prevent an assignment by default. diff --git a/C3d/Include/cr_duplication_solid.h b/C3d/Include/cr_duplication_solid.h index 03636fe..5a81df9 100644 --- a/C3d/Include/cr_duplication_solid.h +++ b/C3d/Include/cr_duplication_solid.h @@ -46,10 +46,10 @@ public: \{ */ /// \ru Получить регистрационный тип (для копирования, дублирования). \en Get the registration type (for copying, duplication). virtual MbeCreatorType IsA() const; - virtual MbCreator & Duplicate( MbRegDuplicate * = c3d_null ) const ; // \ru сделать копию \en create a copy - virtual void Transform( const MbMatrix3D &, MbRegTransform * = c3d_null ); // \ru Преобразовать элемент согласно матрице \en Transform element according to the matrix - virtual void Move( const MbVector3D &, MbRegTransform * = c3d_null ); // \ru Сдвиг \en Translation - virtual void Rotate( const MbAxis3D &, double angle, MbRegTransform * = c3d_null ); // \ru Повернуть вокруг оси \en Rotate about an axis + virtual MbCreator & Duplicate( MbRegDuplicate * = NULL ) const ; // \ru сделать копию \en create a copy + virtual void Transform( const MbMatrix3D &, MbRegTransform * = NULL ); // \ru Преобразовать элемент согласно матрице \en Transform element according to the matrix + virtual void Move( const MbVector3D &, MbRegTransform * = NULL ); // \ru Сдвиг \en Translation + virtual void Rotate( const MbAxis3D &, double angle, MbRegTransform * = NULL ); // \ru Повернуть вокруг оси \en Rotate about an axis virtual void GetProperties( MbProperties & ); // \ru выдать свойства объекта \en get properties of the object virtual void SetProperties( const MbProperties & ); // \ru записать свойства объекта \en set properties of the object @@ -60,7 +60,7 @@ public: virtual bool SetEqual ( const MbCreator & ); // \ru сделать равным \en make equal virtual bool CreateShell( MbFaceShell *&, MbeCopyMode sameShell, - RPArray * items = c3d_null ); // \ru Построение \en Construction + RPArray * items = NULL ); // \ru Построение \en Construction /** \} */ private : diff --git a/C3d/Include/cr_elementary_solid.h b/C3d/Include/cr_elementary_solid.h index 3db41b5..43f630c 100644 --- a/C3d/Include/cr_elementary_solid.h +++ b/C3d/Include/cr_elementary_solid.h @@ -113,10 +113,10 @@ public : \en \name Common functions of the shell creator. \{ */ virtual MbeCreatorType IsA() const; // \ru Тип элемента \en Type of element - virtual void Transform( const MbMatrix3D &, MbRegTransform * = c3d_null ); // \ru Преобразовать элемент согласно матрице \en Transform element according to the matrix - virtual void Move( const MbVector3D &, MbRegTransform * = c3d_null ); // \ru Сдвиг \en Translation - virtual void Rotate( const MbAxis3D &, double angle, MbRegTransform * = c3d_null ); // \ru Повернуть вокруг оси \en Rotate about an axis - virtual MbCreator & Duplicate( MbRegDuplicate * = c3d_null ) const; // \ru Сделать копию \en Create a copy + virtual void Transform( const MbMatrix3D &, MbRegTransform * = NULL ); // \ru Преобразовать элемент согласно матрице \en Transform element according to the matrix + virtual void Move( const MbVector3D &, MbRegTransform * = NULL ); // \ru Сдвиг \en Translation + virtual void Rotate( const MbAxis3D &, double angle, MbRegTransform * = NULL ); // \ru Повернуть вокруг оси \en Rotate about an axis + virtual MbCreator & Duplicate( MbRegDuplicate * = NULL ) const; // \ru Сделать копию \en Create a copy virtual MbePrompt GetPropertyName(); // \ru Выдать заголовок свойства объекта \en Get a name of object property virtual void GetProperties( MbProperties & properties ); // \ru Выдать свойства объекта \en Get properties of the object @@ -130,7 +130,7 @@ public : virtual bool SetEqual( const MbCreator & ); // \ru Сделать равным \en Make equal virtual bool CreateShell( MbFaceShell *&, MbeCopyMode sameShell, - RPArray * = c3d_null ); // \ru Построение \en Construction + RPArray * = NULL ); // \ru Построение \en Construction /** \} */ private : diff --git a/C3d/Include/cr_evolution_solid.h b/C3d/Include/cr_evolution_solid.h index f2e211a..127abf3 100644 --- a/C3d/Include/cr_evolution_solid.h +++ b/C3d/Include/cr_evolution_solid.h @@ -27,7 +27,7 @@ class MATH_CLASS MbCurveEvolutionSolid : public MbCurveSweptSolid { protected : MbSweptData sweptData; ///< \ru Данные об образующей. \en Generating curve data. SPtr spineCurve; ///< \ru Направляющая кривая. \en Spine curve. - SPtr directionCurve; ///< \ru Кривая вектора ориентации матрицы преобразования (может быть c3d_null для простой траектории). \en A curve of the transformation matrix orientation (it may be c3d_null for a simple trajectory). + SPtr directionCurve; ///< \ru Кривая вектора ориентации матрицы преобразования (может быть NULL для простой траектории). \en A curve of the transformation matrix orientation (it may be NULL for a simple trajectory). MbVector3D direction; ///< \ru Вектор ориентации матрицы преобразования (может быть нулевой, в случае автоопределения). \en Vector of transformation matrix orientation (it's equal zero in the mode of automatic direction calculation). SPtr spineNames; ///< \ru Именователь направляющей. \en An object defining the name of the spine curve. EvolutionValues parameters; ///< \ru Параметры. \en Parameters. @@ -128,10 +128,10 @@ public : \en \name Common functions of the mathematical object. \{ */ virtual MbeCreatorType IsA() const; // \ru Тип элемента \en A type of element - virtual MbCreator & Duplicate( MbRegDuplicate * = c3d_null ) const ; // \ru Сделать копию \en Create a copy - virtual void Transform( const MbMatrix3D &, MbRegTransform * = c3d_null ); // \ru Преобразовать элемент согласно матрице \en Transform element according to the matrix - virtual void Move ( const MbVector3D &, MbRegTransform * = c3d_null ); // \ru Сдвиг \en Translation - virtual void Rotate ( const MbAxis3D &, double angle, MbRegTransform * = c3d_null ); // \ru Повернуть вокруг оси \en Rotate around an axis + virtual MbCreator & Duplicate( MbRegDuplicate * = NULL ) const ; // \ru Сделать копию \en Create a copy + virtual void Transform( const MbMatrix3D &, MbRegTransform * = NULL ); // \ru Преобразовать элемент согласно матрице \en Transform element according to the matrix + virtual void Move ( const MbVector3D &, MbRegTransform * = NULL ); // \ru Сдвиг \en Translation + virtual void Rotate ( const MbAxis3D &, double angle, MbRegTransform * = NULL ); // \ru Повернуть вокруг оси \en Rotate around an axis virtual void GetProperties( MbProperties & ); // \ru Выдать свойства объекта \en Get properties of the object virtual void SetProperties( const MbProperties & ); // \ru Записать свойства объекта \en Set properties of the object diff --git a/C3d/Include/cr_extension_shell.h b/C3d/Include/cr_extension_shell.h index bf2a62c..a906d9e 100644 --- a/C3d/Include/cr_extension_shell.h +++ b/C3d/Include/cr_extension_shell.h @@ -46,10 +46,10 @@ public : // \ru Общие функции математического объекта \en Common functions of the mathematical object virtual MbeCreatorType IsA() const; // \ru Тип элемента \en Type of element - virtual MbCreator & Duplicate( MbRegDuplicate * = c3d_null ) const; // \ru Сделать копию \en Create a copy - virtual void Transform( const MbMatrix3D & matr, MbRegTransform * = c3d_null ); // \ru Преобразовать элемент согласно матрице \en Transform element according to the matrix - virtual void Move( const MbVector3D & to, MbRegTransform * = c3d_null ); // \ru Сдвиг \en Translation - virtual void Rotate( const MbAxis3D & axis, double angle, MbRegTransform * = c3d_null ); // \ru Повернуть вокруг оси \en Rotate about an axis + virtual MbCreator & Duplicate( MbRegDuplicate * = NULL ) const; // \ru Сделать копию \en Create a copy + virtual void Transform( const MbMatrix3D & matr, MbRegTransform * = NULL ); // \ru Преобразовать элемент согласно матрице \en Transform element according to the matrix + virtual void Move( const MbVector3D & to, MbRegTransform * = NULL ); // \ru Сдвиг \en Translation + virtual void Rotate( const MbAxis3D & axis, double angle, MbRegTransform * = NULL ); // \ru Повернуть вокруг оси \en Rotate about an axis virtual void GetProperties( MbProperties & properties ); // \ru Выдать свойства объекта \en Get properties of the object virtual void SetProperties( const MbProperties & properties ); // \ru Записать свойства объекта \en Set properties of the object @@ -62,7 +62,7 @@ public : // \ru Общие функции твердого тела \en Common functions of solid solid virtual bool CreateShell( MbFaceShell *& shell, MbeCopyMode sameShell, - RPArray * items = c3d_null ); // \ru Построение \en Construction + RPArray * items = NULL ); // \ru Построение \en Construction // \ru Дать параметры. \en Get the parameters. void GetParameters( ExtensionValues & params ) const { params = parameters; } diff --git a/C3d/Include/cr_extrusion_solid.h b/C3d/Include/cr_extrusion_solid.h index 93e122d..ef6c1de 100644 --- a/C3d/Include/cr_extrusion_solid.h +++ b/C3d/Include/cr_extrusion_solid.h @@ -59,7 +59,7 @@ public : OperationType oType, const MbSNameMaker & operNames, const RPArray & contoursNames, - const c3d::CreatorsSPtrVector * creators = c3d_null, + const c3d::CreatorsSPtrVector * creators = NULL, bool sameCreators = true ); private : @@ -73,10 +73,10 @@ public : \en \name Common functions of the mathematical object. \{ */ virtual MbeCreatorType IsA() const; // \ru Тип элемента. \en A type of element. - virtual MbCreator & Duplicate( MbRegDuplicate * = c3d_null ) const; // \ru Cделать копию. \en Make a copy. - virtual void Transform( const MbMatrix3D &, MbRegTransform * = c3d_null ); // \ru Преобразовать элемент согласно матрице. \en Transform element according to the matrix. - virtual void Move( const MbVector3D &, MbRegTransform * = c3d_null ); // \ru Сдвиг. \en Move. - virtual void Rotate( const MbAxis3D &, double angle, MbRegTransform * = c3d_null ); // \ru Повернуть вокруг оси. \en Rotate around an axis. + virtual MbCreator & Duplicate( MbRegDuplicate * = NULL ) const; // \ru Cделать копию. \en Make a copy. + virtual void Transform( const MbMatrix3D &, MbRegTransform * = NULL ); // \ru Преобразовать элемент согласно матрице. \en Transform element according to the matrix. + virtual void Move( const MbVector3D &, MbRegTransform * = NULL ); // \ru Сдвиг. \en Move. + virtual void Rotate( const MbAxis3D &, double angle, MbRegTransform * = NULL ); // \ru Повернуть вокруг оси. \en Rotate around an axis. virtual void GetProperties( MbProperties & ); // \ru Выдать свойства объекта. \en Get properties of the object. virtual void SetProperties( const MbProperties & ); // \ru Записать свойства объекта. \en Set properties of the object. @@ -94,7 +94,7 @@ public : \en \name Common functions of the rigid solid (forming operations). \{ */ virtual bool CreateShell( MbFaceShell *& shell, MbeCopyMode sameShell, - RPArray * items = c3d_null ); // \ru Построение. \en Construction. + RPArray * items = NULL ); // \ru Построение. \en Construction. virtual MbFaceShell * InitShell( bool in ); virtual void InitBasis( RPArray & items ); @@ -139,7 +139,7 @@ IMPL_PERSISTENT_OPS( MbCurveExtrusionSolid ) \en Face set the construction is complemented with respect to. \~ \param[in] sameShell - \ru Способ копирования граней. \en The method of copying faces. \~ - \param[in] solidCreators - \ru Строители тела solid. + \param[in] creators - \ru Строители тела solid. \en Creators of the solid. \~ \param[in] sweptData - \ru Данные об образующей. \en The generating curve data. \~ diff --git a/C3d/Include/cr_fillet_solid.h b/C3d/Include/cr_fillet_solid.h index 1bea799..b12681a 100644 --- a/C3d/Include/cr_fillet_solid.h +++ b/C3d/Include/cr_fillet_solid.h @@ -60,10 +60,10 @@ public : // \ru Общие функции математического объекта. \en Common functions of the mathematical object. virtual MbeCreatorType IsA() const; // \ru Тип элемента. \en A type of element. - virtual MbCreator & Duplicate( MbRegDuplicate * = c3d_null ) const ; // \ru Сделать копию \en Create a copy - virtual void Transform( const MbMatrix3D &matr, MbRegTransform * = c3d_null ); // \ru Преобразовать элемент согласно матрице \en Transform element according to the matrix - virtual void Move( const MbVector3D &to, MbRegTransform * = c3d_null ); // \ru Сдвиг \en Translation - virtual void Rotate( const MbAxis3D &axis, double angle, MbRegTransform * = c3d_null ); // \ru Повернуть вокруг оси \en Rotate around an axis + virtual MbCreator & Duplicate( MbRegDuplicate * = NULL ) const ; // \ru Сделать копию \en Create a copy + virtual void Transform( const MbMatrix3D &matr, MbRegTransform * = NULL ); // \ru Преобразовать элемент согласно матрице \en Transform element according to the matrix + virtual void Move( const MbVector3D &to, MbRegTransform * = NULL ); // \ru Сдвиг \en Translation + virtual void Rotate( const MbAxis3D &axis, double angle, MbRegTransform * = NULL ); // \ru Повернуть вокруг оси \en Rotate around an axis virtual void GetProperties( MbProperties & properties ); // \ru Выдать свойства объекта. \en Get properties of the object. virtual void SetProperties( const MbProperties & properties ); // \ru Записать свойства объекта. \en Set properties of the object. @@ -76,7 +76,7 @@ public : // \ru Общие функции твердого тела \en Common functions of solid virtual bool CreateShell( MbFaceShell *& shell, MbeCopyMode sameShell, - RPArray * items = c3d_null ); // \ru Построение \en Construction + RPArray * items = NULL ); // \ru Построение \en Construction private : virtual void ReadDistances ( reader &in ); diff --git a/C3d/Include/cr_hole_solid.h b/C3d/Include/cr_hole_solid.h index 66aa257..df9908d 100644 --- a/C3d/Include/cr_hole_solid.h +++ b/C3d/Include/cr_hole_solid.h @@ -69,10 +69,10 @@ public : // \ru Переопределение функций базового класса \en The base class functions override virtual MbeCreatorType IsA() const; // \ru Тип элемента \en A type of element - virtual MbCreator & Duplicate( MbRegDuplicate * = c3d_null ) const ; // \ru Сделать копию \en Create a copy - virtual void Transform( const MbMatrix3D & matr, MbRegTransform * = c3d_null ); // \ru Преобразовать элемент согласно матрице \en Transform element according to the matrix - virtual void Move( const MbVector3D & to, MbRegTransform * = c3d_null ); // \ru Сдвиг \en Translation - virtual void Rotate( const MbAxis3D & axis, double angle, MbRegTransform * = c3d_null ); // \ru Повернуть вокруг оси \en Rotate around an axis + virtual MbCreator & Duplicate( MbRegDuplicate * = NULL ) const ; // \ru Сделать копию \en Create a copy + virtual void Transform( const MbMatrix3D & matr, MbRegTransform * = NULL ); // \ru Преобразовать элемент согласно матрице \en Transform element according to the matrix + virtual void Move( const MbVector3D & to, MbRegTransform * = NULL ); // \ru Сдвиг \en Translation + virtual void Rotate( const MbAxis3D & axis, double angle, MbRegTransform * = NULL ); // \ru Повернуть вокруг оси \en Rotate around an axis virtual void GetProperties( MbProperties & properties ); // \ru Выдать свойства объекта \en Get properties of the object virtual void SetProperties( const MbProperties & properties ); // \ru Записать свойства объекта \en Set properties of the object @@ -88,7 +88,7 @@ public : // \ru Общие функции твердого тела \en Common functions of solid virtual bool CreateShell( MbFaceShell *& shell, MbeCopyMode sameShell, - RPArray * items = c3d_null ); // \ru Построение \en Construction + RPArray * items = NULL ); // \ru Построение \en Construction virtual MbFaceShell * InitShell( bool in ); virtual void InitBasis( RPArray & items ); diff --git a/C3d/Include/cr_intersection_curve.h b/C3d/Include/cr_intersection_curve.h index eec1a5b..b9eacc6 100644 --- a/C3d/Include/cr_intersection_curve.h +++ b/C3d/Include/cr_intersection_curve.h @@ -39,15 +39,15 @@ public: // \ru Общие функции строителя. \en The common functions of the creator. virtual MbeCreatorType IsA() const; // \ru Тип элемента \en A type of element - virtual MbCreator & Duplicate( MbRegDuplicate * iReg = c3d_null ) const; // \ru Сделать копию \en Create a copy + virtual MbCreator & Duplicate( MbRegDuplicate * iReg = NULL ) const; // \ru Сделать копию \en Create a copy virtual bool IsSame ( const MbCreator &, double accuracy ) const; // \ru Являются ли объекты равными? \en Determine whether an object is equal? virtual bool IsSimilar( const MbCreator & ) const; // \ru Являются ли объекты подобными \en Whether the objects are similar virtual bool SetEqual ( const MbCreator & ); // \ru Сделать равным \en Make equal - virtual void Transform( const MbMatrix3D &, MbRegTransform * = c3d_null ); // \ru Преобразовать элемент согласно матрице \en Transform element according to the matrix - virtual void Move ( const MbVector3D &, MbRegTransform * = c3d_null ); // \ru Сдвиг \en Translation - virtual void Rotate ( const MbAxis3D &, double angle, MbRegTransform * = c3d_null ); // \ru Повернуть вокруг оси \en Rotate about an axis + virtual void Transform( const MbMatrix3D &, MbRegTransform * = NULL ); // \ru Преобразовать элемент согласно матрице \en Transform element according to the matrix + virtual void Move ( const MbVector3D &, MbRegTransform * = NULL ); // \ru Сдвиг \en Translation + virtual void Rotate ( const MbAxis3D &, double angle, MbRegTransform * = NULL ); // \ru Повернуть вокруг оси \en Rotate about an axis virtual MbePrompt GetPropertyName(); // \ru Дать имя свойства объекта \en Get the object property name virtual void GetProperties( MbProperties & ); // \ru Выдать свойства объекта \en Get properties of the object @@ -57,7 +57,7 @@ public: virtual void SetBasisPoints( const MbControlData3D & ); // \ru Изменить объект по контрольным точкам. \en Change the object by control points. // \ru Построить кривую по журналу построения \en Create a curve from the history tree - virtual bool CreateWireFrame( MbWireFrame *&, MbeCopyMode, RPArray * items = c3d_null ); + virtual bool CreateWireFrame( MbWireFrame *&, MbeCopyMode, RPArray * items = NULL ); /** \} */ diff --git a/C3d/Include/cr_join_shell.h b/C3d/Include/cr_join_shell.h index 8058e1e..b8a3999 100644 --- a/C3d/Include/cr_join_shell.h +++ b/C3d/Include/cr_join_shell.h @@ -39,10 +39,10 @@ public : // \ru Общие функции математического объекта \en Common functions of the mathematical object virtual MbeCreatorType IsA () const; ///< \ru Тип элемента \en Element type - virtual MbCreator & Duplicate( MbRegDuplicate * = c3d_null ) const; ///< \ru Сделать копию \en Make a copy - virtual void Transform( const MbMatrix3D &, MbRegTransform * = c3d_null ); ///< \ru Преобразовать элемент согласно матрице \en Transform an element according to the matrix - virtual void Move ( const MbVector3D &, MbRegTransform * = c3d_null ); ///< \ru Сдвиг \en Translation - virtual void Rotate ( const MbAxis3D &, double angle, MbRegTransform * = c3d_null ); ///< \ru Поворот вокруг оси \en Rotation about an axis + virtual MbCreator & Duplicate( MbRegDuplicate * = NULL ) const; ///< \ru Сделать копию \en Make a copy + virtual void Transform( const MbMatrix3D &, MbRegTransform * = NULL ); ///< \ru Преобразовать элемент согласно матрице \en Transform an element according to the matrix + virtual void Move ( const MbVector3D &, MbRegTransform * = NULL ); ///< \ru Сдвиг \en Translation + virtual void Rotate ( const MbAxis3D &, double angle, MbRegTransform * = NULL ); ///< \ru Поворот вокруг оси \en Rotation about an axis virtual bool IsSame( const MbCreator &, double accuracy ) const; // \ru Являются ли объекты равными? \en Determine whether an object is equal? virtual bool IsSimilar( const MbCreator & ) const; // \ru Являются ли объекты подобными. \en Whether the objects are similar @@ -58,7 +58,7 @@ public : // \ru Общие функции твердого тела \en Common functions of solid solid virtual bool CreateShell( MbFaceShell *& shell, MbeCopyMode sameShell, - RPArray * items = c3d_null ); ///< \ru Построение \en Construction + RPArray * items = NULL ); ///< \ru Построение \en Construction // \ru Дать параметры. \en Get the parameters. diff --git a/C3d/Include/cr_lofted_solid.h b/C3d/Include/cr_lofted_solid.h index 52e35be..3407b37 100644 --- a/C3d/Include/cr_lofted_solid.h +++ b/C3d/Include/cr_lofted_solid.h @@ -29,7 +29,7 @@ protected : RPArray curves; ///< \ru Плоские сечения. \en Plane sections. SPtr spine; ///< \ru Осевая линия (может отсутствовать). \en Spine curve (can be absent). LoftedValues parameters; ///< \ru Параметры. \en Parameters. - RPArray * guideCurves; ///< \ru Массив направляющих кривых (может быть c3d_null). \en An array of guide curves (can be c3d_null). + RPArray * guideCurves; ///< \ru Массив направляющих кривых (может быть NULL). \en An array of guide curves (can be NULL). SArray * userPnts; ///< \ru Пользовательские точки на сечениях. \en Custom points on the sections. public: @@ -64,10 +64,10 @@ public : // \ru Общие функции математического объекта \en Common functions of the mathematical object virtual MbeCreatorType IsA() const; // \ru Тип элемента \en A type of element - virtual MbCreator & Duplicate( MbRegDuplicate * = c3d_null ) const ; // \ru Сделать копию \en Create a copy - virtual void Transform( const MbMatrix3D &, MbRegTransform * = c3d_null ); // \ru Преобразовать \en Transform - virtual void Move ( const MbVector3D &, MbRegTransform * = c3d_null ); // \ru Сдвиг \en Translation - virtual void Rotate ( const MbAxis3D &, double angle, MbRegTransform * = c3d_null ); // \ru Повернуть вокруг оси \en Rotate around an axis + virtual MbCreator & Duplicate( MbRegDuplicate * = NULL ) const ; // \ru Сделать копию \en Create a copy + virtual void Transform( const MbMatrix3D &, MbRegTransform * = NULL ); // \ru Преобразовать \en Transform + virtual void Move ( const MbVector3D &, MbRegTransform * = NULL ); // \ru Сдвиг \en Translation + virtual void Rotate ( const MbAxis3D &, double angle, MbRegTransform * = NULL ); // \ru Повернуть вокруг оси \en Rotate around an axis virtual void GetProperties( MbProperties & ); // \ru Выдать свойства объекта \en Get properties of the object virtual void SetProperties( const MbProperties & ); // \ru Записать свойства объекта \en Set properties of the object diff --git a/C3d/Include/cr_median_shell.h b/C3d/Include/cr_median_shell.h index 4c4105d..edda9cf 100644 --- a/C3d/Include/cr_median_shell.h +++ b/C3d/Include/cr_median_shell.h @@ -48,13 +48,13 @@ private: public: virtual MbeCreatorType IsA() const; // \ru Тип элемента \en Type of element - virtual MbCreator & Duplicate( MbRegDuplicate * = c3d_null ) const; // \ru Сделать копию \en Create a copy + virtual MbCreator & Duplicate( MbRegDuplicate * = NULL ) const; // \ru Сделать копию \en Create a copy virtual bool IsSame( const MbCreator &, double accuracy ) const; // \ru Являются ли объекты равными? \en Determine whether an object is equal? virtual bool IsSimilar( const MbCreator & ) const; // \ru Являются ли объекты подобными \en Whether the objects are similar virtual bool SetEqual ( const MbCreator & ); // \ru Сделать равным \en Make equal - virtual void Transform( const MbMatrix3D &, MbRegTransform * = c3d_null ); // \ru Преобразовать элемент согласно матрице \en Transform element according to the matrix - virtual void Move ( const MbVector3D &, MbRegTransform * = c3d_null ); // \ru Сдвиг \en Translation - virtual void Rotate ( const MbAxis3D &, double angle, MbRegTransform * = c3d_null ); // \ru Повернуть вокруг оси \en Rotate about an axis + virtual void Transform( const MbMatrix3D &, MbRegTransform * = NULL ); // \ru Преобразовать элемент согласно матрице \en Transform element according to the matrix + virtual void Move ( const MbVector3D &, MbRegTransform * = NULL ); // \ru Сдвиг \en Translation + virtual void Rotate ( const MbAxis3D &, double angle, MbRegTransform * = NULL ); // \ru Повернуть вокруг оси \en Rotate about an axis virtual void GetProperties( MbProperties & properties ); // \ru Выдать свойства объекта \en Get properties of the object virtual void SetProperties( const MbProperties & properties ); // \ru Записать свойства объекта \en Set properties of the object @@ -62,7 +62,7 @@ public: // \ru Построение оболочки по исходным данным \en Construction of a shell from the given data virtual bool CreateShell( MbFaceShell *& shell, MbeCopyMode sameShell, - RPArray * items = c3d_null ); + RPArray * items = NULL ); /// \ru Дать параметры. \en Get the parameters. void GetParameters( MedianShellValues & params ) const { params = parameters; } @@ -89,7 +89,7 @@ IMPL_PERSISTENT_OPS( MbMedianShell ) The function simultaneously creates the shell and its constructor.\n \~ \param[in] solid - \ru Исходное тело. \en The initial solid. \~ - \param[in] faceIndexes - \ru Выбранные пары граней. + \param[in] faces - \ru Выбранные пары граней. \en Selected face pairs. \~ \param[in] parameters - \ru Параметры операции. \en Parameters of operation. \~ diff --git a/C3d/Include/cr_mesh_shell.h b/C3d/Include/cr_mesh_shell.h index d0097ca..5b59c37 100644 --- a/C3d/Include/cr_mesh_shell.h +++ b/C3d/Include/cr_mesh_shell.h @@ -42,12 +42,12 @@ public: public: // \ru Общие функции математического объекта \en Common functions of the mathematical object virtual MbeCreatorType IsA() const; ///< \ru Тип элемента \en Element type - virtual MbCreator & Duplicate( MbRegDuplicate * = c3d_null ) const; ///< \ru Сделать копию \en Make a copy + virtual MbCreator & Duplicate( MbRegDuplicate * = NULL ) const; ///< \ru Сделать копию \en Make a copy virtual bool IsSame( const MbCreator &, double accuracy ) const; // \ru Являются ли объекты равными? \en Determine whether an object is equal? virtual bool SetEqual ( const MbCreator & ); ///< \ru Сделать равным \en Make equal - virtual void Transform( const MbMatrix3D &, MbRegTransform * = c3d_null ); ///< \ru Преобразовать по матрице \en Transform according to the matrix - virtual void Move ( const MbVector3D &, MbRegTransform * = c3d_null ); ///< \ru Сдвиг по вектору \en Translation by the vector - virtual void Rotate ( const MbAxis3D &, double angle, MbRegTransform * = c3d_null ); ///< \ru Поворот вокруг оси \en Rotation about an axis + virtual void Transform( const MbMatrix3D &, MbRegTransform * = NULL ); ///< \ru Преобразовать по матрице \en Transform according to the matrix + virtual void Move ( const MbVector3D &, MbRegTransform * = NULL ); ///< \ru Сдвиг по вектору \en Translation by the vector + virtual void Rotate ( const MbAxis3D &, double angle, MbRegTransform * = NULL ); ///< \ru Поворот вокруг оси \en Rotation about an axis virtual MbePrompt GetPropertyName(); ///< \ru Выдать заголовок свойства объекта \en Get name of object property virtual void GetProperties( MbProperties & ); ///< \ru Выдать свойства объекта \en Get properties of the object @@ -59,7 +59,7 @@ public: // \ru Общие функции математического объе public: /// \ru Построение оболочки \en Creation of a shell virtual bool CreateShell( MbFaceShell *& shell, MbeCopyMode sameShell, - RPArray * items = c3d_null ); + RPArray * items = NULL ); // \ru Дать параметры. \en Get the parameters. void GetParameters( MeshSurfaceValues & params ) const; // \ru Установить параметры. \en Set the parameters. diff --git a/C3d/Include/cr_modified_nurbs_.h b/C3d/Include/cr_modified_nurbs_.h index e42dfbf..7e5ca95 100644 --- a/C3d/Include/cr_modified_nurbs_.h +++ b/C3d/Include/cr_modified_nurbs_.h @@ -41,12 +41,12 @@ public: // \ru деструктор \en destructor public: // \ru Общие функции математического объекта \en Common functions of the mathematical object virtual MbeCreatorType IsA() const; // \ru Тип элемента \en A type of element - virtual MbCreator & Duplicate( MbRegDuplicate * = c3d_null ) const; // \ru сделать копию \en create a copy + virtual MbCreator & Duplicate( MbRegDuplicate * = NULL ) const; // \ru сделать копию \en create a copy virtual bool IsSame( const MbCreator & other, double accuracy ) const; // \ru Являются ли объекты равными? \en Determine whether an object is equal? virtual bool SetEqual ( const MbCreator & ); // \ru сделать равным \en make equal - virtual void Transform( const MbMatrix3D &, MbRegTransform * = c3d_null ); // \ru Преобразовать по матрице \en Transform according to the matrix - virtual void Move ( const MbVector3D &, MbRegTransform * = c3d_null ); // \ru сдвиг по вектору \en translation by a vector - virtual void Rotate ( const MbAxis3D &, double angle, MbRegTransform * = c3d_null ); // \ru Повернуть вокруг оси \en Rotate around an axis + virtual void Transform( const MbMatrix3D &, MbRegTransform * = NULL ); // \ru Преобразовать по матрице \en Transform according to the matrix + virtual void Move ( const MbVector3D &, MbRegTransform * = NULL ); // \ru сдвиг по вектору \en translation by a vector + virtual void Rotate ( const MbAxis3D &, double angle, MbRegTransform * = NULL ); // \ru Повернуть вокруг оси \en Rotate around an axis virtual MbePrompt GetPropertyName(); // \ru выдать заголовок свойства объекта \en get a name of object property virtual void GetProperties( MbProperties & properties ); // \ru выдать свойства объекта \en get properties of the object @@ -56,7 +56,7 @@ public: // \ru Общие функции математического объе /// \ru Построение оболочки. \en creation of a shell virtual bool CreateShell( MbFaceShell *& shell, MbeCopyMode sameShell, - RPArray * items = c3d_null ); + RPArray * items = NULL ); virtual void Refresh( MbFaceShell & outer ); ///< \ru обновить форму оболочки \en update shape of the shell // \ru Выдать базовые объекты. \en Get basis objects. virtual void GetBasisItems( RPArray & s ); @@ -106,12 +106,12 @@ public: // \ru деструктор \en destructor public: // \ru Общие функции математического объекта \en Common functions of the mathematical object virtual MbeCreatorType IsA() const; // \ru Тип элемента \en A type of element - virtual MbCreator & Duplicate( MbRegDuplicate * = c3d_null ) const; // \ru сделать копию \en create a copy + virtual MbCreator & Duplicate( MbRegDuplicate * = NULL ) const; // \ru сделать копию \en create a copy virtual bool IsSame( const MbCreator & other, double accuracy ) const; // \ru Являются ли объекты равными? \en Determine whether an object is equal? virtual bool SetEqual ( const MbCreator & ); // \ru сделать равным \en make equal - virtual void Transform( const MbMatrix3D &, MbRegTransform * = c3d_null ); // \ru Преобразовать по матрице \en Transform according to the matrix - virtual void Move ( const MbVector3D &, MbRegTransform * = c3d_null ); // \ru сдвиг по вектору \en translation by a vector - virtual void Rotate ( const MbAxis3D &, double angle, MbRegTransform * = c3d_null ); // \ru Повернуть вокруг оси \en Rotate around an axis + virtual void Transform( const MbMatrix3D &, MbRegTransform * = NULL ); // \ru Преобразовать по матрице \en Transform according to the matrix + virtual void Move ( const MbVector3D &, MbRegTransform * = NULL ); // \ru сдвиг по вектору \en translation by a vector + virtual void Rotate ( const MbAxis3D &, double angle, MbRegTransform * = NULL ); // \ru Повернуть вокруг оси \en Rotate around an axis virtual MbePrompt GetPropertyName(); // \ru выдать заголовок свойства объекта \en get a name of object property virtual void GetProperties( MbProperties & properties ); // \ru выдать свойства объекта \en get properties of the object @@ -121,7 +121,7 @@ public: // \ru Общие функции математического объе /// \ru построение оболочки \en creation of a shell virtual bool CreateShell( MbFaceShell *& shell, MbeCopyMode sameShell, - RPArray * items = c3d_null ); + RPArray * items = NULL ); virtual void Refresh( MbFaceShell & outer ); ///< \ru обновить форму оболочки \en update shape of the shell // \ru Выдать базовые объекты. \en Get basis objects. virtual void GetBasisItems( RPArray & s ); diff --git a/C3d/Include/cr_modified_solid.h b/C3d/Include/cr_modified_solid.h index 981e0d9..02954b1 100644 --- a/C3d/Include/cr_modified_solid.h +++ b/C3d/Include/cr_modified_solid.h @@ -62,12 +62,12 @@ public: // \ru Общие функции математического объекта \en Common functions of the mathematical object virtual MbeCreatorType IsA() const; // \ru Тип элемента \en A type of element - virtual MbCreator & Duplicate( MbRegDuplicate * = c3d_null ) const; // \ru Сделать копию \en Create a copy + virtual MbCreator & Duplicate( MbRegDuplicate * = NULL ) const; // \ru Сделать копию \en Create a copy virtual bool IsSame( const MbCreator & other, double accuracy ) const; // \ru Являются ли объекты равными? \en Determine whether an object is equal? virtual bool SetEqual ( const MbCreator & ); // \ru Сделать равным \en Make equal - virtual void Transform( const MbMatrix3D &, MbRegTransform * = c3d_null ); // \ru Преобразовать по матрице \en Transform according to the matrix - virtual void Move ( const MbVector3D &, MbRegTransform * = c3d_null ); // \ru Сдвиг по вектору \en Translation by the vector - virtual void Rotate ( const MbAxis3D &, double angle, MbRegTransform * = c3d_null ); // \ru Повернуть вокруг оси \en Rotate around an axis + virtual void Transform( const MbMatrix3D &, MbRegTransform * = NULL ); // \ru Преобразовать по матрице \en Transform according to the matrix + virtual void Move ( const MbVector3D &, MbRegTransform * = NULL ); // \ru Сдвиг по вектору \en Translation by the vector + virtual void Rotate ( const MbAxis3D &, double angle, MbRegTransform * = NULL ); // \ru Повернуть вокруг оси \en Rotate around an axis virtual MbePrompt GetPropertyName(); // \ru Выдать заголовок свойства объекта \en Get a name of object property virtual void GetProperties( MbProperties & properties ); // \ru Выдать свойства объекта \en Get properties of the object @@ -77,7 +77,7 @@ public: /// \ru Построение оболочки \en Creation of a shell virtual bool CreateShell( MbFaceShell *& shell, MbeCopyMode sameShell, - RPArray * items = c3d_null ); + RPArray * items = NULL ); virtual void Refresh( MbFaceShell & outer ); ///< \ru Обновить форму оболочки \en Update shape of the shell // \ru Дать параметры. \en Get the parameters. diff --git a/C3d/Include/cr_nurbs3d.h b/C3d/Include/cr_nurbs3d.h index 23d8e42..48ba21e 100644 --- a/C3d/Include/cr_nurbs3d.h +++ b/C3d/Include/cr_nurbs3d.h @@ -11,7 +11,6 @@ #include -#include #include @@ -25,14 +24,14 @@ // --- class MATH_CLASS MbNurbs3DCreator : public MbCreator { private: - SArray points; // \ru Точки, через которые проходит сплайн \en Points which the spline passes through - SArray weights; // \ru Веса \en Weights - SArray knots; // \ru Узлы \en Knots - RPArray matingData; // \ru Данные сопряжения в точках \en Data about mating in the points - MbeSplineParamType paramType; // \ru Тип параметризации \en Parametrization type - size_t degree; // \ru Степень сплайна \en Spline degree - bool closed; // \ru Замкнутость сплайна \en Spline closedness - bool throughPnts; // \ru через точки \en Through points + SArray points; // \ru Точки, через которые проходит сплайн \en Points which the spline passes through + SArray weights; // \ru Веса \en Weights + SArray knots; // \ru Узлы \en Knots + RPArray< MbPntMatingData > matingData; // \ru Данные сопряжения в точках \en Data about mating in the points + MbeSplineParamType paramType; // \ru Тип параметризации \en Parametrization type + size_t degree; // \ru Степень сплайна \en Spline degree + bool closed; // \ru Замкнутость сплайна \en Spline closedness + bool throughPnts; // \ru через точки \en Through points protected: MbNurbs3DCreator( const MbNurbs3DCreator &, MbRegDuplicate * iReg ); // \ru Конструктор копирования \en Copy-constructor @@ -43,24 +42,24 @@ public: MbeSplineParamType paramType, size_t degree, bool closed, const SArray * weights, const SArray * knots, - const RPArray & matingData, + const RPArray< MbPntMatingData > & matingData, const MbSNameMaker & snMaker ); public: virtual ~MbNurbs3DCreator(); // \ru Общие функции строителя. \en The common functions of the creator. virtual MbeCreatorType IsA() const; // \ru Тип элемента \en A type of element - virtual MbCreator & Duplicate( MbRegDuplicate * iReg = c3d_null ) const; // \ru Сделать копию \en Create a copy + virtual MbCreator & Duplicate( MbRegDuplicate * iReg = NULL ) const; // \ru Сделать копию \en Create a copy virtual bool IsSame ( const MbCreator &, double accuracy ) const; // \ru Являются ли объекты равными? \en Determine whether an object is equal? virtual bool IsSimilar( const MbCreator & ) const; // \ru Являются ли объекты подобными \en Whether the objects are similar virtual bool SetEqual ( const MbCreator & ); // \ru Сделать равным \en Make equal - virtual void Transform( const MbMatrix3D &, MbRegTransform * = c3d_null ); // \ru Преобразовать элемент согласно матрице \en Transform element according to the matrix - virtual void Move ( const MbVector3D &, MbRegTransform * = c3d_null ); // \ru Сдвиг \en Translation - virtual void Rotate ( const MbAxis3D &, double angle, MbRegTransform * = c3d_null ); // \ru Повернуть вокруг оси \en Rotate about an axis + virtual void Transform( const MbMatrix3D &, MbRegTransform * = NULL ); // \ru Преобразовать элемент согласно матрице \en Transform element according to the matrix + virtual void Move ( const MbVector3D &, MbRegTransform * = NULL ); // \ru Сдвиг \en Translation + virtual void Rotate ( const MbAxis3D &, double angle, MbRegTransform * = NULL ); // \ru Повернуть вокруг оси \en Rotate about an axis - virtual MbePrompt GetPropertyName(); // \ru Дать имя свойства объекта \en Get the object property name + virtual MbePrompt GetPropertyName(); // \ru Дать имя свойства объекта \en Get the object property name virtual void GetProperties( MbProperties & ); // \ru Выдать свойства объекта \en Get properties of the object virtual void SetProperties( const MbProperties & ); // \ru Записать свойства объекта \en Set properties of the object virtual void GetBasisItems ( RPArray & ); // \ru Дать базовые объекты \en Get the basis objects @@ -68,7 +67,7 @@ public: virtual void SetBasisPoints( const MbControlData3D & ); // \ru Изменить объект по контрольным точкам. \en Change the object by control points. // \ru Построить кривую по журналу построения \en Create a curve from the history tree - virtual bool CreateWireFrame( MbWireFrame *&, MbeCopyMode, RPArray * items = c3d_null ); + virtual bool CreateWireFrame( MbWireFrame *&, MbeCopyMode, RPArray * items = NULL ); /** \} */ @@ -81,7 +80,6 @@ private: IMPL_PERSISTENT_OPS( MbNurbs3DCreator ) - //------------------------------------------------------------------------------ /** \brief \ru Создать пространственный сплайн через точки и с сопряжениями. \en Create a spatial spline through points and with the given tangents. \~ @@ -96,14 +94,14 @@ IMPL_PERSISTENT_OPS( MbNurbs3DCreator ) \ingroup Curve3D_Modeling */ //--- -MATH_FUNC (MbCreator *) CreateSplineThrough( const SArray & points, // \ru Точки \en Points - MbeSplineParamType paramType, // \ru Тип параметризации \en Parametrization type - size_t degree, // \ru Порядок сплайна \en Spline degree - bool closed, // \ru Замкнуть \en Make close - RPArray & transitions, // \ru Сопряжения \en Tangents - const MbSNameMaker & snMaker, // \ru Именователь \en An object for naming the new objects - MbResultType & resType, - MbCurve3D *& resCurve ); +MATH_FUNC (MbCreator *) CreateSplineThrough( const SArray & points, // \ru Точки \en Points + MbeSplineParamType paramType, // \ru Тип параметризации \en Parametrization type + size_t degree, // \ru Порядок сплайна \en Spline degree + bool closed, // \ru Замкнуть \en Make close + RPArray< MbPntMatingData > & transitions, // \ru Сопряжения \en Tangents + const MbSNameMaker & snMaker, // \ru Именователь \en An object for naming the new objects + MbResultType & resType, + MbCurve3D *& resCurve ); //------------------------------------------------------------------------------ @@ -117,15 +115,15 @@ MATH_FUNC (MbCreator *) CreateSplineThrough( const SArray & */ //--- MATH_FUNC (MbCreator *) CreateSplineBy( const SArray & points, // \ru Точки \en Points - size_t degree, // \ru Порядок сплайна \en Spline degree - bool closed, // \ru Замкнуть \en Make close + size_t degree, // \ru Порядок сплайна \en Spline degree + bool closed, // \ru Замкнуть \en Make close const SArray * weights, // \ru Веса \en Weights const SArray * knots, // \ru Узлы \en Knots - c3d::PntMatingData3D * begData, // \ru Сопряжение в начале \en Tangent at the start point - c3d::PntMatingData3D * endData, // \ru Сопряжение в конце \en Tangent at the end point + MbPntMatingData * begData, // \ru Сопряжение в начале \en Tangent at the start point + MbPntMatingData * endData, // \ru Сопряжение в конце \en Tangent at the end point const MbSNameMaker & snMaker, // \ru Именователь \en An object for naming the new objects - MbResultType & resType, - MbCurve3D *& resCurve ); + MbResultType & resType, + MbCurve3D *& resCurve ); #endif // __CR_NURBS3D_H diff --git a/C3d/Include/cr_nurbs_block_solid.h b/C3d/Include/cr_nurbs_block_solid.h index 6c4f70c..1b2aeff 100644 --- a/C3d/Include/cr_nurbs_block_solid.h +++ b/C3d/Include/cr_nurbs_block_solid.h @@ -40,12 +40,12 @@ public: // \ru Деструктор \en Destructor public: // \ru Общие функции математического объекта \en Common functions of the mathematical object virtual MbeCreatorType IsA() const; // \ru Тип элемента \en A type of element - virtual MbCreator & Duplicate( MbRegDuplicate * = c3d_null ) const; // \ru Сделать копию \en Create a copy + virtual MbCreator & Duplicate( MbRegDuplicate * = NULL ) const; // \ru Сделать копию \en Create a copy virtual bool IsSame( const MbCreator & other, double accuracy ) const; // \ru Являются ли объекты равными? \en Determine whether an object is equal? virtual bool SetEqual ( const MbCreator & ); // \ru Сделать равным \en Make equal - virtual void Transform( const MbMatrix3D &, MbRegTransform * = c3d_null ); // \ru Преобразовать по матрице \en Transform according to the matrix - virtual void Move ( const MbVector3D &, MbRegTransform * = c3d_null ); // \ru Сдвиг по вектору \en Translation by a vector - virtual void Rotate ( const MbAxis3D &, double angle, MbRegTransform * = c3d_null ); // \ru Повернуть вокруг оси \en Rotate around an axis + virtual void Transform( const MbMatrix3D &, MbRegTransform * = NULL ); // \ru Преобразовать по матрице \en Transform according to the matrix + virtual void Move ( const MbVector3D &, MbRegTransform * = NULL ); // \ru Сдвиг по вектору \en Translation by a vector + virtual void Rotate ( const MbAxis3D &, double angle, MbRegTransform * = NULL ); // \ru Повернуть вокруг оси \en Rotate around an axis virtual MbePrompt GetPropertyName(); // \ru Выдать заголовок свойства объекта \en Get a name of object property virtual void GetProperties( MbProperties & properties ); // \ru Выдать свойства объекта \en Get properties of the object @@ -57,7 +57,7 @@ public: // \ru Общие функции математического объе public: /// \ru Построение оболочки \en Creation of a shell virtual bool CreateShell( MbFaceShell *& shell, MbeCopyMode sameShell, - RPArray * items = c3d_null ); + RPArray * items = NULL ); virtual void Refresh( MbFaceShell & outer ); ///< \ru Обновить форму оболочки \en Update shape of the shell private: diff --git a/C3d/Include/cr_nurbs_surfaces_shell.h b/C3d/Include/cr_nurbs_surfaces_shell.h index dc84e16..02a0ede 100644 --- a/C3d/Include/cr_nurbs_surfaces_shell.h +++ b/C3d/Include/cr_nurbs_surfaces_shell.h @@ -24,36 +24,38 @@ class IProgressIndicator; \en Construct a shell from NURBS-surfaces. \~ \details \ru Построить оболочку из NURBS-поверхностей MbSplineSurface по заданному множеству точек условно расположенных в узлах четырехугольной сетки. \n \en Construct a shell from NURBS-surfaces MbSplineSurface by a given set of points conventionally located at the nodes of a quadrangle grid. \n \~ - \param[in] params - \ru Параметры построения. - \en Parameters of a shell creation. \~ + \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. \~ \param[out] indicator - \ru Индикатор хода построения позволяющий прервать построение. \en Construction process indicator which allow to interrupt the construction. \~ - \result \ru Возвращает построенную оболочку. - \en Returns the constructed shell. \~ + \result \ru Возвращает оболочку. + \en Returns the constructуed shell. \~ \ingroup Model_Creators */ // --- -MATH_FUNC (MbFaceShell *) CreateNurbsSurfacesShell( NurbsSurfaceValues & params, - const MbSNameMaker & operNames, - bool isPhantom, - MbResultType & res, - IProgressIndicator * indicator = c3d_null ); +MATH_FUNC (MbFaceShell *) CreateNurbsSurfacesShell( NurbsSurfaceValues & params, + const MbSNameMaker & operNames, + bool isPhantom, + MbResultType & res, + IProgressIndicator * = NULL ); //------------------------------------------------------------------------------ -// Проверить оболочку из нурбс-поверхностей -/** \brief \ru Проверить оболочку из NURBS-поверхностей. - \en Check a shell from NURBS-surfaces. \~ - \details \ru Проверить построенную оболочку из NURBS-поверхностей MbSplineSurface по заданному множеству точек условно расположенных в узлах четырехугольной сетки. \n - \en Check a constructed shell from NURBS-surfaces MbSplineSurface by a given set of points conventionally located at the nodes of a quadrangle grid. \n \~ - \param[in] params - \ru Параметры построения. - \en Parameters of a shell creation. \~ +// проверить оболочку из нурбс-поверхностей +/** \brief \ru Построить оболочку из NURBS-поверхностей. + \en Construct a shell from NURBS-surfaces. \~ + \details \ru Построить оболочку из NURBS-поверхностей MbSplineSurface по заданному множеству точек условно расположенных в узлах четырехугольной сетки. \n + \en Construct a shell from NURBS-surfaces MbSplineSurface by a given set of points conventionally located at the nodes of a quadrangle grid. \n \~ + \param[in] parameters - \ru Параметры построения. + \en Parameters of a shell creation. \~ \param[in] shell - \ru Оболочка, построенная по заданным параметрам. \en The shell constructed by given parameters. \~ \param[out] indicator - \ru Индикатор хода построения позволяющий прервать построение. @@ -64,8 +66,8 @@ MATH_FUNC (MbFaceShell *) CreateNurbsSurfacesShell( NurbsSurfaceValues & p */ // --- MATH_FUNC (MbResultType) CheckNurbsSurfacesShell( const NurbsSurfaceValues & params, - const MbFaceShell & shell, - IProgressIndicator * indicator = c3d_null ); + const MbFaceShell & shell, + IProgressIndicator * = NULL ); #endif // __NURBS_SURFACES_SHELL_H diff --git a/C3d/Include/cr_nurbs_surfaces_solid.h b/C3d/Include/cr_nurbs_surfaces_solid.h index d4d335b..6cec11e 100644 --- a/C3d/Include/cr_nurbs_surfaces_solid.h +++ b/C3d/Include/cr_nurbs_surfaces_solid.h @@ -50,12 +50,12 @@ public: public: // \ru Общие функции математического объекта \en Common functions of the mathematical object virtual MbeCreatorType IsA() const; // \ru Тип элемента \en Type of element - virtual MbCreator & Duplicate( MbRegDuplicate * = c3d_null ) const; // \ru сделать копию \en create a copy + virtual MbCreator & Duplicate( MbRegDuplicate * = NULL ) const; // \ru сделать копию \en create a copy virtual bool IsSame( const MbCreator &, double accuracy ) const; // \ru Являются ли объекты равными? \en Determine whether an object is equal? virtual bool SetEqual ( const MbCreator & ); // \ru сделать равным \en make equal - virtual void Transform( const MbMatrix3D &, MbRegTransform * = c3d_null ); // \ru Преобразовать по матрице \en Transform according to the matrix - virtual void Move ( const MbVector3D &, MbRegTransform * = c3d_null ); // \ru сдвиг по вектору \en translation by a vector - virtual void Rotate ( const MbAxis3D &, double angle, MbRegTransform * = c3d_null ); // \ru Повернуть вокруг оси \en Rotate about an axis + virtual void Transform( const MbMatrix3D &, MbRegTransform * = NULL ); // \ru Преобразовать по матрице \en Transform according to the matrix + virtual void Move ( const MbVector3D &, MbRegTransform * = NULL ); // \ru сдвиг по вектору \en translation by a vector + virtual void Rotate ( const MbAxis3D &, double angle, MbRegTransform * = NULL ); // \ru Повернуть вокруг оси \en Rotate about an axis virtual MbePrompt GetPropertyName(); // \ru выдать заголовок свойства объекта \en get a name of object property virtual void GetProperties( MbProperties & properties ); // \ru выдать свойства объекта \en get properties of the object @@ -67,7 +67,7 @@ public: // \ru Общие функции математического объе public: /// \ru построение оболочки \en creation of a shell virtual bool CreateShell( MbFaceShell *& shell, MbeCopyMode sameShell, - RPArray * items = c3d_null ); + RPArray * items = NULL ); virtual void Refresh( MbFaceShell & outer ); ///< \ru обновить форму оболочки \en update shape of the shell // \ru Дать параметры. \en Get the parameters. @@ -110,7 +110,7 @@ MATH_FUNC (MbCreator *) CreateNurbsShell( NurbsSurfaceValues & parameters, bool isPhantom, MbResultType & res, MbFaceShell *& shell, - IProgressIndicator * indicator = c3d_null ); + IProgressIndicator * indicator = NULL ); #endif // __CR_NURBS_SURFACES_SOLID_H diff --git a/C3d/Include/cr_offset_curve.h b/C3d/Include/cr_offset_curve.h index b41e9b9..7cfd3fc 100644 --- a/C3d/Include/cr_offset_curve.h +++ b/C3d/Include/cr_offset_curve.h @@ -60,15 +60,15 @@ public : // \ru Общие функции строителя. \en The common functions of the creator. virtual MbeCreatorType IsA() const; // \ru Тип элемента \en A type of element - virtual MbCreator & Duplicate( MbRegDuplicate * iReg = c3d_null ) const; // \ru Сделать копию \en Create a copy + virtual MbCreator & Duplicate( MbRegDuplicate * iReg = NULL ) const; // \ru Сделать копию \en Create a copy virtual bool IsSame ( const MbCreator &, double accuracy ) const; // \ru Являются ли объекты равными? \en Determine whether an object is equal? virtual bool IsSimilar( const MbCreator & ) const; // \ru Являются ли объекты подобными \en Whether the objects are similar virtual bool SetEqual ( const MbCreator & ); // \ru Сделать равным \en Make equal - virtual void Transform( const MbMatrix3D &, MbRegTransform * = c3d_null ); // \ru Преобразовать элемент согласно матрице \en Transform element according to the matrix - virtual void Move ( const MbVector3D &, MbRegTransform * = c3d_null ); // \ru Сдвиг \en Translation - virtual void Rotate ( const MbAxis3D &, double angle, MbRegTransform * = c3d_null ); // \ru Повернуть вокруг оси \en Rotate about an axis + virtual void Transform( const MbMatrix3D &, MbRegTransform * = NULL ); // \ru Преобразовать элемент согласно матрице \en Transform element according to the matrix + virtual void Move ( const MbVector3D &, MbRegTransform * = NULL ); // \ru Сдвиг \en Translation + virtual void Rotate ( const MbAxis3D &, double angle, MbRegTransform * = NULL ); // \ru Повернуть вокруг оси \en Rotate about an axis virtual MbePrompt GetPropertyName(); // \ru Дать имя свойства объекта \en Get the object property name virtual void GetProperties( MbProperties & ); // \ru Выдать свойства объекта \en Get properties of the object @@ -81,7 +81,7 @@ public : virtual bool SetInternalCreators( MbeCreatorType, c3d::CreatorsSPtrVector & ); // \ru Получить внутренние построители по типу. \en Get internal creators by type. // \ru Построить кривую по журналу построения \en Create a curve from the history tree - virtual bool CreateWireFrame( MbWireFrame *&, MbeCopyMode, RPArray * items = c3d_null ); + virtual bool CreateWireFrame( MbWireFrame *&, MbeCopyMode, RPArray * items = NULL ); /** \} */ diff --git a/C3d/Include/cr_patch_creator.h b/C3d/Include/cr_patch_creator.h index cfd14bc..249e62f 100644 --- a/C3d/Include/cr_patch_creator.h +++ b/C3d/Include/cr_patch_creator.h @@ -54,10 +54,10 @@ public : // \ru Общие функции математического объекта \en Common functions of the mathematical object virtual MbeCreatorType IsA() const; // \ru Тип элемента \en Type of element - virtual MbCreator & Duplicate( MbRegDuplicate * = c3d_null ) const ; - virtual void Transform( const MbMatrix3D &, MbRegTransform * = c3d_null ); - virtual void Move ( const MbVector3D &, MbRegTransform * = c3d_null ); - virtual void Rotate ( const MbAxis3D &, double angle, MbRegTransform * = c3d_null ); + virtual MbCreator & Duplicate( MbRegDuplicate * = NULL ) const ; + virtual void Transform( const MbMatrix3D &, MbRegTransform * = NULL ); + virtual void Move ( const MbVector3D &, MbRegTransform * = NULL ); + virtual void Rotate ( const MbAxis3D &, double angle, MbRegTransform * = NULL ); virtual MbePrompt GetPropertyName(); // \ru Выдать заголовок свойства объекта \en Get a name of object property virtual void GetProperties( MbProperties & ); // \ru Выдать свойства объекта \en Get properties of the object @@ -72,7 +72,7 @@ public : // \ru Построение оболочки по исходным данным \en Construction of a shell from the given data virtual bool CreateShell( MbFaceShell *& shell, MbeCopyMode sameShell, - RPArray * items = c3d_null ); + RPArray * items = NULL ); // \ru Дать параметры. \en Get the parameters. void GetParameters( PatchValues & params ) const { params = parameters; } @@ -145,8 +145,8 @@ MATH_FUNC (MbCreator *) CreatePatchSet( const RPArray & initEdges, Одновременно с построением оболочки функция создает её строитель.\n \en Construct a patch-shaped shell from the given curves. The function simultaneously creates the shell and its constructor.\n \~ - \param[in] initCurves - \ru Кривые, определяющие края заплатки. - \en Curves determining the bounds of the patch. \~ + \param[in] initEdges - \ru Кривые, определяющие края заплатки. + \en Curves determining the bounds of the patch. \~ \param[in] parameters - \ru Параметры построения. \en Parameters of shell creation. \~ \param[in] operNames - \ru Именователь граней. @@ -160,11 +160,11 @@ MATH_FUNC (MbCreator *) CreatePatchSet( const RPArray & initEdges, \ingroup Model_Creators */ // --- -MATH_FUNC (MbCreator *) CreatePatchSet( const RPArray & initCurves, - const PatchValues & parameters, - const MbSNameMaker & operNames, - MbResultType & res, - MbFaceShell *& shell ); +MATH_FUNC (MbCreator *)CreatePatchSet( const RPArray & initCurves, + const PatchValues & parameters, + const MbSNameMaker & operNames, + MbResultType & res, + MbFaceShell *& shell ); #endif // __CR_PATCH_CREATOR_H diff --git a/C3d/Include/cr_projection_curve.h b/C3d/Include/cr_projection_curve.h index 847cbd9..0fcbee4 100644 --- a/C3d/Include/cr_projection_curve.h +++ b/C3d/Include/cr_projection_curve.h @@ -49,15 +49,15 @@ public: // \ru Общие функции строителя. \en The common functions of the creator. virtual MbeCreatorType IsA() const; // \ru Тип элемента \en A type of element - virtual MbCreator & Duplicate( MbRegDuplicate * iReg = c3d_null ) const; // \ru Сделать копию \en Create a copy + virtual MbCreator & Duplicate( MbRegDuplicate * iReg = NULL ) const; // \ru Сделать копию \en Create a copy virtual bool IsSame ( const MbCreator &, double accuracy ) const; // \ru Являются ли объекты равными? \en Determine whether an object is equal? virtual bool IsSimilar( const MbCreator & ) const; // \ru Являются ли объекты подобными \en Whether the objects are similar virtual bool SetEqual ( const MbCreator & ); // \ru Сделать равным \en Make equal - virtual void Transform( const MbMatrix3D &, MbRegTransform * = c3d_null ); // \ru Преобразовать элемент согласно матрице \en Transform element according to the matrix - virtual void Move ( const MbVector3D &, MbRegTransform * = c3d_null ); // \ru Сдвиг \en Translation - virtual void Rotate ( const MbAxis3D &, double angle, MbRegTransform * = c3d_null ); // \ru Повернуть вокруг оси \en Rotate about an axis + virtual void Transform( const MbMatrix3D &, MbRegTransform * = NULL ); // \ru Преобразовать элемент согласно матрице \en Transform element according to the matrix + virtual void Move ( const MbVector3D &, MbRegTransform * = NULL ); // \ru Сдвиг \en Translation + virtual void Rotate ( const MbAxis3D &, double angle, MbRegTransform * = NULL ); // \ru Повернуть вокруг оси \en Rotate about an axis virtual MbePrompt GetPropertyName(); // \ru Дать имя свойства объекта \en Get the object property name virtual void GetProperties( MbProperties & ); // \ru Выдать свойства объекта \en Get properties of the object @@ -70,7 +70,7 @@ public: virtual bool SetInternalCreators( MbeCreatorType, c3d::CreatorsSPtrVector & ); // \ru Получить внутренние построители по типу. \en Get internal creators by type. // \ru Построить кривую по журналу построения \en Create a curve from the history tree - virtual bool CreateWireFrame( MbWireFrame *&, MbeCopyMode, RPArray * items = c3d_null ); + virtual bool CreateWireFrame( MbWireFrame *&, MbeCopyMode, RPArray * items = NULL ); /** \} */ diff --git a/C3d/Include/cr_revolution_solid.h b/C3d/Include/cr_revolution_solid.h index f1188f1..0ead11a 100644 --- a/C3d/Include/cr_revolution_solid.h +++ b/C3d/Include/cr_revolution_solid.h @@ -65,10 +65,10 @@ public : \en \name Common functions of the mathematical object. \{ */ virtual MbeCreatorType IsA() const; // \ru Тип элемента \en A type of element - virtual MbCreator & Duplicate( MbRegDuplicate * = c3d_null ) const ; // \ru Сделать копию \en Create a copy - virtual void Transform( const MbMatrix3D &, MbRegTransform * = c3d_null ); // \ru Преобразовать элемент согласно матрице \en Transform element according to the matrix - virtual void Move( const MbVector3D &, MbRegTransform * = c3d_null ); // \ru Сдвиг \en Translation - virtual void Rotate( const MbAxis3D &, double angle, MbRegTransform * = c3d_null ); // \ru Повернуть вокруг оси \en Rotate around an axis + virtual MbCreator & Duplicate( MbRegDuplicate * = NULL ) const ; // \ru Сделать копию \en Create a copy + virtual void Transform( const MbMatrix3D &, MbRegTransform * = NULL ); // \ru Преобразовать элемент согласно матрице \en Transform element according to the matrix + virtual void Move( const MbVector3D &, MbRegTransform * = NULL ); // \ru Сдвиг \en Translation + virtual void Rotate( const MbAxis3D &, double angle, MbRegTransform * = NULL ); // \ru Повернуть вокруг оси \en Rotate around an axis virtual void GetProperties( MbProperties & ); // \ru Выдать свойства объекта \en Get properties of the object virtual void SetProperties( const MbProperties & ); // \ru Записать свойства объекта \en Set properties of the object diff --git a/C3d/Include/cr_rib_solid.h b/C3d/Include/cr_rib_solid.h index d2ca4c2..3744a18 100644 --- a/C3d/Include/cr_rib_solid.h +++ b/C3d/Include/cr_rib_solid.h @@ -43,10 +43,10 @@ public : // \ru Общие функции математического объекта \en Common functions of the mathematical object virtual MbeCreatorType IsA () const; // \ru Тип элемента \en A type of element - virtual MbCreator & Duplicate( MbRegDuplicate * = c3d_null ) const; // \ru Сделать копию \en Create a copy - virtual void Transform ( const MbMatrix3D & matr, MbRegTransform * = c3d_null ); // \ru Преобразовать элемент согласно матрице \en Transform element according to the matrix - virtual void Move ( const MbVector3D & to, MbRegTransform * = c3d_null ); // \ru Сдвиг \en Translation - virtual void Rotate ( const MbAxis3D & axis, double angle, MbRegTransform * = c3d_null ); // \ru Повернуть вокруг оси \en Rotate around an axis + virtual MbCreator & Duplicate( MbRegDuplicate * = NULL ) const; // \ru Сделать копию \en Create a copy + virtual void Transform ( const MbMatrix3D & matr, MbRegTransform * = NULL ); // \ru Преобразовать элемент согласно матрице \en Transform element according to the matrix + virtual void Move ( const MbVector3D & to, MbRegTransform * = NULL ); // \ru Сдвиг \en Translation + virtual void Rotate ( const MbAxis3D & axis, double angle, MbRegTransform * = NULL ); // \ru Повернуть вокруг оси \en Rotate around an axis virtual void GetProperties( MbProperties & properties ); // \ru Выдать свойства объекта \en Get properties of the object virtual void SetProperties( const MbProperties & properties ); // \ru Записать свойства объекта \en Set properties of the object @@ -59,7 +59,7 @@ public : // \ru Общие функции твердого тела \en Common functions of solid virtual bool CreateShell( MbFaceShell *&shell, MbeCopyMode sameShell, - RPArray *items = c3d_null ); // \ru Построение \en Construction + RPArray *items = NULL ); // \ru Построение \en Construction // \ru Дать параметры. \en Get the parameters. void GetParameters( RibValues & params ) const { params = parameters; } diff --git a/C3d/Include/cr_ruled_shell.h b/C3d/Include/cr_ruled_shell.h index 06d1c5b..5d8b130 100644 --- a/C3d/Include/cr_ruled_shell.h +++ b/C3d/Include/cr_ruled_shell.h @@ -46,12 +46,12 @@ public: public: // \ru Общие функции математического объекта \en Common functions of the mathematical object virtual MbeCreatorType IsA() const; ///< \ru Тип элемента \en Element type - virtual MbCreator & Duplicate( MbRegDuplicate * = c3d_null ) const; ///< \ru Сделать копию \en Make a copy + virtual MbCreator & Duplicate( MbRegDuplicate * = NULL ) const; ///< \ru Сделать копию \en Make a copy virtual bool IsSame( const MbCreator &, double accuracy ) const; // \ru Являются ли объекты равными? \en Determine whether an object is equal? virtual bool SetEqual ( const MbCreator & ); ///< \ru Сделать равным \en Make equal - virtual void Transform( const MbMatrix3D &, MbRegTransform * = c3d_null ); ///< \ru Преобразовать по матрице \en Transform according to the matrix - virtual void Move ( const MbVector3D &, MbRegTransform * = c3d_null ); ///< \ru Сдвиг по вектору \en Translation by the vector - virtual void Rotate ( const MbAxis3D &, double angle, MbRegTransform * = c3d_null ); ///< \ru Поворот вокруг оси \en Rotation about an axis + virtual void Transform( const MbMatrix3D &, MbRegTransform * = NULL ); ///< \ru Преобразовать по матрице \en Transform according to the matrix + virtual void Move ( const MbVector3D &, MbRegTransform * = NULL ); ///< \ru Сдвиг по вектору \en Translation by the vector + virtual void Rotate ( const MbAxis3D &, double angle, MbRegTransform * = NULL ); ///< \ru Поворот вокруг оси \en Rotation about an axis virtual void GetProperties( MbProperties & properties ); ///< \ru Выдать свойства объекта \en Get properties of the object virtual void SetProperties( const MbProperties & properties ); ///< \ru Записать свойства объекта \en Write properties of the object @@ -63,7 +63,7 @@ public: // \ru Общие функции математического объе public: /// \ru Построение оболочки \en Creation of a shell virtual bool CreateShell( MbFaceShell *& shell, MbeCopyMode sameShell, - RPArray * items = c3d_null ); + RPArray * items = NULL ); // \ru Дать параметры. \en Get the parameters. void GetParameters( RuledSurfaceValues & params ) const; // \ru Установить параметры. \en Set the parameters. diff --git a/C3d/Include/cr_section_shell.h b/C3d/Include/cr_section_shell.h index cb8efd4..a2fafd4 100644 --- a/C3d/Include/cr_section_shell.h +++ b/C3d/Include/cr_section_shell.h @@ -54,10 +54,10 @@ public : \en \name Common functions of the mathematical object. \{ */ virtual MbeCreatorType IsA() const; // \ru Тип элемента \en A type of element - virtual MbCreator & Duplicate( MbRegDuplicate * = c3d_null ) const ; // \ru Сделать копию \en Create a copy - virtual void Transform( const MbMatrix3D &, MbRegTransform * = c3d_null ); // \ru Преобразовать элемент согласно матрице \en Transform element according to the matrix - virtual void Move ( const MbVector3D &, MbRegTransform * = c3d_null ); // \ru Сдвиг \en Translation - virtual void Rotate ( const MbAxis3D &, double angle, MbRegTransform * = c3d_null ); // \ru Повернуть вокруг оси \en Rotate around an axis + virtual MbCreator & Duplicate( MbRegDuplicate * = NULL ) const ; // \ru Сделать копию \en Create a copy + virtual void Transform( const MbMatrix3D &, MbRegTransform * = NULL ); // \ru Преобразовать элемент согласно матрице \en Transform element according to the matrix + virtual void Move ( const MbVector3D &, MbRegTransform * = NULL ); // \ru Сдвиг \en Translation + virtual void Rotate ( const MbAxis3D &, double angle, MbRegTransform * = NULL ); // \ru Повернуть вокруг оси \en Rotate around an axis virtual void GetProperties( MbProperties & ); // \ru Выдать свойства объекта \en Get properties of the object virtual void SetProperties( const MbProperties & ); // \ru Записать свойства объекта \en Set properties of the object @@ -75,7 +75,7 @@ public : \en \name Common functions of the rigid solid (forming operations). \{ */ virtual bool CreateShell( MbFaceShell *& shell, MbeCopyMode sameShell, - RPArray * items = c3d_null ); // \ru Построение \en Construction + RPArray * items = NULL ); // \ru Построение \en Construction virtual void SetYourVersion( VERSION version ); /** \} */ diff --git a/C3d/Include/cr_sheet_bend_any_solid.h b/C3d/Include/cr_sheet_bend_any_solid.h index 09eb4bb..e1e4136 100644 --- a/C3d/Include/cr_sheet_bend_any_solid.h +++ b/C3d/Include/cr_sheet_bend_any_solid.h @@ -47,15 +47,15 @@ public: // \ru Общие функции математического объекта \en Common functions of the mathematical object virtual MbeCreatorType IsA() const; // \ru Тип элемента \en Type of element - virtual MbCreator & Duplicate( MbRegDuplicate * = c3d_null ) const; // \ru Сделать копию \en Create a copy + virtual MbCreator & Duplicate( MbRegDuplicate * = NULL ) const; // \ru Сделать копию \en Create a copy virtual bool IsSame ( const MbCreator & other, double accuracy ) const; // \ru Являются ли объекты равными? \en Determine whether an object is equal? virtual bool IsSimilar( const MbCreator & item ) const; // \ru Являются ли объекты подобными? \en Determine whether an object is similar? virtual bool SetEqual ( const MbCreator & ); // \ru Сделать равным \en Make equal - virtual void Transform( const MbMatrix3D &, MbRegTransform * = c3d_null ); // \ru Преобразовать элемент согласно матрице \en Transform element according to the matrix - virtual void Move ( const MbVector3D &, MbRegTransform * = c3d_null ); // \ru Сдвиг \en Translation - virtual void Rotate ( const MbAxis3D &, double, MbRegTransform * = c3d_null ); // \ru Повернуть вокруг оси \en Rotate about an axis + virtual void Transform( const MbMatrix3D &, MbRegTransform * = NULL ); // \ru Преобразовать элемент согласно матрице \en Transform element according to the matrix + virtual void Move ( const MbVector3D &, MbRegTransform * = NULL ); // \ru Сдвиг \en Translation + virtual void Rotate ( const MbAxis3D &, double, MbRegTransform * = NULL ); // \ru Повернуть вокруг оси \en Rotate about an axis virtual void GetProperties( MbProperties & properties ); // \ru Выдать свойства объекта \en Get properties of the object virtual void SetProperties( const MbProperties & properties ); // \ru Записать свойства объекта \en Set properties of the object @@ -65,7 +65,7 @@ public: virtual bool CreateShell( MbFaceShell *& shell, MbeCopyMode sameShell, - RPArray * items = c3d_null ); // \ru Построение \en Construction + RPArray * items = NULL ); // \ru Построение \en Construction private: // \ru Объявление оператора присваивания без реализации, чтобы не было присваивания по умолчанию. \en The declaration of the assignment operator without implementation to prevent an assignment by default. diff --git a/C3d/Include/cr_sheet_bend_by_edge_solid.h b/C3d/Include/cr_sheet_bend_by_edge_solid.h index 2786936..ebda627 100644 --- a/C3d/Include/cr_sheet_bend_by_edge_solid.h +++ b/C3d/Include/cr_sheet_bend_by_edge_solid.h @@ -58,14 +58,14 @@ public: // \ru Общие функции математического объекта \en Common functions of the mathematical object virtual MbeCreatorType IsA() const; // \ru Тип элемента \en Type of element - virtual MbCreator & Duplicate( MbRegDuplicate * = c3d_null ) const; // \ru Сделать копию \en Create a copy + virtual MbCreator & Duplicate( MbRegDuplicate * = NULL ) const; // \ru Сделать копию \en Create a copy virtual bool IsSame ( const MbCreator & other, double accuracy ) const; // \ru Являются ли объекты равными? \en Determine whether an object is equal? virtual bool IsSimilar( const MbCreator & item ) const; // \ru Являются ли объекты подобными? \en Determine whether an object is similar? virtual bool SetEqual ( const MbCreator & ); // \ru Сделать равным \en Make equal - virtual void Transform( const MbMatrix3D & matr, MbRegTransform * = c3d_null ); // \ru Преобразовать элемент согласно матрице \en Transform element according to the matrix - virtual void Move ( const MbVector3D & to, MbRegTransform * = c3d_null ); // \ru Сдвиг \en Translation - virtual void Rotate ( const MbAxis3D & axis, double angle, MbRegTransform * = c3d_null ); // \ru Повернуть вокруг оси \en Rotate about an axis + virtual void Transform( const MbMatrix3D & matr, MbRegTransform * = NULL ); // \ru Преобразовать элемент согласно матрице \en Transform element according to the matrix + virtual void Move ( const MbVector3D & to, MbRegTransform * = NULL ); // \ru Сдвиг \en Translation + virtual void Rotate ( const MbAxis3D & axis, double angle, MbRegTransform * = NULL ); // \ru Повернуть вокруг оси \en Rotate about an axis virtual void GetProperties( MbProperties & properties ); // \ru Выдать свойства объекта \en Get properties of the object virtual void SetProperties( const MbProperties & properties ); // \ru Записать свойства объекта \en Set properties of the object @@ -76,7 +76,7 @@ public: virtual bool CreateShell( MbFaceShell *& shell, MbeCopyMode sameShell, - RPArray * items = c3d_null ); // \ru Построение \en Construction + RPArray * items = NULL ); // \ru Построение \en Construction // \ru Дать параметры. \en Get the parameters. void GetParameters( MbBendByEdgeValues & params ) const { params = parameters; } diff --git a/C3d/Include/cr_sheet_bend_over_seg_solid.h b/C3d/Include/cr_sheet_bend_over_seg_solid.h index 8617fdc..be76c67 100644 --- a/C3d/Include/cr_sheet_bend_over_seg_solid.h +++ b/C3d/Include/cr_sheet_bend_over_seg_solid.h @@ -49,15 +49,15 @@ public: // \ru Общие функции математического объекта \en Common functions of the mathematical object virtual MbeCreatorType IsA() const; // \ru Тип элемента \en Type of element - virtual MbCreator & Duplicate( MbRegDuplicate * = c3d_null ) const; // \ru Сделать копию \en Create a copy + virtual MbCreator & Duplicate( MbRegDuplicate * = NULL ) const; // \ru Сделать копию \en Create a copy virtual bool IsSame ( const MbCreator & other, double accuracy ) const; // \ru Являются ли объекты равными? \en Determine whether an object is equal? virtual bool IsSimilar( const MbCreator & item ) const; // \ru Являются ли объекты подобными? \en Determine whether an object is similar? virtual bool SetEqual ( const MbCreator & ); // \ru Сделать равным \en Make equal - virtual void Transform( const MbMatrix3D &, MbRegTransform * = c3d_null ); // \ru Преобразовать элемент согласно матрице \en Transform element according to the matrix - virtual void Move ( const MbVector3D &, MbRegTransform * = c3d_null ); // \ru Сдвиг \en Translation - virtual void Rotate ( const MbAxis3D &, double angle, MbRegTransform * = c3d_null ); // \ru Повернуть вокруг оси \en Rotate about an axis + virtual void Transform( const MbMatrix3D &, MbRegTransform * = NULL ); // \ru Преобразовать элемент согласно матрице \en Transform element according to the matrix + virtual void Move ( const MbVector3D &, MbRegTransform * = NULL ); // \ru Сдвиг \en Translation + virtual void Rotate ( const MbAxis3D &, double angle, MbRegTransform * = NULL ); // \ru Повернуть вокруг оси \en Rotate about an axis virtual MbePrompt GetPropertyName(); // \ru Выдать заголовок свойства объекта \en Get a name of object property virtual void GetProperties( MbProperties & properties ); // \ru Выдать свойства объекта \en Get properties of the object @@ -69,7 +69,7 @@ public: // \ru Общие функции твердого тела \en Common functions of solid solid virtual bool CreateShell( MbFaceShell *& shell, MbeCopyMode sameShell, - RPArray * items = c3d_null ); // \ru Построение \en Construction + RPArray * items = NULL ); // \ru Построение \en Construction // \ru Дать параметры. \en Get the parameters. void GetParameters( MbBendOverSegValues & params ) const { params = parameters; } diff --git a/C3d/Include/cr_sheet_bend_unbend_solid.h b/C3d/Include/cr_sheet_bend_unbend_solid.h index a6be1a7..e012990 100644 --- a/C3d/Include/cr_sheet_bend_unbend_solid.h +++ b/C3d/Include/cr_sheet_bend_unbend_solid.h @@ -50,15 +50,15 @@ public: // \ru Общие функции математического объекта \en Common functions of the mathematical object virtual MbeCreatorType IsA() const; // \ru Тип элемента \en Type of element - virtual MbCreator & Duplicate( MbRegDuplicate * = c3d_null ) const; // \ru Сделать копию \en Create a copy + virtual MbCreator & Duplicate( MbRegDuplicate * = NULL ) const; // \ru Сделать копию \en Create a copy virtual bool IsSame ( const MbCreator & other, double accuracy ) const; // \ru Являются ли объекты равными? \en Determine whether an object is equal? virtual bool IsSimilar( const MbCreator & item ) const; // \ru Являются ли объекты подобными? \en Determine whether an object is similar? virtual bool SetEqual ( const MbCreator & ); // \ru Сделать равным \en Make equal - virtual void Transform( const MbMatrix3D & matr, MbRegTransform * = c3d_null ); // \ru Преобразовать элемент согласно матрице \en Transform element according to the matrix - virtual void Move ( const MbVector3D & to, MbRegTransform * = c3d_null ); // \ru Сдвиг \en Translation - virtual void Rotate ( const MbAxis3D & axis, double angle, MbRegTransform * = c3d_null ); // \ru Повернуть вокруг оси \en Rotate about an axis + virtual void Transform( const MbMatrix3D & matr, MbRegTransform * = NULL ); // \ru Преобразовать элемент согласно матрице \en Transform element according to the matrix + virtual void Move ( const MbVector3D & to, MbRegTransform * = NULL ); // \ru Сдвиг \en Translation + virtual void Rotate ( const MbAxis3D & axis, double angle, MbRegTransform * = NULL ); // \ru Повернуть вокруг оси \en Rotate about an axis virtual void GetProperties( MbProperties & properties ); // \ru Выдать свойства объекта \en Get properties of the object virtual void SetProperties( const MbProperties & properties ); // \ru Записать свойства объекта \en Set properties of the object @@ -68,7 +68,7 @@ public: virtual bool CreateShell( MbFaceShell *& shell, MbeCopyMode sameShell, - RPArray * items = c3d_null ); // \ru Построение \en Construction + RPArray * items = NULL ); // \ru Построение \en Construction private: // \ru Объявление оператора присваивания без реализации, чтобы не было присваивания по умолчанию. \en The declaration of the assignment operator without implementation to prevent an assignment by default. @@ -122,7 +122,7 @@ MATH_FUNC (MbCreator *) CreateBendUnbend( SPtr & init const MbSNameMaker & names, MbResultType & res, MbFaceShell *& shell, - RPArray * ribContours = c3d_null ); + RPArray * ribContours = NULL ); diff --git a/C3d/Include/cr_sheet_builder_solid.h b/C3d/Include/cr_sheet_builder_solid.h index 55b3003..a0d52e1 100644 --- a/C3d/Include/cr_sheet_builder_solid.h +++ b/C3d/Include/cr_sheet_builder_solid.h @@ -44,15 +44,15 @@ public: // \ru Общие функции математического объекта. \en Common functions of the mathematical object. virtual MbeCreatorType IsA() const; // \ru Тип элемента. \en A type of element. - virtual MbCreator & Duplicate( MbRegDuplicate * = c3d_null ) const; // \ru Сделать копию. \en Create a copy. + virtual MbCreator & Duplicate( MbRegDuplicate * = NULL ) const; // \ru Сделать копию. \en Create a copy. virtual bool IsSame ( const MbCreator & other, double accuracy ) const; // \ru Являются ли объекты равными? \en Determine whether an object is equal? virtual bool IsSimilar( const MbCreator & item ) const; // \ru Являются ли объекты подобными? \en Determine whether an object is similar? virtual bool SetEqual ( const MbCreator & ); // \ru Сделать равным. \en Make equal. - virtual void Transform( const MbMatrix3D &, MbRegTransform * = c3d_null ); // \ru Преобразовать элемент согласно матрице. \en Transform element according to the matrix. - virtual void Move ( const MbVector3D &, MbRegTransform * = c3d_null ); // \ru Сдвиг. \en Translation. - virtual void Rotate ( const MbAxis3D &, double angle, MbRegTransform * = c3d_null ); // \ru Повернуть вокруг оси. \en Rotate around an axis. + virtual void Transform( const MbMatrix3D &, MbRegTransform * = NULL ); // \ru Преобразовать элемент согласно матрице. \en Transform element according to the matrix. + virtual void Move ( const MbVector3D &, MbRegTransform * = NULL ); // \ru Сдвиг. \en Translation. + virtual void Rotate ( const MbAxis3D &, double angle, MbRegTransform * = NULL ); // \ru Повернуть вокруг оси. \en Rotate around an axis. virtual void GetProperties ( MbProperties & properties ); // \ru Выдать свойства объекта. \en Get properties of the object. virtual void SetProperties ( const MbProperties & properties ); // \ru Записать свойства объекта. \en Set properties of the object. @@ -61,7 +61,7 @@ public: // \ru Общие функции твердого тела. \en Common functions of solid. // \ru Построение оболочки листового тела. \en Construction of a sheet metal shell. - virtual bool CreateShell( MbFaceShell *& shell, MbeCopyMode sameShell, RPArray *items = c3d_null ); + virtual bool CreateShell( MbFaceShell *& shell, MbeCopyMode sameShell, RPArray *items = NULL ); // \ru Получить параметры. \en Get the parameters. void GetParameters( MbSolidToSheetMetalValues & params ) const { params = parameters; } // \ru Установить параметры. \en Set the parameters. diff --git a/C3d/Include/cr_sheet_closed_corner_solid.h b/C3d/Include/cr_sheet_closed_corner_solid.h index fa86c6c..3dc6773 100644 --- a/C3d/Include/cr_sheet_closed_corner_solid.h +++ b/C3d/Include/cr_sheet_closed_corner_solid.h @@ -50,15 +50,15 @@ public: // \ru Общие функции математического объекта \en Common functions of the mathematical object virtual MbeCreatorType IsA() const; // \ru Тип элемента \en Type of element - virtual MbCreator & Duplicate( MbRegDuplicate * = c3d_null ) const; // \ru Сделать копию \en Create a copy + virtual MbCreator & Duplicate( MbRegDuplicate * = NULL ) const; // \ru Сделать копию \en Create a copy virtual bool IsSame ( const MbCreator & other, double accuracy ) const; // \ru Являются ли объекты равными? \en Determine whether an object is equal? virtual bool IsSimilar( const MbCreator & item ) const; // \ru Являются ли объекты подобными? \en Determine whether an object is similar? virtual bool SetEqual ( const MbCreator & ); // \ru Сделать равным \en Make equal - virtual void Transform( const MbMatrix3D &, MbRegTransform * = c3d_null ); // \ru Преобразовать элемент согласно матрице \en Transform element according to the matrix - virtual void Move ( const MbVector3D &, MbRegTransform * = c3d_null ); // \ru Сдвиг \en Translation - virtual void Rotate ( const MbAxis3D &, double angle, MbRegTransform * = c3d_null ); // \ru Повернуть вокруг оси \en Rotate about an axis + virtual void Transform( const MbMatrix3D &, MbRegTransform * = NULL ); // \ru Преобразовать элемент согласно матрице \en Transform element according to the matrix + virtual void Move ( const MbVector3D &, MbRegTransform * = NULL ); // \ru Сдвиг \en Translation + virtual void Rotate ( const MbAxis3D &, double angle, MbRegTransform * = NULL ); // \ru Повернуть вокруг оси \en Rotate about an axis virtual void GetProperties( MbProperties & properties ); // \ru Выдать свойства объекта \en Get properties of the object virtual void SetProperties( const MbProperties & properties ); // \ru Записать свойства объекта \en Set properties of the object @@ -68,7 +68,7 @@ public: virtual bool CreateShell( MbFaceShell *& shell, MbeCopyMode sameShell, - RPArray * items = c3d_null ); // \ru Построение \en Construction + RPArray * items = NULL ); // \ru Построение \en Construction // \ru Дать параметры. \en Get the parameters. void GetParameters( MbClosedCornerValues & params ) const { params = parameters; } diff --git a/C3d/Include/cr_sheet_joint_bend_solid.h b/C3d/Include/cr_sheet_joint_bend_solid.h index 1e7dc69..45c4b60 100644 --- a/C3d/Include/cr_sheet_joint_bend_solid.h +++ b/C3d/Include/cr_sheet_joint_bend_solid.h @@ -57,15 +57,15 @@ public: // \ru Общие функции математического объекта \en Common functions of the mathematical object virtual MbeCreatorType IsA() const; // \ru Тип элемента \en Type of element - virtual MbCreator & Duplicate( MbRegDuplicate * = c3d_null ) const; // \ru Сделать копию \en Create a copy + virtual MbCreator & Duplicate( MbRegDuplicate * = NULL ) const; // \ru Сделать копию \en Create a copy virtual bool IsSame ( const MbCreator & other, double accuracy ) const; // \ru Являются ли объекты равными? \en Determine whether an object is equal? virtual bool IsSimilar( const MbCreator & item ) const; // \ru Являются ли объекты подобными? \en Determine whether an object is similar? virtual bool SetEqual ( const MbCreator & ); // \ru Сделать равным \en Make equal - virtual void Transform( const MbMatrix3D & matr, MbRegTransform * = c3d_null ); // \ru Преобразовать элемент согласно матрице \en Transform element according to the matrix - virtual void Move ( const MbVector3D & to, MbRegTransform * = c3d_null ); // \ru Сдвиг \en Translation - virtual void Rotate ( const MbAxis3D & axis, double angle, MbRegTransform * = c3d_null ); // \ru Повернуть вокруг оси \en Rotate about an axis + virtual void Transform( const MbMatrix3D & matr, MbRegTransform * = NULL ); // \ru Преобразовать элемент согласно матрице \en Transform element according to the matrix + virtual void Move ( const MbVector3D & to, MbRegTransform * = NULL ); // \ru Сдвиг \en Translation + virtual void Rotate ( const MbAxis3D & axis, double angle, MbRegTransform * = NULL ); // \ru Повернуть вокруг оси \en Rotate about an axis virtual void GetProperties( MbProperties & properties ); // \ru Выдать свойства объекта \en Get properties of the object virtual void SetProperties( const MbProperties & properties ); // \ru Записать свойства объекта \en Set properties of the object @@ -74,7 +74,7 @@ public: // \ru Общие функции твердого тела \en Common functions of solid solid virtual bool CreateShell( MbFaceShell *& shell, MbeCopyMode sameShell, - RPArray * items = c3d_null ); // \ru Построение \en Construction + RPArray * items = NULL ); // \ru Построение \en Construction // \ru Дать параметры. \en Get the parameters. void GetParameters( MbJointBendValues & params ) const { params = parameters; } diff --git a/C3d/Include/cr_sheet_metal_solid.h b/C3d/Include/cr_sheet_metal_solid.h index 0b96d9f..8e9dadb 100644 --- a/C3d/Include/cr_sheet_metal_solid.h +++ b/C3d/Include/cr_sheet_metal_solid.h @@ -82,10 +82,10 @@ public : // \ru Общие функции математического объекта \en Common functions of the mathematical object virtual MbeCreatorType IsA() const; // \ru Тип элемента \en Type of element - virtual MbCreator & Duplicate( MbRegDuplicate * = c3d_null ) const; // \ru Сделать копию \en Create a copy - virtual void Transform( const MbMatrix3D & matr, MbRegTransform * = c3d_null ); // \ru Преобразовать элемент согласно матрице \en Transform element according to the matrix - virtual void Move( const MbVector3D & to, MbRegTransform * = c3d_null ); // \ru Сдвиг \en Translation - virtual void Rotate( const MbAxis3D & axis, double angle, MbRegTransform * = c3d_null ); // \ru Повернуть вокруг оси \en Rotate about an axis + virtual MbCreator & Duplicate( MbRegDuplicate * = NULL ) const; // \ru Сделать копию \en Create a copy + virtual void Transform( const MbMatrix3D & matr, MbRegTransform * = NULL ); // \ru Преобразовать элемент согласно матрице \en Transform element according to the matrix + virtual void Move( const MbVector3D & to, MbRegTransform * = NULL ); // \ru Сдвиг \en Translation + virtual void Rotate( const MbAxis3D & axis, double angle, MbRegTransform * = NULL ); // \ru Повернуть вокруг оси \en Rotate about an axis virtual MbePrompt GetPropertyName(); // \ru Выдать заголовок свойства объекта \en Get a name of object property virtual void GetProperties( MbProperties & properties ); // \ru Выдать свойства объекта \en Get properties of the object @@ -101,7 +101,7 @@ public : // \ru Общие функции твердого тела \en Common functions of solid solid virtual bool CreateShell( MbFaceShell *& shell, MbeCopyMode sameShell, - RPArray * items = c3d_null ); // \ru Построение \en Construction + RPArray * items = NULL ); // \ru Построение \en Construction virtual MbFaceShell * InitShell( bool in ); diff --git a/C3d/Include/cr_sheet_restored_edges_solid.h b/C3d/Include/cr_sheet_restored_edges_solid.h index 08839eb..8066fc3 100644 --- a/C3d/Include/cr_sheet_restored_edges_solid.h +++ b/C3d/Include/cr_sheet_restored_edges_solid.h @@ -45,15 +45,15 @@ public: // \ru Общие функции математического объекта \en Common functions of the mathematical object virtual MbeCreatorType IsA() const; // \ru Тип элемента \en Type of element - virtual MbCreator & Duplicate( MbRegDuplicate * = c3d_null ) const; // \ru Сделать копию \en Create a copy + virtual MbCreator & Duplicate( MbRegDuplicate * = NULL ) const; // \ru Сделать копию \en Create a copy virtual bool IsSame ( const MbCreator & other, double accuracy ) const; // \ru Являются ли объекты равными? \en Determine whether an object is equal? virtual bool IsSimilar( const MbCreator & item ) const; // \ru Являются ли объекты подобными? \en Determine whether an object is similar? virtual bool SetEqual ( const MbCreator & ); // \ru Сделать равным \en Make equal - virtual void Transform( const MbMatrix3D & matr, MbRegTransform * = c3d_null ); // \ru Преобразовать элемент согласно матрице \en Transform element according to the matrix - virtual void Move ( const MbVector3D & to, MbRegTransform * = c3d_null ); // \ru Сдвиг \en Translation - virtual void Rotate ( const MbAxis3D & axis, double angle, MbRegTransform * = c3d_null ); // \ru Повернуть вокруг оси \en Rotate about an axis + virtual void Transform( const MbMatrix3D & matr, MbRegTransform * = NULL ); // \ru Преобразовать элемент согласно матрице \en Transform element according to the matrix + virtual void Move ( const MbVector3D & to, MbRegTransform * = NULL ); // \ru Сдвиг \en Translation + virtual void Rotate ( const MbAxis3D & axis, double angle, MbRegTransform * = NULL ); // \ru Повернуть вокруг оси \en Rotate about an axis virtual void GetProperties( MbProperties & properties ); // \ru Выдать свойства объекта \en Get properties of the object virtual void SetProperties( const MbProperties & properties ); // \ru Записать свойства объекта \en Set properties of the object @@ -63,7 +63,7 @@ public: virtual bool CreateShell( MbFaceShell *& shell, MbeCopyMode sameShell, - RPArray * items = c3d_null ); // \ru Построение \en Construction + RPArray * items = NULL ); // \ru Построение \en Construction private: // \ru Объявление оператора присваивания без реализации, чтобы не было присваивания по умолчанию. \en The declaration of the assignment operator without implementation to prevent an assignment by default. diff --git a/C3d/Include/cr_sheet_simplified_flat_solid.h b/C3d/Include/cr_sheet_simplified_flat_solid.h index 0e73ead..d3d9c96 100644 --- a/C3d/Include/cr_sheet_simplified_flat_solid.h +++ b/C3d/Include/cr_sheet_simplified_flat_solid.h @@ -42,15 +42,15 @@ public: // \ru Общие функции математического объекта \en Common functions of the mathematical object virtual MbeCreatorType IsA() const; // \ru Тип элемента \en Type of element - virtual MbCreator & Duplicate( MbRegDuplicate * = c3d_null ) const; // \ru Сделать копию \en Create a copy + virtual MbCreator & Duplicate( MbRegDuplicate * = NULL ) const; // \ru Сделать копию \en Create a copy virtual bool IsSame ( const MbCreator & other, double accuracy ) const; // \ru Являются ли объекты равными? \en Determine whether an object is equal? virtual bool IsSimilar( const MbCreator & item ) const; // \ru Являются ли объекты подобными? \en Determine whether an object is similar? virtual bool SetEqual ( const MbCreator & ); // \ru Сделать равным \en Make equal - virtual void Transform( const MbMatrix3D &, MbRegTransform * = c3d_null ); // \ru Преобразовать элемент согласно матрице \en Transform element according to the matrix - virtual void Move ( const MbVector3D &, MbRegTransform * = c3d_null ); // \ru Сдвиг \en Translation - virtual void Rotate ( const MbAxis3D &, double, MbRegTransform * = c3d_null ); // \ru Повернуть вокруг оси \en Rotate about an axis + virtual void Transform( const MbMatrix3D &, MbRegTransform * = NULL ); // \ru Преобразовать элемент согласно матрице \en Transform element according to the matrix + virtual void Move ( const MbVector3D &, MbRegTransform * = NULL ); // \ru Сдвиг \en Translation + virtual void Rotate ( const MbAxis3D &, double, MbRegTransform * = NULL ); // \ru Повернуть вокруг оси \en Rotate about an axis virtual void GetProperties( MbProperties & properties ); // \ru Выдать свойства объекта \en Get properties of the object virtual void SetProperties( const MbProperties & properties ); // \ru Записать свойства объекта \en Set properties of the object @@ -60,7 +60,7 @@ public: virtual bool CreateShell( MbFaceShell *& shell, MbeCopyMode sameShell, - RPArray * items = c3d_null ); // \ru Построение \en Construction + RPArray * items = NULL ); // \ru Построение \en Construction private: // \ru Объявление оператора присваивания без реализации, чтобы не было присваивания по умолчанию. \en The declaration of the assignment operator without implementation to prevent an assignment by default. diff --git a/C3d/Include/cr_sheet_union_solid.h b/C3d/Include/cr_sheet_union_solid.h index 18b4a26..fb19969 100644 --- a/C3d/Include/cr_sheet_union_solid.h +++ b/C3d/Include/cr_sheet_union_solid.h @@ -43,10 +43,10 @@ public : // \ru Общие функции математического объекта \en Common functions of the mathematical object virtual MbeCreatorType IsA() const; // \ru Тип элемента \en Type of element - virtual void Transform( const MbMatrix3D &, MbRegTransform * ireg = c3d_null ); // \ru Преобразовать элемент согласно матрице \en Transform element according to the matrix - virtual void Move ( const MbVector3D &, MbRegTransform * ireg = c3d_null ); // \ru Сдвиг \en Translation - virtual void Rotate ( const MbAxis3D &, double angle, MbRegTransform * ireg = c3d_null ); // \ru Повернуть вокруг оси \en Rotate about an axis - virtual MbCreator & Duplicate( MbRegDuplicate * = c3d_null ) const ; // \ru Сделать копию \en Create a copy + virtual void Transform( const MbMatrix3D &, MbRegTransform * ireg = NULL ); // \ru Преобразовать элемент согласно матрице \en Transform element according to the matrix + virtual void Move ( const MbVector3D &, MbRegTransform * ireg = NULL ); // \ru Сдвиг \en Translation + virtual void Rotate ( const MbAxis3D &, double angle, MbRegTransform * ireg = NULL ); // \ru Повернуть вокруг оси \en Rotate about an axis + virtual MbCreator & Duplicate( MbRegDuplicate * = NULL ) const ; // \ru Сделать копию \en Create a copy virtual MbePrompt GetPropertyName(); // \ru Выдать заголовок свойства объекта \en Get a name of object property virtual void GetProperties( MbProperties & properties ); // \ru Выдать свойства объекта \en Get properties of the object @@ -62,7 +62,7 @@ public : // \ru Общие функции твердого тела \en Common functions of solid virtual bool CreateShell( MbFaceShell *& shell, MbeCopyMode sameShell, - RPArray * items = c3d_null ); // \ru Построение \en Construction + RPArray * items = NULL ); // \ru Построение \en Construction virtual void SetYourVersion( VERSION version, bool forAll ); diff --git a/C3d/Include/cr_simple_creator.h b/C3d/Include/cr_simple_creator.h index 23a94c6..638eb1e 100644 --- a/C3d/Include/cr_simple_creator.h +++ b/C3d/Include/cr_simple_creator.h @@ -68,10 +68,10 @@ public : \en \name Common functions of the shell creator. \{ */ virtual MbeCreatorType IsA() const; // \ru Тип элемента \en Type of element - virtual MbCreator & Duplicate( MbRegDuplicate * = c3d_null ) const ; // \ru Сделать копию \en Create a copy - virtual void Transform( const MbMatrix3D &, MbRegTransform * = c3d_null ); // \ru Преобразовать элемент согласно матрице \en Transform element according to the matrix - virtual void Move ( const MbVector3D &, MbRegTransform * = c3d_null ); // \ru Сдвиг \en Translation - virtual void Rotate ( const MbAxis3D &, double angle, MbRegTransform * = c3d_null ); // \ru Повернуть вокруг оси \en Rotate about an axis + virtual MbCreator & Duplicate( MbRegDuplicate * = NULL ) const ; // \ru Сделать копию \en Create a copy + virtual void Transform( const MbMatrix3D &, MbRegTransform * = NULL ); // \ru Преобразовать элемент согласно матрице \en Transform element according to the matrix + virtual void Move ( const MbVector3D &, MbRegTransform * = NULL ); // \ru Сдвиг \en Translation + virtual void Rotate ( const MbAxis3D &, double angle, MbRegTransform * = NULL ); // \ru Повернуть вокруг оси \en Rotate about an axis virtual MbePrompt GetPropertyName(); // \ru Выдать заголовок свойства объекта \en Get a name of object property virtual void GetProperties( MbProperties & ); // \ru Выдать свойства объекта \en Get properties of the object @@ -85,7 +85,7 @@ public : virtual bool SetEqual( const MbCreator & ); // \ru Сделать равным \en Make equal virtual bool CreateShell( MbFaceShell *&shell, MbeCopyMode sameShell, - RPArray * items = c3d_null ); // \ru Построение \en Construction + RPArray * items = NULL ); // \ru Построение \en Construction /** \} */ const MbFaceShell * GetShell() const { return outer; } /// \ru Дать оболочку. \en Get a shell. @@ -158,7 +158,7 @@ bool MbSimpleCreator::DeleteShellCopies( const CreatorsVector & creators ) size_t i; for ( i = 0; i < creatorsCnt; ++i ) { MbCreator * creator = creators[i]; - if ( creator != c3d_null ) { + if ( creator != NULL ) { if ( creator->IsA() == ct_SimpleCreator ) { MbSimpleCreator * simpleCreator = static_cast(creator); simpleShells.push_back( std::make_pair( i, simpleCreator->GetShell() ) ); @@ -184,7 +184,7 @@ bool MbSimpleCreator::DeleteShellCopies( const CreatorsVector & creators ) if ( shell1 && shell2 && (shell1 != shell2) ) { if ( shell1->IsSame( *shell2, LENGTH_EPSILON ) ) { sc2.SetShell( *shell1 ); - simpleShells[j].second = c3d_null; + simpleShells[j].second = NULL; isReplaced = true; } } @@ -194,7 +194,7 @@ bool MbSimpleCreator::DeleteShellCopies( const CreatorsVector & creators ) std::sort( simpleShells.begin(), simpleShells.end(), ::SortByShellPointers ); simpleShells.erase( std::unique( simpleShells.begin(), simpleShells.end(), ::AreEqualShellPointers ), simpleShells.end() ); if ( simpleShells.size() > 1 ) { - if ( simpleShells.front().second == c3d_null ) + if ( simpleShells.front().second == NULL ) simpleShells.erase( simpleShells.begin() ); } } @@ -215,7 +215,7 @@ bool MbSimpleCreator::IsThisShell( const MbFaceShell & shell, const CreatorsVect if ( creators.size() > 0 ) { for ( size_t i = creators.size(); i--; ) { const MbCreator * creator = creators[i]; - if ( (creator != c3d_null) && (creator->IsA() == ct_SimpleCreator) ) { + if ( (creator != NULL) && (creator->IsA() == ct_SimpleCreator) ) { const MbSimpleCreator & simpleCreator = static_cast(*creator); if ( simpleCreator.GetShell() == &shell ) { res = true; @@ -253,10 +253,10 @@ public : \en \name Common functions of the shell creator. \{ */ virtual MbeCreatorType IsA() const; // \ru Тип элемента \en Type of element - virtual MbCreator & Duplicate( MbRegDuplicate * = c3d_null ) const ; // \ru Сделать копию \en Create a copy - virtual void Transform( const MbMatrix3D &, MbRegTransform * = c3d_null ); // \ru Преобразовать элемент согласно матрице \en Transform element according to the matrix - virtual void Move ( const MbVector3D &, MbRegTransform * = c3d_null ); // \ru Сдвиг \en Translation - virtual void Rotate ( const MbAxis3D &, double angle, MbRegTransform * = c3d_null ); // \ru Повернуть вокруг оси \en Rotate about an axis + virtual MbCreator & Duplicate( MbRegDuplicate * = NULL ) const ; // \ru Сделать копию \en Create a copy + virtual void Transform( const MbMatrix3D &, MbRegTransform * = NULL ); // \ru Преобразовать элемент согласно матрице \en Transform element according to the matrix + virtual void Move ( const MbVector3D &, MbRegTransform * = NULL ); // \ru Сдвиг \en Translation + virtual void Rotate ( const MbAxis3D &, double angle, MbRegTransform * = NULL ); // \ru Повернуть вокруг оси \en Rotate about an axis virtual MbePrompt GetPropertyName(); // \ru Выдать заголовок свойства объекта \en Get a name of object property virtual void GetProperties( MbProperties & ); // \ru Выдать свойства объекта \en Get properties of the object @@ -267,7 +267,7 @@ public : virtual bool IsSimilar ( const MbCreator & ) const; // \ru Являются ли объекты подобными \en Whether the objects are similar virtual bool CreateShell( MbFaceShell *& shell, MbeCopyMode sameShell, - RPArray * items = c3d_null ); // \ru Построение \en Construction + RPArray * items = NULL ); // \ru Построение \en Construction /** \} */ DECLARE_PERSISTENT_CLASS_NEW_DEL( MbReverseCreator ) diff --git a/C3d/Include/cr_smooth_solid.h b/C3d/Include/cr_smooth_solid.h index d41ce33..3956d04 100644 --- a/C3d/Include/cr_smooth_solid.h +++ b/C3d/Include/cr_smooth_solid.h @@ -42,10 +42,10 @@ public : virtual MbeCreatorType IsA() const = 0; // \ru Тип элемента \en A type of element virtual MbeCreatorType Type() const; // \ru Тип элемента \en A type of element - virtual MbCreator & Duplicate( MbRegDuplicate *iReg = c3d_null ) const = 0; // \ru Сделать копию \en Create a copy - virtual void Transform( const MbMatrix3D &matr, MbRegTransform * = c3d_null ); // \ru Преобразовать элемент согласно матрице \en Transform element according to the matrix - virtual void Move( const MbVector3D &to, MbRegTransform * = c3d_null ); // \ru Сдвиг \en Translation - virtual void Rotate( const MbAxis3D &axis, double angle, MbRegTransform * = c3d_null ); // \ru Повернуть вокруг оси \en Rotate around an axis + virtual MbCreator & Duplicate( MbRegDuplicate *iReg = NULL ) const = 0; // \ru Сделать копию \en Create a copy + virtual void Transform( const MbMatrix3D &matr, MbRegTransform * = NULL ); // \ru Преобразовать элемент согласно матрице \en Transform element according to the matrix + virtual void Move( const MbVector3D &to, MbRegTransform * = NULL ); // \ru Сдвиг \en Translation + virtual void Rotate( const MbAxis3D &axis, double angle, MbRegTransform * = NULL ); // \ru Повернуть вокруг оси \en Rotate around an axis virtual void GetProperties( MbProperties & ) = 0; // \ru Выдать свойства объекта \en Get properties of the object virtual void SetProperties( const MbProperties & ) = 0; // \ru Записать свойства объекта \en Set properties of the object @@ -58,7 +58,7 @@ public : // \ru Общие функции твердого тела \en Common functions of solid virtual bool CreateShell( MbFaceShell *&shell, MbeCopyMode sameShell, - RPArray * items = c3d_null ) = 0; // \ru Построение \en Construction + RPArray * items = NULL ) = 0; // \ru Построение \en Construction /// \ru Дать параметры. \en Get the parameters. void GetParameters( SmoothValues & params ) const { params = parameters; } diff --git a/C3d/Include/cr_split_data.h b/C3d/Include/cr_split_data.h index b1d4102..ea8a9a5 100644 --- a/C3d/Include/cr_split_data.h +++ b/C3d/Include/cr_split_data.h @@ -91,7 +91,7 @@ public: , spaceCurves ( ) , surfaces ( ) , creators ( ) - , solidShell ( c3d_null ) + , solidShell ( NULL ) { } /// \ru Конструктор по двумерному контуру в локальной системе координат. \en Constructor by two-dimensional contour in the local coordinate system. @@ -103,7 +103,7 @@ public: , spaceCurves ( ) , surfaces ( ) , creators ( ) - , solidShell ( c3d_null ) + , solidShell ( NULL ) { SPtr sketchContour; sketchContour = same ? const_cast(&item) : static_cast(&item.Duplicate()); @@ -118,7 +118,7 @@ public: , spaceCurves ( ) , surfaces ( ) , creators ( ) - , solidShell ( c3d_null ) + , solidShell ( NULL ) { C3D_ASSERT( (direction.MaxFactor() < LENGTH_EPSILON) || !direction.Orthogonal( place.GetAxisZ(), ANGLE_EPSILON ) ); @@ -136,7 +136,7 @@ public: , spaceCurves ( ) , surfaces ( ) , creators ( ) - , solidShell ( c3d_null ) + , solidShell ( NULL ) { ::AddRefItems( items, same, sketchContours ); } @@ -150,7 +150,7 @@ public: , spaceCurves ( ) , surfaces ( ) , creators ( ) - , solidShell ( c3d_null ) + , solidShell ( NULL ) { C3D_ASSERT( (direction.MaxFactor() < LENGTH_EPSILON) || !direction.Orthogonal( place.GetAxisZ(), ANGLE_EPSILON ) ); @@ -165,7 +165,7 @@ public: , spaceCurves ( ) , surfaces ( ) , creators ( ) - , solidShell ( c3d_null ) + , solidShell ( NULL ) { ::AddRefItems( items, same, spaceCurves ); } @@ -178,7 +178,7 @@ public: , spaceCurves ( ) , surfaces ( ) , creators ( ) - , solidShell ( c3d_null ) + , solidShell ( NULL ) { ::AddRefItems( items, same, spaceCurves ); } @@ -191,7 +191,7 @@ public: , spaceCurves ( ) , surfaces ( ) , creators ( ) - , solidShell ( c3d_null ) + , solidShell ( NULL ) { SPtr surface; surface = same ? const_cast(&item) : static_cast(&item.Duplicate()); @@ -206,7 +206,7 @@ public: , spaceCurves ( ) , surfaces ( ) , creators ( ) - , solidShell ( c3d_null ) + , solidShell ( NULL ) { ::AddRefItems( items, same, surfaces ); } @@ -219,7 +219,7 @@ public: , spaceCurves ( ) , surfaces ( ) , creators ( ) - , solidShell ( c3d_null ) + , solidShell ( NULL ) { ::AddRefItems( items, same, surfaces ); } @@ -322,12 +322,12 @@ public: DeleteItems(); size_t creatorsCnt = solidCreators.size(); if ( creatorsCnt > 0 ) { - MbRegDuplicate * iReg = c3d_null; + MbRegDuplicate * iReg = NULL; MbAutoRegDuplicate autoReg( iReg ); SPtr creator; creators.reserve( creatorsCnt ); for ( size_t k = 0; k < creatorsCnt; ++k ) { - if ( solidCreators[k] != c3d_null ) { + if ( solidCreators[k] != NULL ) { creator = sameCreators ? &const_cast( *solidCreators[k] ) : static_cast( &solidCreators[k]->Duplicate( iReg ) ); creators.push_back( creator ); ::DetachItem( creator ); @@ -343,17 +343,17 @@ public: /// \ru Являются ли объекты подобными. \en Determine whether the objects are similar. bool IsSimilar( const MbSplitData & ) const; /// \ru Преобразовать элемент согласно матрице. \en Transform element according to the matrix. - void Transform( const MbMatrix3D &, MbRegTransform * = c3d_null ); + void Transform( const MbMatrix3D &, MbRegTransform * = NULL ); /// \ru Сдвинуть по вектору. \en Shift by a vector. - void Move ( const MbVector3D &, MbRegTransform * = c3d_null ); + void Move ( const MbVector3D &, MbRegTransform * = NULL ); /// \ru Повернуть вокруг оси. \en Rotate about an axis. - void Rotate ( const MbAxis3D &, double angle, MbRegTransform * = c3d_null ); + void Rotate ( const MbAxis3D &, double angle, MbRegTransform * = NULL ); /// \ru Отсутствуют ли объекты? \en Are the objects absent? bool IsEmpty() const { return ( sketchContours.empty() && spaceCurves.empty() && surfaces.empty() && - (creators.empty() && (solidShell == c3d_null)) ); } + (creators.empty() && (solidShell == NULL)) ); } /// \ru Являются ли объекты равными? \en Determine whether an object is equal? bool IsSame( const MbSplitData &, double accuracy ) const; @@ -377,9 +377,9 @@ public: /// \ru Установить направление выдавливания двумерных кривых. \en Set extrusion direction of two-dimensional curves. void SetSketchSense( MbeSenseValue zdir ) { sense = zdir; } /// \ru Получить двумерную кривую по индексу. \en Get two-dimensional curve by index. - const MbContour * GetSketchCurve( size_t k ) const { return ((k < sketchContours.size()) ? sketchContours[k].get() : c3d_null ); } + const MbContour * GetSketchCurve( size_t k ) const { return ((k < sketchContours.size()) ? sketchContours[k].get() : NULL ); } /// \ru Получить двумерную кривую по индексу. \en Get two-dimensional curve by index. - MbContour * SetSketchCurve( size_t k ) { return ((k < sketchContours.size()) ? sketchContours[k].get() : c3d_null ); } + MbContour * SetSketchCurve( size_t k ) { return ((k < sketchContours.size()) ? sketchContours[k].get() : NULL ); } /// \ru Получить все двумерные кривые. \en Get all two-dimensional curves. template void GetSketchCurves( PlaneContoursVector & curvs ) const @@ -401,9 +401,9 @@ public: /// \ru Выдать количество пространственных кривых. \en Get number of spatial curves. size_t GetSpaceCurvesCount() const { return spaceCurves.size(); } /// \ru Получить пространственную кривую по индексу. \en Get a spatial curve by index. - const MbCurve3D * GetSpaceCurve( size_t k ) const { return ((k < spaceCurves.size()) ? spaceCurves[k].get() : c3d_null ); } + const MbCurve3D * GetSpaceCurve( size_t k ) const { return ((k < spaceCurves.size()) ? spaceCurves[k].get() : NULL ); } /// \ru Получить пространственную кривую по индексу. \en Get a spatial curve by index. - MbCurve3D * SetSpaceCurve( size_t k ) { return ((k < spaceCurves.size()) ? spaceCurves[k].get() : c3d_null ); } + MbCurve3D * SetSpaceCurve( size_t k ) { return ((k < spaceCurves.size()) ? spaceCurves[k].get() : NULL ); } /// \ru Получить все пространственные кривые. \en Get all spatial curves. template void GetSpaceCurves( SpaceCurvesVector & curvs ) const @@ -425,9 +425,9 @@ public: /// \ru Выдать количество поверхностей. \en Get number of surfaces. size_t GetSurfacesCount() const { return surfaces.size(); } /// \ru Получить поверхность по индексу. \en Get a surface by index. - const MbSurface * GetSurface( size_t k ) const { return ((k < surfaces.size()) ? surfaces[k].get() : c3d_null); } + const MbSurface * GetSurface( size_t k ) const { return ((k < surfaces.size()) ? surfaces[k].get() : NULL); } /// \ru Получить поверхность по индексу. \en Get a surface by index. - MbSurface * SetSurface( size_t k ) { return ((k < surfaces.size()) ? surfaces[k].get() : c3d_null); } + MbSurface * SetSurface( size_t k ) { return ((k < surfaces.size()) ? surfaces[k].get() : NULL); } /// \ru Получить все поверхности. \en Get all surfaces. template void GetSurfaces( SurfacesVector & surfs ) const @@ -449,9 +449,9 @@ public: /// \ru Выдать количество строителей тела. \en Get number of solid creators. size_t GetCreatorsCount() const { return creators.size(); } /// \ru Получить строитель по индексу. \en Get constructor by index. - const MbCreator * GetCreator( size_t k ) const { return ((k < creators.size()) ? creators[k].get() : c3d_null ); } + const MbCreator * GetCreator( size_t k ) const { return ((k < creators.size()) ? creators[k].get() : NULL ); } /// \ru Получить строитель по индексу. \en Get constructor by index. - MbCreator * SetCreator( size_t k ) { return ((k < creators.size()) ? creators[k].get() : c3d_null ); } + MbCreator * SetCreator( size_t k ) { return ((k < creators.size()) ? creators[k].get() : NULL ); } /// \ru Получить все строители. \en Get all creators. template void GetCreators( CreatorsVector & crs ) const @@ -468,17 +468,17 @@ public: template void GetCreatorsCopies( CreatorsVector & crs ) const { - MbRegDuplicate * iReg = c3d_null; + MbRegDuplicate * iReg = NULL; MbAutoRegDuplicate autoReg( iReg ); crs.reserve( crs.size() + creators.size() ); c3d::CreatorSPtr creator; for ( size_t k = 0, addCnt = creators.size(); k < addCnt; ++k ) { - if ( creators[k] != c3d_null ) + if ( creators[k] != NULL ) creator = static_cast( &creators[k]->Duplicate( iReg ) ); crs.push_back( creator ); ::DetachItem( creator ); - creator = c3d_null; + creator = NULL; } } /// \ru Получить все строители. \en Get all creators. diff --git a/C3d/Include/cr_split_shell.h b/C3d/Include/cr_split_shell.h index bf977ee..04fcadb 100644 --- a/C3d/Include/cr_split_shell.h +++ b/C3d/Include/cr_split_shell.h @@ -41,10 +41,10 @@ public : // \ru Общие функции математического объекта \en Common functions of the mathematical object virtual MbeCreatorType IsA () const; // \ru Тип элемента \en A type of element - virtual MbCreator & Duplicate( MbRegDuplicate * = c3d_null ) const; - virtual void Transform( const MbMatrix3D &, MbRegTransform * = c3d_null ); // \ru Преобразовать элемент согласно матрице \en Transform element according to the matrix - virtual void Move ( const MbVector3D &, MbRegTransform * = c3d_null ); // \ru Сдвиг \en Translation - virtual void Rotate ( const MbAxis3D &, double angle, MbRegTransform * = c3d_null ); // \ru Повернуть вокруг оси \en Rotate around an axis + virtual MbCreator & Duplicate( MbRegDuplicate * = NULL ) const; + virtual void Transform( const MbMatrix3D &, MbRegTransform * = NULL ); // \ru Преобразовать элемент согласно матрице \en Transform element according to the matrix + virtual void Move ( const MbVector3D &, MbRegTransform * = NULL ); // \ru Сдвиг \en Translation + virtual void Rotate ( const MbAxis3D &, double angle, MbRegTransform * = NULL ); // \ru Повернуть вокруг оси \en Rotate around an axis virtual MbePrompt GetPropertyName(); // \ru Выдать заголовок свойства объекта \en Get a name of object property virtual void GetProperties( MbProperties & ); // \ru Выдать свойства объекта \en Get properties of the object @@ -58,7 +58,7 @@ public : // \ru Общие функции твердого тела \en Common functions of solid virtual bool CreateShell( MbFaceShell *& shell, MbeCopyMode sameShell, - RPArray * items = c3d_null ); // \ru Построение \en Construction + RPArray * items = NULL ); // \ru Построение \en Construction private: // \ru Не реализовано \en Not implemented // \ru Объявление конструктора копирования без реализации, чтобы не было копирования по умолчанию. \en Declaration without implementation of the copy-constructor to prevent copying by default. diff --git a/C3d/Include/cr_stamp_bead_solid.h b/C3d/Include/cr_stamp_bead_solid.h index d75828a..7aaf46d 100644 --- a/C3d/Include/cr_stamp_bead_solid.h +++ b/C3d/Include/cr_stamp_bead_solid.h @@ -67,15 +67,15 @@ public: // \ru Общие функции математического объекта \en Common functions of the mathematical object virtual MbeCreatorType IsA () const; // \ru Тип элемента \en A type of element - virtual MbCreator & Duplicate( MbRegDuplicate * = c3d_null ) const; // \ru Сделать копию \en Create a copy + virtual MbCreator & Duplicate( MbRegDuplicate * = NULL ) const; // \ru Сделать копию \en Create a copy virtual bool IsSame ( const MbCreator & other, double accuracy ) const; // \ru Являются ли объекты равными? \en Determine whether an object is equal? virtual bool IsSimilar( const MbCreator & item ) const; // \ru Являются ли объекты подобными? \en Determine whether an object is similar? virtual bool SetEqual ( const MbCreator & ); // \ru Сделать равным \en Make equal - virtual void Transform( const MbMatrix3D &, MbRegTransform * = c3d_null ); // \ru Преобразовать элемент согласно матрице \en Transform element according to the matrix - virtual void Move ( const MbVector3D &, MbRegTransform * = c3d_null ); // \ru Сдвиг \en Translation - virtual void Rotate ( const MbAxis3D &, double angle, MbRegTransform * = c3d_null ); // \ru Повернуть вокруг оси \en Rotate around an axis + virtual void Transform( const MbMatrix3D &, MbRegTransform * = NULL ); // \ru Преобразовать элемент согласно матрице \en Transform element according to the matrix + virtual void Move ( const MbVector3D &, MbRegTransform * = NULL ); // \ru Сдвиг \en Translation + virtual void Rotate ( const MbAxis3D &, double angle, MbRegTransform * = NULL ); // \ru Повернуть вокруг оси \en Rotate around an axis virtual MbePrompt GetPropertyName(); // \ru Выдать заголовок свойства объекта \en Get a name of object property virtual void GetProperties ( MbProperties &properties ); // \ru Выдать свойства объекта \en Get properties of the object @@ -87,7 +87,7 @@ public: // \ru Общие функции твердого тела \en Common functions of solid virtual bool CreateShell( MbFaceShell *& shell, MbeCopyMode sameShell, - RPArray * items = c3d_null ); // \ru Построение \en Construction + RPArray * items = NULL ); // \ru Построение \en Construction // \ru Дать параметры. \en Get the parameters. void GetParameters( MbBeadValues & params ) const { params = parameters; } diff --git a/C3d/Include/cr_stamp_jalousie_solid.h b/C3d/Include/cr_stamp_jalousie_solid.h index 5173b53..492280f 100644 --- a/C3d/Include/cr_stamp_jalousie_solid.h +++ b/C3d/Include/cr_stamp_jalousie_solid.h @@ -66,13 +66,13 @@ public: // \ru Общие функции математического объекта \en Common functions of the mathematical object virtual MbeCreatorType IsA () const; // \ru Тип элемента \en A type of element - virtual MbCreator & Duplicate( MbRegDuplicate * = c3d_null ) const; // \ru Сделать копию \en Create a copy + virtual MbCreator & Duplicate( MbRegDuplicate * = NULL ) const; // \ru Сделать копию \en Create a copy virtual bool IsSame ( const MbCreator & other, double accuracy ) const; // \ru Являются ли объекты равными? \en Determine whether an object is equal? virtual bool IsSimilar( const MbCreator & item ) const; // \ru Являются ли объекты подобными? \en Determine whether an object is similar? virtual bool SetEqual ( const MbCreator & ); // \ru Сделать равным \en Make equal - virtual void Transform( const MbMatrix3D &, MbRegTransform * = c3d_null ); // \ru Преобразовать элемент согласно матрице \en Transform element according to the matrix - virtual void Move ( const MbVector3D &, MbRegTransform * = c3d_null ); // \ru Сдвиг \en Translation - virtual void Rotate ( const MbAxis3D &, double angle, MbRegTransform * = c3d_null ); // \ru Повернуть вокруг оси \en Rotate around an axis + virtual void Transform( const MbMatrix3D &, MbRegTransform * = NULL ); // \ru Преобразовать элемент согласно матрице \en Transform element according to the matrix + virtual void Move ( const MbVector3D &, MbRegTransform * = NULL ); // \ru Сдвиг \en Translation + virtual void Rotate ( const MbAxis3D &, double angle, MbRegTransform * = NULL ); // \ru Повернуть вокруг оси \en Rotate around an axis virtual void GetProperties ( MbProperties &properties ); // \ru Выдать свойства объекта \en Get properties of the object virtual void SetProperties ( const MbProperties &properties ); // \ru Записать свойства объекта \en Set properties of the object @@ -84,7 +84,7 @@ public: // \ru Общие функции твердого тела \en Common functions of solid virtual bool CreateShell( MbFaceShell *& shell, MbeCopyMode sameShell, - RPArray * items = c3d_null ); // \ru Построение \en Construction + RPArray * items = NULL ); // \ru Построение \en Construction // \ru Дать параметры. \en Get the parameters. void GetParameters( MbJalousieValues & params ) const { params = parameters; } diff --git a/C3d/Include/cr_stamp_jog_solid.h b/C3d/Include/cr_stamp_jog_solid.h index b3ce5c2..d65403c 100644 --- a/C3d/Include/cr_stamp_jog_solid.h +++ b/C3d/Include/cr_stamp_jog_solid.h @@ -63,13 +63,13 @@ public: // \ru Общие функции математического объекта \en Common functions of the mathematical object virtual MbeCreatorType IsA() const; // \ru Тип элемента \en A type of element - virtual MbCreator & Duplicate( MbRegDuplicate * = c3d_null ) const; // \ru Сделать копию \en Create a copy + virtual MbCreator & Duplicate( MbRegDuplicate * = NULL ) const; // \ru Сделать копию \en Create a copy virtual bool IsSame ( const MbCreator & other, double accuracy ) const; // \ru Являются ли объекты равными? \en Determine whether an object is equal? virtual bool IsSimilar( const MbCreator & item ) const; // \ru Являются ли объекты подобными? \en Determine whether an object is similar? virtual bool SetEqual ( const MbCreator & ); // \ru Сделать равным \en Make equal - virtual void Transform( const MbMatrix3D &, MbRegTransform * = c3d_null ); // \ru Преобразовать элемент согласно матрице \en Transform element according to the matrix - virtual void Move ( const MbVector3D &, MbRegTransform * = c3d_null ); // \ru Сдвиг \en Translation - virtual void Rotate ( const MbAxis3D &, double angle, MbRegTransform * = c3d_null ); // \ru Повернуть вокруг оси \en Rotate around an axis + virtual void Transform( const MbMatrix3D &, MbRegTransform * = NULL ); // \ru Преобразовать элемент согласно матрице \en Transform element according to the matrix + virtual void Move ( const MbVector3D &, MbRegTransform * = NULL ); // \ru Сдвиг \en Translation + virtual void Rotate ( const MbAxis3D &, double angle, MbRegTransform * = NULL ); // \ru Повернуть вокруг оси \en Rotate around an axis virtual void GetProperties( MbProperties & properties ); // \ru Выдать свойства объекта \en Get properties of the object virtual void SetProperties( const MbProperties & properties ); // \ru Записать свойства объекта \en Set properties of the object @@ -82,7 +82,7 @@ public: virtual bool CreateShell( MbFaceShell *& shell, MbeCopyMode sameShell, - RPArray * items = c3d_null ); // \ru Построение \en Construction + RPArray * items = NULL ); // \ru Построение \en Construction // \ru Дать параметры. \en Get the parameters. void GetParameters( MbJogValues & params ) const { params = jogParameters; } diff --git a/C3d/Include/cr_stamp_remove_solid.h b/C3d/Include/cr_stamp_remove_solid.h index d555811..ee56931 100644 --- a/C3d/Include/cr_stamp_remove_solid.h +++ b/C3d/Include/cr_stamp_remove_solid.h @@ -43,15 +43,15 @@ public: // \ru Общие функции математического объекта \en Common functions of the mathematical object virtual MbeCreatorType IsA() const; // \ru Тип элемента \en Type of element - virtual MbCreator & Duplicate( MbRegDuplicate * = c3d_null ) const; // \ru Сделать копию \en Create a copy + virtual MbCreator & Duplicate( MbRegDuplicate * = NULL ) const; // \ru Сделать копию \en Create a copy virtual bool IsSame ( const MbCreator & other, double accuracy ) const; // \ru Являются ли объекты равными? \en Determine whether an object is equal? virtual bool IsSimilar( const MbCreator & item ) const; // \ru Являются ли объекты подобными? \en Determine whether an object is similar? virtual bool SetEqual ( const MbCreator & ); // \ru Сделать равным \en Make equal - virtual void Transform( const MbMatrix3D &, MbRegTransform * = c3d_null ); // \ru Преобразовать элемент согласно матрице \en Transform element according to the matrix - virtual void Move ( const MbVector3D &, MbRegTransform * = c3d_null ); // \ru Сдвиг \en Translation - virtual void Rotate ( const MbAxis3D &, double, MbRegTransform * = c3d_null ); // \ru Повернуть вокруг оси \en Rotate about an axis + virtual void Transform( const MbMatrix3D &, MbRegTransform * = NULL ); // \ru Преобразовать элемент согласно матрице \en Transform element according to the matrix + virtual void Move ( const MbVector3D &, MbRegTransform * = NULL ); // \ru Сдвиг \en Translation + virtual void Rotate ( const MbAxis3D &, double, MbRegTransform * = NULL ); // \ru Повернуть вокруг оси \en Rotate about an axis virtual void GetProperties( MbProperties & properties ); // \ru Выдать свойства объекта \en Get properties of the object virtual void SetProperties( const MbProperties & properties ); // \ru Записать свойства объекта \en Set properties of the object @@ -61,7 +61,7 @@ public: virtual bool CreateShell( MbFaceShell *& shell, MbeCopyMode sameShell, - RPArray * items = c3d_null ); // \ru Построение \en Construction + RPArray * items = NULL ); // \ru Построение \en Construction private: // \ru Объявление оператора присваивания без реализации, чтобы не было присваивания по умолчанию. \en The declaration of the assignment operator without implementation to prevent an assignment by default. diff --git a/C3d/Include/cr_stamp_rib_solid.h b/C3d/Include/cr_stamp_rib_solid.h index 615d611..1f945cb 100644 --- a/C3d/Include/cr_stamp_rib_solid.h +++ b/C3d/Include/cr_stamp_rib_solid.h @@ -46,10 +46,10 @@ public : // \ru Общие функции математического объекта \en Common functions of the mathematical object virtual MbeCreatorType IsA () const; // \ru Тип элемента \en A type of element - virtual MbCreator & Duplicate( MbRegDuplicate * = c3d_null ) const; // \ru Сделать копию \en Create a copy - virtual void Transform ( const MbMatrix3D & matr, MbRegTransform * = c3d_null ); // \ru Преобразовать элемент согласно матрице \en Transform element according to the matrix - virtual void Move ( const MbVector3D & to, MbRegTransform * = c3d_null ); // \ru Сдвиг \en Translation - virtual void Rotate ( const MbAxis3D & axis, double angle, MbRegTransform * = c3d_null ); // \ru Повернуть вокруг оси \en Rotate around an axis + virtual MbCreator & Duplicate( MbRegDuplicate * = NULL ) const; // \ru Сделать копию \en Create a copy + virtual void Transform ( const MbMatrix3D & matr, MbRegTransform * = NULL ); // \ru Преобразовать элемент согласно матрице \en Transform element according to the matrix + virtual void Move ( const MbVector3D & to, MbRegTransform * = NULL ); // \ru Сдвиг \en Translation + virtual void Rotate ( const MbAxis3D & axis, double angle, MbRegTransform * = NULL ); // \ru Повернуть вокруг оси \en Rotate around an axis virtual void GetProperties( MbProperties & properties ); // \ru Выдать свойства объекта \en Get properties of the object virtual void SetProperties( const MbProperties & properties ); // \ru Записать свойства объекта \en Set properties of the object @@ -62,7 +62,7 @@ public : // \ru Общие функции твердого тела \en Common functions of solid virtual bool CreateShell( MbFaceShell *&shell, MbeCopyMode sameShell, - RPArray *items = c3d_null ); // \ru Построение \en Construction + RPArray *items = NULL ); // \ru Построение \en Construction // \ru Дать параметры. \en Get the parameters. void GetParameters( SheetRibValues & params ) const { params = parameters; } diff --git a/C3d/Include/cr_stamp_ruled_solid.h b/C3d/Include/cr_stamp_ruled_solid.h index 6ddb86a..c30dbc7 100644 --- a/C3d/Include/cr_stamp_ruled_solid.h +++ b/C3d/Include/cr_stamp_ruled_solid.h @@ -49,15 +49,15 @@ public: // \ru Общие функции математического объекта \en Common functions of the mathematical object virtual MbeCreatorType IsA() const; // \ru Тип элемента \en A type of element - virtual MbCreator & Duplicate( MbRegDuplicate * = c3d_null ) const; // \ru Сделать копию \en Create a copy + virtual MbCreator & Duplicate( MbRegDuplicate * = NULL ) const; // \ru Сделать копию \en Create a copy virtual bool IsSame ( const MbCreator & other, double accuracy ) const; // \ru Являются ли объекты равными? \en Determine whether an object is equal? virtual bool IsSimilar( const MbCreator & item ) const; // \ru Являются ли объекты подобными? \en Determine whether an object is similar? virtual bool SetEqual ( const MbCreator & ); // \ru Сделать равным \en Make equal - virtual void Transform( const MbMatrix3D &, MbRegTransform * = c3d_null ); // \ru Преобразовать элемент согласно матрице \en Transform element according to the matrix - virtual void Move ( const MbVector3D &, MbRegTransform * = c3d_null ); // \ru Сдвиг \en Translation - virtual void Rotate ( const MbAxis3D &, double angle, MbRegTransform * = c3d_null ); // \ru Повернуть вокруг оси \en Rotate around an axis + virtual void Transform( const MbMatrix3D &, MbRegTransform * = NULL ); // \ru Преобразовать элемент согласно матрице \en Transform element according to the matrix + virtual void Move ( const MbVector3D &, MbRegTransform * = NULL ); // \ru Сдвиг \en Translation + virtual void Rotate ( const MbAxis3D &, double angle, MbRegTransform * = NULL ); // \ru Повернуть вокруг оси \en Rotate around an axis virtual void GetProperties( MbProperties & ); // \ru Выдать свойства объекта \en Get properties of the object virtual void SetProperties( const MbProperties & ); // \ru Записать свойства объекта \en Set properties of the object @@ -69,7 +69,7 @@ public: virtual bool CreateShell( MbFaceShell *& shell, MbeCopyMode sameShell, - RPArray * items = c3d_null ); // \ru Построение \en Construction + RPArray * items = NULL ); // \ru Построение \en Construction // \ru Дать базовые объекты. \en Get the base objects. virtual void GetBasisItems( RPArray & s ); diff --git a/C3d/Include/cr_stamp_solid.h b/C3d/Include/cr_stamp_solid.h index 546710c..8f4950d 100644 --- a/C3d/Include/cr_stamp_solid.h +++ b/C3d/Include/cr_stamp_solid.h @@ -65,15 +65,15 @@ public: // \ru Общие функции математического объекта \en Common functions of the mathematical object virtual MbeCreatorType IsA() const; // \ru Тип элемента \en A type of element - virtual MbCreator & Duplicate( MbRegDuplicate * = c3d_null ) const; // \ru Сделать копию \en Create a copy + virtual MbCreator & Duplicate( MbRegDuplicate * = NULL ) const; // \ru Сделать копию \en Create a copy virtual bool IsSame ( const MbCreator & other, double accuracy ) const; // \ru Являются ли объекты равными? \en Determine whether an object is equal? virtual bool IsSimilar( const MbCreator & item ) const; // \ru Являются ли объекты подобными? \en Determine whether an object is similar? virtual bool SetEqual ( const MbCreator & ); // \ru Сделать равным \en Make equal - virtual void Transform( const MbMatrix3D &, MbRegTransform * = c3d_null ); // \ru Преобразовать элемент согласно матрице \en Transform element according to the matrix - virtual void Move ( const MbVector3D &, MbRegTransform * = c3d_null ); // \ru Сдвиг \en Translation - virtual void Rotate ( const MbAxis3D &, double angle, MbRegTransform * = c3d_null ); // \ru Повернуть вокруг оси \en Rotate around an axis + virtual void Transform( const MbMatrix3D &, MbRegTransform * = NULL ); // \ru Преобразовать элемент согласно матрице \en Transform element according to the matrix + virtual void Move ( const MbVector3D &, MbRegTransform * = NULL ); // \ru Сдвиг \en Translation + virtual void Rotate ( const MbAxis3D &, double angle, MbRegTransform * = NULL ); // \ru Повернуть вокруг оси \en Rotate around an axis virtual void GetProperties ( MbProperties &properties ); // \ru Выдать свойства объекта \en Get properties of the object virtual void SetProperties ( const MbProperties &properties ); // \ru Записать свойства объекта \en Set properties of the object @@ -85,7 +85,7 @@ public: // \ru Общие функции твердого тела \en Common functions of solid virtual bool CreateShell( MbFaceShell *&shell, MbeCopyMode sameShell, - RPArray *items = c3d_null ); // \ru Построение \en Construction + RPArray *items = NULL ); // \ru Построение \en Construction // \ru Дать параметры. \en Get the parameters. void GetParameters( MbStampingValues & params ) const { params = parameters; } diff --git a/C3d/Include/cr_stamp_spherical_solid.h b/C3d/Include/cr_stamp_spherical_solid.h index f83ff7e..7dd0871 100644 --- a/C3d/Include/cr_stamp_spherical_solid.h +++ b/C3d/Include/cr_stamp_spherical_solid.h @@ -60,15 +60,15 @@ public: // \ru Общие функции математического объекта \en Common functions of the mathematical object virtual MbeCreatorType IsA() const; // \ru Тип элемента \en A type of element - virtual MbCreator & Duplicate( MbRegDuplicate * = c3d_null ) const; // \ru Сделать копию \en Create a copy + virtual MbCreator & Duplicate( MbRegDuplicate * = NULL ) const; // \ru Сделать копию \en Create a copy virtual bool IsSame ( const MbCreator & other, double accuracy ) const; // \ru Являются ли объекты равными? \en Determine whether an object is equal? virtual bool IsSimilar( const MbCreator & item ) const; // \ru Являются ли объекты подобными? \en Determine whether an object is similar? virtual bool SetEqual ( const MbCreator & ); // \ru Сделать равным \en Make equal - virtual void Transform( const MbMatrix3D &, MbRegTransform * = c3d_null ); // \ru Преобразовать элемент согласно матрице \en Transform element according to the matrix - virtual void Move ( const MbVector3D &, MbRegTransform * = c3d_null ); // \ru Сдвиг \en Translation - virtual void Rotate ( const MbAxis3D &, double angle, MbRegTransform * = c3d_null ); // \ru Повернуть вокруг оси \en Rotate around an axis + virtual void Transform( const MbMatrix3D &, MbRegTransform * = NULL ); // \ru Преобразовать элемент согласно матрице \en Transform element according to the matrix + virtual void Move ( const MbVector3D &, MbRegTransform * = NULL ); // \ru Сдвиг \en Translation + virtual void Rotate ( const MbAxis3D &, double angle, MbRegTransform * = NULL ); // \ru Повернуть вокруг оси \en Rotate around an axis virtual void GetProperties ( MbProperties &properties ); // \ru Выдать свойства объекта \en Get properties of the object virtual void SetProperties ( const MbProperties &properties ); // \ru Записать свойства объекта \en Set properties of the object @@ -80,7 +80,7 @@ public: // \ru Общие функции твердого тела \en Common functions of solid virtual bool CreateShell( MbFaceShell *&shell, MbeCopyMode sameShell, - RPArray *items = c3d_null ); // \ru Построение \en Construction + RPArray *items = NULL ); // \ru Построение \en Construction // \ru Дать параметры. \en Get the parameters. void GetParameters( MbStampingValues & params ) const { params = parameters; } diff --git a/C3d/Include/cr_stamp_user_solid.h b/C3d/Include/cr_stamp_user_solid.h index 6f12d38..4e1f13f 100644 --- a/C3d/Include/cr_stamp_user_solid.h +++ b/C3d/Include/cr_stamp_user_solid.h @@ -1,188 +1,141 @@ -//////////////////////////////////////////////////////////////////////////////// -/** - \file - \brief \ru Строитель оболочки из листового материала штамповкой телом-инструментом. - \en Constructor of a shell from the sheet material with stamping by a tool solid. -*/ -//////////////////////////////////////////////////////////////////////////////// - -#ifndef __CR_USERSTAMP_SOLID_H -#define __CR_USERSTAMP_SOLID_H - - -#include -#include - - -//------------------------------------------------------------------------------ -/** \brief \ru Строитель оболочки из листового материала штамповкой телом-инструментом. - \en Constructor of a shell from the sheet material with stamping by tool solid. \~ - \details \ru Строитель оболочки из листового материала закрытой или открытой штамповкой телом-инструментом. - Тело-инструмент может являться пуансоном или матрицей.\n - Строятся штамповки двух типов: \n - закрытая - не указаны вскрываемые грани тела-инструмента, \n - открытая - когда лист пробит штамповкой насквозь, указаны вскрываемые грани. \n - \en Constructor of a shell from the sheet material by open or closed stamping by tool solid. - The tool solid may be a punch or a die. \n - Stamping of two types are constructed: \n - closed - pierce faces of tool solid are not specified, \n - open - when a sheet is punched through by stamping, pierce faces of tool solid are specified. \n \~ - \ingroup Model_Creators -*/ -// --- -class MATH_CLASS MbUserStampSolid : public MbCreator { -private: - MbItemIndex faceIndex; ///< \ru Индекс грани, на которой строится штамповка. \en Index of the face the stamping is constructed on. - MbItemIndex pairFaceIndex; ///< \ru Индекс грани парной к грани штамповки. \en Index of the face which is pair to the stamp face. - SArray pierceIndices; ///< \ru Индексы граней для вырубки. \en Face indicies for opening. - RPArray creators; ///< \ru Журнал построения оболочки тела-инструмента. \en History tree of the shell of the tool solid. - size_t countOne; ///< \ru Разделитель строителей тел-операндов. \en Separator of operand solids creators. - MbToolStampingValues parameters; ///< \ru Параметры штамповки. \en Stamping parameters. - double thickness; ///< \ru Толщина листа. \en The thickness of the sheet metal. - bool punch; ///< \ru Является тело-инструмент пуансоном или матрицей? \en Is tool body a punch or a die. - -public : - MbUserStampSolid( const RPArray & creatorsTool, - const bool sameTool, - const MbItemIndex & faceIndex, - const MbItemIndex & pairFaceIndex, - SArray & pierceIndices, - const MbToolStampingValues & params, - const double thickness, - const bool isPunch, - const MbSNameMaker & names ); -private: - MbUserStampSolid( const MbUserStampSolid &, MbRegDuplicate * iReg ); - -public: - virtual ~MbUserStampSolid(); - - // \ru Общие функции математического объекта. \en Common functions of the mathematical object. - - virtual MbeCreatorType IsA() const; // \ru Тип элемента. \en A type of element. - virtual MbCreator & Duplicate( MbRegDuplicate * = c3d_null ) const; // \ru Сделать копию. \en Create a copy. - - virtual bool IsSame ( const MbCreator & other, double accuracy ) const; // \ru Являются ли объекты равными? \en Determine whether an object is equal? - virtual bool IsSimilar( const MbCreator & item ) const; // \ru Являются ли объекты подобными? \en Determine whether an object is similar? - virtual bool SetEqual ( const MbCreator & ); // \ru Сделать равным. \en Make equal. - - virtual void Transform( const MbMatrix3D &, MbRegTransform * = c3d_null ); // \ru Преобразовать элемент согласно матрице. \en Transform element according to the matrix. - virtual void Move ( const MbVector3D &, MbRegTransform * = c3d_null ); // \ru Сдвиг. \en Translation. - virtual void Rotate ( const MbAxis3D &, double angle, MbRegTransform * = c3d_null ); // \ru Повернуть вокруг оси. \en Rotate around an axis. - - virtual void GetProperties ( MbProperties &properties ); // \ru Выдать свойства объекта. \en Get properties of the object. - virtual void SetProperties ( const MbProperties &properties ); // \ru Записать свойства объекта. \en Set properties of the object. - virtual MbePrompt GetPropertyName(); // \ru Выдать заголовок свойства объекта. \en Get a name of object property. - - // \ru Общие функции твердого тела. \en Common functions of solid. - - virtual bool CreateShell( MbFaceShell *&shell, MbeCopyMode sameShell, - RPArray *items = c3d_null ); // \ru Построение оболочки штамповки. \en Construction of a stamping shell. - - // \ru Получить параметры. \en Get the parameters. - void GetParameters( MbToolStampingValues & params ) const { params = parameters; } - // \ru Установить параметры. \en Set the parameters. - void SetParameters( const MbToolStampingValues & params ) { parameters = params; } - -private: - OBVIOUS_PRIVATE_COPY( MbUserStampSolid ) - DECLARE_PERSISTENT_CLASS_NEW_DEL( MbUserStampSolid ) -}; - -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] 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] toolSolid - \ru Оболочка тела-инструмента. - \en A shell of tool solid. \~ - \param[in] sameShellTool - \ru Режим копирования оболочки тела-инструмента. - \en Mode of copying the tool shell. \~ - \param[in] punch - \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] result - \ru Результирующее тело. - \en The resultant solid. \~ - \result \ru Возвращает строитель оболочки. - \en Returns the shell constructor. \~ - \ingroup Model_Creators -*/ -// --- -MATH_FUNC (MbCreator *) CreateUserStamp( MbFaceShell * initialShell, // Исходная оболочка, - const MbeCopyMode sameShell, // флаг способа использования исходной оболочки, - const MbFace & targetFace, // грань штамповки, - const RPArray & creatorsTool, // журнал построения инструмента, - MbFaceShell & toolShell, // оболочка тела-инструмента, - const MbeCopyMode sameShellTool, // флаг способа использования оболочки инструмента, - bool isPunch, // является инструмент пуансоном или матрицей, - const RPArray & pierceFaces, // вскрываемые для вырубки грани инструмента, - const MbToolStampingValues & params, // параметры штамповки, - const MbSNameMaker & nameMaker, // именователь, - MbResultType & res, // флаг успешности операции, - SPtr & 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. \~ - \param[out] addShell - \ru Добавляемая часть. - \en Added part. \~ - \param[out] substractShell - \ru Вычитаемая часть. - \en Substracted part. \~ - \result \ru - Код результата операции. - \en - The operation result code. \~ - \ingroup Model_Creators -*/ -// --- -MATH_FUNC (MbResultType) MakeUserStampShellParts ( MbFaceShell * initialShell, // Исходная оболочка, - const MbeCopyMode sameShell, // флаг способа использования исходной оболочки, - const MbFace & targetFace, // грань штамповки, - MbFaceShell & toolShell, // оболочка тела-инструмента, - const MbeCopyMode sameShellTool, // флаг способа использования оболочки инструмента, - bool isPunch, // является инструмент пуансоном или матрицей, - MbeStampingCreatedType add, // тип добавляемой части штамповки, - const RPArray & pierceFaces, // вскрываемые для вырубки грани инструмента, - const MbToolStampingValues & params, // параметры штамповки, - const MbSNameMaker & nameMaker, // именователь, - SPtr & addShell, // добавляемая часть - SPtr & substractShell ); // вычитаемая часть - -#endif // __CR_USERSTAMP_SOLID_H +//////////////////////////////////////////////////////////////////////////////// +/** + \file + \brief \ru Строитель оболочки из листового материала штамповкой телом-инструментом. + \en Constructor of a shell from the sheet material with stamping by a tool solid. +*/ +//////////////////////////////////////////////////////////////////////////////// + +#ifndef __CR_USERSTAMP_SOLID_H +#define __CR_USERSTAMP_SOLID_H + + +#include +#include + + +//------------------------------------------------------------------------------ +/** \brief \ru Строитель оболочки из листового материала штамповкой телом-инструментом. + \en Constructor of a shell from the sheet material with stamping by tool solid. \~ + \details \ru Строитель оболочки из листового материала закрытой или открытой штамповкой телом-инструментом. + Тело-инструмент может являться пуансоном или матрицей.\n + Строятся штамповки двух типов: \n + закрытая - не указаны вскрываемые грани тела-инструмента, \n + открытая - когда лист пробит штамповкой насквозь, указаны вскрываемые грани. \n + \en Constructor of a shell from the sheet material by open or closed stamping by tool solid. + The tool solid may be a punch or a die. \n + Stamping of two types are constructed: \n + closed - pierce faces of tool solid are not specified, \n + open - when a sheet is punched through by stamping, pierce faces of tool solid are specified. \n \~ + \ingroup Model_Creators +*/ +// --- +class MATH_CLASS MbUserStampSolid : public MbCreator { +private: + MbItemIndex faceIndex; ///< \ru Индекс грани, на которой строится штамповка. \en Index of the face the stamping is constructed on. + MbItemIndex pairFaceIndex; ///< \ru Индекс грани парной к грани штамповки. \en Index of the face which is pair to the stamp face. + SArray pierceIndices; ///< \ru Индексы граней для вырубки. \en Face indicies for opening. + RPArray creators; ///< \ru Журнал построения оболочки тела-инструмента. \en History tree of the shell of the tool solid. + size_t countOne; ///< \ru Разделитель строителей тел-операндов. \en Separator of operand solids creators. + MbToolStampingValues parameters; ///< \ru Параметры штамповки. \en Stamping parameters. + double thickness; ///< \ru Толщина листа. \en The thickness of the sheet metal. + bool punch; ///< \ru Является тело-инструмент пуансоном или матрицей? \en Is tool body a punch or a die. + +public : + MbUserStampSolid( const RPArray & creatorsTool, + const bool sameTool, + const MbItemIndex & faceIndex, + const MbItemIndex & pairFaceIndex, + SArray & pierceIndices, + const MbToolStampingValues & params, + const double thickness, + const bool isPunch, + const MbSNameMaker & names ); +private: + MbUserStampSolid( const MbUserStampSolid &, MbRegDuplicate * iReg ); + +public: + virtual ~MbUserStampSolid(); + + // \ru Общие функции математического объекта. \en Common functions of the mathematical object. + + virtual MbeCreatorType IsA() const; // \ru Тип элемента. \en A type of element. + virtual MbCreator & Duplicate( MbRegDuplicate * = NULL ) const; // \ru Сделать копию. \en Create a copy. + + virtual bool IsSame ( const MbCreator & other, double accuracy ) const; // \ru Являются ли объекты равными? \en Determine whether an object is equal? + virtual bool IsSimilar( const MbCreator & item ) const; // \ru Являются ли объекты подобными? \en Determine whether an object is similar? + virtual bool SetEqual ( const MbCreator & ); // \ru Сделать равным. \en Make equal. + + virtual void Transform( const MbMatrix3D &, MbRegTransform * = NULL ); // \ru Преобразовать элемент согласно матрице. \en Transform element according to the matrix. + virtual void Move ( const MbVector3D &, MbRegTransform * = NULL ); // \ru Сдвиг. \en Translation. + virtual void Rotate ( const MbAxis3D &, double angle, MbRegTransform * = NULL ); // \ru Повернуть вокруг оси. \en Rotate around an axis. + + virtual void GetProperties ( MbProperties &properties ); // \ru Выдать свойства объекта. \en Get properties of the object. + virtual void SetProperties ( const MbProperties &properties ); // \ru Записать свойства объекта. \en Set properties of the object. + virtual MbePrompt GetPropertyName(); // \ru Выдать заголовок свойства объекта. \en Get a name of object property. + + // \ru Общие функции твердого тела. \en Common functions of solid. + + virtual bool CreateShell( MbFaceShell *&shell, MbeCopyMode sameShell, + RPArray *items = NULL ); // \ru Построение оболочки штамповки. \en Construction of a stamping shell. + + // \ru Получить параметры. \en Get the parameters. + void GetParameters( MbToolStampingValues & params ) const { params = parameters; } + // \ru Установить параметры. \en Set the parameters. + void SetParameters( const MbToolStampingValues & params ) { parameters = params; } + +private: + OBVIOUS_PRIVATE_COPY( MbUserStampSolid ) + DECLARE_PERSISTENT_CLASS_NEW_DEL( MbUserStampSolid ) +}; + +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] 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] toolSolid - \ru Оболочка тела-инструмента. + \en A shell of tool solid. \~ + \param[in] sameShellTool - \ru Режим копирования оболочки тела-инструмента. + \en Mode of copying the tool shell. \~ + \param[in] punch - \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] result - \ru Результирующее тело. + \en The resultant solid. \~ + \result \ru Возвращает строитель оболочки. + \en Returns the shell constructor. \~ + \ingroup Model_Creators +*/ +// --- +MATH_FUNC (MbCreator *) CreateUserStamp( MbFaceShell * initialShell, // Исходная оболочка, + const MbeCopyMode sameShell, // флаг способа использования исходной оболочки, + const MbFace & targetFace, // грань штамповки, + const RPArray & creatorsTool, // журнал построения инструмента, + MbFaceShell & toolShell, // оболочка тела-инструмента, + const MbeCopyMode sameShellTool, // флаг способа использования оболочки инструмента, + bool isPunch, // является инструмент пуансоном или матрицей, + const RPArray & pierceFaces, // вскрываемые для вырубки грани инструмента, + const MbToolStampingValues & params, // параметры штамповки, + const MbSNameMaker & nameMaker, // именователь, + MbResultType & res, // флаг успешности операции, + SPtr & resultShell ); // результирующая оболочка. + + +#endif // __CR_USERSTAMP_SOLID_H diff --git a/C3d/Include/cr_stitch_solid.h b/C3d/Include/cr_stitch_solid.h index 656074d..94f6894 100644 --- a/C3d/Include/cr_stitch_solid.h +++ b/C3d/Include/cr_stitch_solid.h @@ -78,11 +78,11 @@ public : size_t estSimpleCnt = 0; for ( i = 0; i < setsCnt; ++i ) { Creators * creatorsSet = creatorsData[i]; - if ( creatorsSet != c3d_null ) { + if ( creatorsSet != NULL ) { size_t count = creatorsSet->size(); for ( size_t j = 0; j < count; ++j ) { MbCreator * creator = (*creatorsSet)[j]; - if ( creator != c3d_null ) + if ( creator != NULL ) estSimpleCnt += creator->GetCreatorsCount( ct_SimpleCreator ); } } @@ -93,13 +93,13 @@ public : c3d::CreatorSPtr creator; for ( i = 0; i < setsCnt; ++i ) { Creators * creatorsSet = creatorsData[i]; - if ( creatorsSet != c3d_null ) { + if ( creatorsSet != NULL ) { size_t count = creatorsSet->size(); RPArray * creators = new RPArray( count, 1 ); creatorsArray.push_back( creators ); for ( size_t j = 0; j < count; ++j ) { // важен порядок перебора creator = (*creatorsSet)[j]; - if ( creator != c3d_null ) { + if ( creator != NULL ) { creators->push_back( creator ); if ( creator->IsA() == ct_SimpleCreator ) simpleCreators.push_back( creator ); @@ -125,12 +125,12 @@ public: // \ru Общие функции математического объекта \en Common functions of the mathematical object virtual MbeCreatorType IsA() const; // \ru Тип элемента \en A type of element - virtual MbCreator & Duplicate( MbRegDuplicate * = c3d_null ) const; // \ru Сделать копию \en Create a copy + virtual MbCreator & Duplicate( MbRegDuplicate * = NULL ) const; // \ru Сделать копию \en Create a copy virtual bool IsSame( const MbCreator & other, double accuracy ) const; // \ru Являются ли объекты равными? \en Determine whether an object is equal? virtual bool SetEqual ( const MbCreator & ); // \ru Сделать равным \en Make equal - virtual void Transform( const MbMatrix3D &, MbRegTransform * = c3d_null ); // \ru Преобразовать элемент согласно матрице \en Transform element according to the matrix - virtual void Move ( const MbVector3D &, MbRegTransform * = c3d_null ); // \ru Сдвиг \en Translation - virtual void Rotate ( const MbAxis3D &, double angle, MbRegTransform * = c3d_null ); // \ru Повернуть вокруг оси \en Rotate around an axis + virtual void Transform( const MbMatrix3D &, MbRegTransform * = NULL ); // \ru Преобразовать элемент согласно матрице \en Transform element according to the matrix + virtual void Move ( const MbVector3D &, MbRegTransform * = NULL ); // \ru Сдвиг \en Translation + virtual void Rotate ( const MbAxis3D &, double angle, MbRegTransform * = NULL ); // \ru Повернуть вокруг оси \en Rotate around an axis virtual void GetProperties( MbProperties & ); // \ru Выдать свойства объекта \en Get properties of the object virtual void SetProperties( const MbProperties & ); // \ru Записать свойства объекта \en Set properties of the object @@ -146,7 +146,7 @@ public: virtual bool CreateShell( MbFaceShell *& shell, MbeCopyMode sameShell, - RPArray * items = c3d_null ); // \ru Построение \en Construction + RPArray * items = NULL ); // \ru Построение \en Construction virtual void SetYourVersion( VERSION version, bool forAll ); diff --git a/C3d/Include/cr_surface_spline.h b/C3d/Include/cr_surface_spline.h index 20e3008..ccbe886 100644 --- a/C3d/Include/cr_surface_spline.h +++ b/C3d/Include/cr_surface_spline.h @@ -31,12 +31,12 @@ class MATH_CLASS MbSurface; // --- class MATH_CLASS MbSurfaceSplineCreator : public MbCreator { private: - MbSurface * surface; // \ru Поверхность \en Surface - bool throughPnts; // \ru через точки \en Through points - SArray paramPnts; // \ru Параметрические точки \en Parametric points - SArray paramWts; // \ru Веса параметрических точек \en Parametric points weights - bool paramClosed; // \ru Замкнуть параметрический сплайн \en Make the parametric spline close - RPArray spaceTransitions; // \ru Сопряжения в точках \en Tangents at the points + MbSurface * surface; // \ru Поверхность \en Surface + bool throughPnts; // \ru через точки \en Through points + SArray paramPnts; // \ru Параметрические точки \en Parametric points + SArray paramWts; // \ru Веса параметрических точек \en Parametric points weights + bool paramClosed; // \ru Замкнуть параметрический сплайн \en Make the parametric spline close + RPArray< MbPntMatingData > spaceTransitions; // \ru Сопряжения в точках \en Tangents at the points protected: MbSurfaceSplineCreator( const MbSurfaceSplineCreator &, MbRegDuplicate * iReg ); // \ru Конструктор копирования \en Copy-constructor @@ -44,28 +44,25 @@ protected: MbSurfaceSplineCreator(); // \ru Не реализовано \en Not implemented public: - MbSurfaceSplineCreator( const MbSurface & surface, - bool sameSurf, - bool thrPnts, - const SArray & pnts, - const SArray & wts, - bool parCls, - RPArray & transitions, - const MbSNameMaker & snMaker ); + MbSurfaceSplineCreator( const MbSurface &, bool sameSurf, bool thrPnts, + const SArray & pnts, + const SArray & wts, bool parCls, + RPArray< MbPntMatingData > & transitions, + const MbSNameMaker & snMaker ); public : virtual ~MbSurfaceSplineCreator(); // \ru Общие функции строителя. \en The common functions of the creator. virtual MbeCreatorType IsA() const; // \ru Тип элемента \en A type of element - virtual MbCreator & Duplicate( MbRegDuplicate * iReg = c3d_null ) const; // \ru Сделать копию \en Create a copy + virtual MbCreator & Duplicate( MbRegDuplicate * iReg = NULL ) const; // \ru Сделать копию \en Create a copy virtual bool IsSame ( const MbCreator &, double accuracy ) const; // \ru Являются ли объекты равными? \en Determine whether an object is equal? virtual bool IsSimilar( const MbCreator & ) const; // \ru Являются ли объекты подобными \en Whether the objects are similar virtual bool SetEqual ( const MbCreator & ); // \ru Сделать равным \en Make equal - virtual void Transform( const MbMatrix3D &, MbRegTransform * = c3d_null ); // \ru Преобразовать элемент согласно матрице \en Transform element according to the matrix - virtual void Move ( const MbVector3D &, MbRegTransform * = c3d_null ); // \ru Сдвиг \en Translation - virtual void Rotate ( const MbAxis3D &, double angle, MbRegTransform * = c3d_null ); // \ru Повернуть вокруг оси \en Rotate about an axis + virtual void Transform( const MbMatrix3D &, MbRegTransform * = NULL ); // \ru Преобразовать элемент согласно матрице \en Transform element according to the matrix + virtual void Move ( const MbVector3D &, MbRegTransform * = NULL ); // \ru Сдвиг \en Translation + virtual void Rotate ( const MbAxis3D &, double angle, MbRegTransform * = NULL ); // \ru Повернуть вокруг оси \en Rotate about an axis virtual MbePrompt GetPropertyName(); // \ru Дать имя свойства объекта \en Get the object property name virtual void GetProperties( MbProperties & ); // \ru Выдать свойства объекта \en Get properties of the object @@ -75,7 +72,7 @@ public : virtual void SetBasisPoints( const MbControlData3D & ); // \ru Изменить объект по контрольным точкам. \en Change the object by control points. // \ru Построить кривую по журналу построения \en Create a curve from the history tree - virtual bool CreateWireFrame( MbWireFrame *&, MbeCopyMode, RPArray * items = c3d_null ); + virtual bool CreateWireFrame( MbWireFrame *&, MbeCopyMode, RPArray * items = NULL ); /** \} */ @@ -130,15 +127,15 @@ IMPL_PERSISTENT_OPS( MbSurfaceSplineCreator ) \ingroup Curve3D_Modeling */ //--- -MATH_FUNC (MbCreator *) CreateSurfaceSpline( const MbSurface & surface, - bool throughPoints, - SArray & paramPnts, - SArray & paramWts, - bool paramClosed, - RPArray & spaceTransitions, - const MbSNameMaker & snMaker, - MbResultType & resType, - RPArray & resCurves ); +MATH_FUNC (MbCreator *) CreateSurfaceSpline( const MbSurface & surface, + bool throughPoints, + SArray & paramPnts, + SArray & paramWts, + bool paramClosed, + RPArray< MbPntMatingData > & spaceTransitions, + const MbSNameMaker & snMaker, + MbResultType & resType, + RPArray & resCurves ); #endif // __CR_SURFACE_SPLINE_H diff --git a/C3d/Include/cr_swept_solid.h b/C3d/Include/cr_swept_solid.h index fc14a99..bcd499c 100644 --- a/C3d/Include/cr_swept_solid.h +++ b/C3d/Include/cr_swept_solid.h @@ -78,10 +78,10 @@ public : \{ */ virtual MbeCreatorType IsA() const = 0; // \ru Тип элемента \en A type of element virtual MbeCreatorType Type() const; // \ru Тип элемента \en A type of element - virtual MbCreator & Duplicate( MbRegDuplicate * = c3d_null ) const = 0; // \ru Сделать копию \en Create a copy - virtual void Transform( const MbMatrix3D &, MbRegTransform * = c3d_null ) = 0; // \ru Преобразовать элемент согласно матрице \en Transform element according to the matrix - virtual void Move ( const MbVector3D &, MbRegTransform * = c3d_null ) = 0; // \ru Сдвиг \en Translation - virtual void Rotate ( const MbAxis3D &, double angle, MbRegTransform * = c3d_null ) = 0; // \ru Повернуть вокруг оси \en Rotate around an axis + virtual MbCreator & Duplicate( MbRegDuplicate * = NULL ) const = 0; // \ru Сделать копию \en Create a copy + virtual void Transform( const MbMatrix3D &, MbRegTransform * = NULL ) = 0; // \ru Преобразовать элемент согласно матрице \en Transform element according to the matrix + virtual void Move ( const MbVector3D &, MbRegTransform * = NULL ) = 0; // \ru Сдвиг \en Translation + virtual void Rotate ( const MbAxis3D &, double angle, MbRegTransform * = NULL ) = 0; // \ru Повернуть вокруг оси \en Rotate around an axis virtual bool IsSame( const MbCreator &, double accuracy ) const = 0; // \ru Являются ли объекты равными? \en Determine whether an object is equal? virtual bool IsSimilar( const MbCreator & ) const = 0; // \ru Являются ли объекты подобными. \en Whether the objects are similar @@ -99,7 +99,7 @@ public : \en \name Common functions of the rigid solid (forming operations). \{ */ virtual bool CreateShell( MbFaceShell *& shell, MbeCopyMode sameShell, - RPArray * items = c3d_null ); // \ru Построение \en Construction + RPArray * items = NULL ); // \ru Построение \en Construction virtual MbFaceShell * InitShell( bool in ) = 0; virtual void InitBasis( RPArray & ) = 0; diff --git a/C3d/Include/cr_symmetry_solid.h b/C3d/Include/cr_symmetry_solid.h index 82d5642..0044ef6 100644 --- a/C3d/Include/cr_symmetry_solid.h +++ b/C3d/Include/cr_symmetry_solid.h @@ -44,10 +44,10 @@ public : // \ru Общие функции математического объекта \en Common functions of the mathematical object virtual MbeCreatorType IsA() const; // \ru Тип элемента \en A type of element - virtual MbCreator & Duplicate( MbRegDuplicate * = c3d_null ) const ; // \ru Сделать копию \en Create a copy - virtual void Transform( const MbMatrix3D &matr, MbRegTransform * = c3d_null ); // \ru Преобразовать элемент согласно матрице \en Transform element according to the matrix - virtual void Move( const MbVector3D &to, MbRegTransform * = c3d_null ); // \ru Сдвиг \en Translation - virtual void Rotate( const MbAxis3D &axis, double angle, MbRegTransform * = c3d_null ); // \ru Повернуть вокруг оси \en Rotate around an axis + virtual MbCreator & Duplicate( MbRegDuplicate * = NULL ) const ; // \ru Сделать копию \en Create a copy + virtual void Transform( const MbMatrix3D &matr, MbRegTransform * = NULL ); // \ru Преобразовать элемент согласно матрице \en Transform element according to the matrix + virtual void Move( const MbVector3D &to, MbRegTransform * = NULL ); // \ru Сдвиг \en Translation + virtual void Rotate( const MbAxis3D &axis, double angle, MbRegTransform * = NULL ); // \ru Повернуть вокруг оси \en Rotate around an axis virtual void GetProperties( MbProperties & ); // \ru Выдать свойства объекта \en Get properties of the object virtual void SetProperties( const MbProperties & ); // \ru Записать свойства объекта \en Set properties of the object @@ -60,7 +60,7 @@ public : // \ru Общие функции твердого тела \en Common functions of solid virtual bool CreateShell( MbFaceShell *& shell, MbeCopyMode sameShell, - RPArray * items = c3d_null ); // \ru Построение \en Construction + RPArray * items = NULL ); // \ru Построение \en Construction private : // \ru Объявление оператора присваивания без реализации, чтобы не было присваивания по умолчанию. \en The declaration of the assignment operator without implementation to prevent an assignment by default. diff --git a/C3d/Include/cr_thin_sheet.h b/C3d/Include/cr_thin_sheet.h index 160fc0b..c6bf0d3 100644 --- a/C3d/Include/cr_thin_sheet.h +++ b/C3d/Include/cr_thin_sheet.h @@ -31,10 +31,10 @@ protected : SimpleName name; ///< \ru Имя операции. \en Operation name. public : - MbThinShellCreator( const MbSurface & surf, bool sense, const SweptValues & p, + MbThinShellCreator( const MbSurface & surf, bool sense, SweptValues p, bool same, const MbSNameMaker & n, SimpleName & m ); private : - MbThinShellCreator( const MbThinShellCreator &, MbRegDuplicate * ); + MbThinShellCreator( const MbThinShellCreator &, MbRegDuplicate *ireg ); // \ru Объявление конструктора копирования без реализации, чтобы не было копирования по умолчанию. \en Declaration without implementation of the copy-constructor to prevent copying by default. MbThinShellCreator( const MbThinShellCreator & ); public : @@ -43,15 +43,15 @@ public : // \ru Общие функции математического объекта \en Common functions of the mathematical object virtual MbeCreatorType IsA() const; // \ru Тип элемента \en Type of element - virtual MbCreator & Duplicate( MbRegDuplicate * = c3d_null ) const; // \ru Сделать копию \en Create a copy - virtual void Transform( const MbMatrix3D &, MbRegTransform * = c3d_null ); // \ru Преобразовать элемент согласно матрице \en Transform element according to the matrix - virtual void Move ( const MbVector3D &, MbRegTransform * = c3d_null ); // \ru Сдвиг \en Translation - virtual void Rotate ( const MbAxis3D &, double angle, MbRegTransform * = c3d_null ); // \ru Повернуть вокруг оси \en Rotate about an axis + virtual MbCreator & Duplicate( MbRegDuplicate * = NULL ) const; // \ru Сделать копию \en Create a copy + virtual void Transform( const MbMatrix3D &matr, MbRegTransform * = NULL ); // \ru Преобразовать элемент согласно матрице \en Transform element according to the matrix + virtual void Move( const MbVector3D &to, MbRegTransform * = NULL ); // \ru Сдвиг \en Translation + virtual void Rotate( const MbAxis3D &axis, double angle, MbRegTransform * = NULL ); // \ru Повернуть вокруг оси \en Rotate about an axis - virtual void GetProperties( MbProperties & ); // \ru Выдать свойства объекта \en Get properties of the object - virtual void SetProperties( const MbProperties & ); // \ru Записать свойства объекта \en Set properties of the object + virtual void GetProperties( MbProperties &properties ); // \ru Выдать свойства объекта \en Get properties of the object + virtual void SetProperties( const MbProperties &properties ); // \ru Записать свойства объекта \en Set properties of the object virtual MbePrompt GetPropertyName(); // \ru Выдать заголовок свойства объекта \en Get a name of object property - virtual void GetBasisItems ( RPArray & ); // \ru Дать базовые объекты \en Get the base objects + virtual void GetBasisItems ( RPArray & s ); // \ru Дать базовые объекты \en Get the base objects virtual void GetBasisPoints( MbControlData3D & ) const; // \ru Выдать контрольные точки объекта. \en Get control points of object. virtual void SetBasisPoints( const MbControlData3D & ); // \ru Изменить объект по контрольным точкам. \en Change the object by control points. @@ -62,7 +62,7 @@ public : // \ru Общие функции твердого тела \en Common functions of solid solid virtual bool CreateShell( MbFaceShell *&shell, MbeCopyMode sameShell, - RPArray * items = c3d_null ); // \ru Построение \en Construction + RPArray * items = NULL ); // \ru Построение \en Construction // \ru Дать параметры. \en Get the parameters. void GetParameters( SweptValues & params ) const { params = parameters; } @@ -78,7 +78,6 @@ private : IMPL_PERSISTENT_OPS( MbThinShellCreator ) - //------------------------------------------------------------------------------ /** \brief \ru Построить оболочку по поверхности. \en Construct a shell from a surface. \~ @@ -107,14 +106,14 @@ IMPL_PERSISTENT_OPS( MbThinShellCreator ) \ingroup Model_Creators */ // --- -MATH_FUNC (MbCreator *) CreateThinShell( const MbSurface & surface, - bool sense, - const SweptValues & parameters, - bool same, +MATH_FUNC (MbCreator *) CreateThinShell( const MbSurface & surface, + bool sense, + const SweptValues & parameters, + bool same, const MbSNameMaker & operNames, - SimpleName & name, - MbResultType & res, - MbFaceShell *& shell ); + SimpleName & name, + MbResultType & res, + MbFaceShell *& shell ); //------------------------------------------------------------------------------ @@ -142,10 +141,10 @@ MATH_FUNC (MbCreator *) CreateThinShell( const MbSurface & surface, */ // --- MATH_FUNC (MbCreator *) CreateLoftedShell( const RPArray< SArray > & points, - const MbSNameMaker & operNames, - SimpleName & name, - MbResultType & res, - MbFaceShell *& shell ); + const MbSNameMaker & operNames, + SimpleName & name, + MbResultType & res, + MbFaceShell *& shell ); //------------------------------------------------------------------------------ @@ -173,10 +172,10 @@ MATH_FUNC (MbCreator *) CreateLoftedShell( const RPArray< SArray */ // --- MATH_FUNC (MbCreator *) CreateLoftedShell( const RPArray & curves, - const MbSNameMaker & operNames, - SimpleName & name, - MbResultType & res, - MbFaceShell *& shell ); + const MbSNameMaker & operNames, + SimpleName & name, + MbResultType & res, + MbFaceShell *& shell ); #endif // __CR_THIN_SHEET_H diff --git a/C3d/Include/cr_thin_shell_solid.h b/C3d/Include/cr_thin_shell_solid.h index 9ff8943..564eb75 100644 --- a/C3d/Include/cr_thin_shell_solid.h +++ b/C3d/Include/cr_thin_shell_solid.h @@ -64,10 +64,10 @@ private : public : // \ru Общие функции математического объекта \en Common functions of the mathematical object virtual MbeCreatorType IsA() const; // \ru Тип элемента \en A type of element - virtual MbCreator & Duplicate( MbRegDuplicate * = c3d_null ) const ; // \ru Сделать копию \en Create a copy - virtual void Transform( const MbMatrix3D &, MbRegTransform * = c3d_null ); // \ru Преобразовать элемент согласно матрице \en Transform element according to the matrix - virtual void Move ( const MbVector3D &, MbRegTransform * = c3d_null ); // \ru Сдвиг \en Translation - virtual void Rotate ( const MbAxis3D &, double angle, MbRegTransform * = c3d_null ); // \ru Повернуть вокруг оси \en Rotate around an axis + virtual MbCreator & Duplicate( MbRegDuplicate * = NULL ) const ; // \ru Сделать копию \en Create a copy + virtual void Transform( const MbMatrix3D &, MbRegTransform * = NULL ); // \ru Преобразовать элемент согласно матрице \en Transform element according to the matrix + virtual void Move ( const MbVector3D &, MbRegTransform * = NULL ); // \ru Сдвиг \en Translation + virtual void Rotate ( const MbAxis3D &, double angle, MbRegTransform * = NULL ); // \ru Повернуть вокруг оси \en Rotate around an axis virtual void GetProperties( MbProperties & ); // \ru Выдать свойства объекта \en Get properties of the object virtual void SetProperties( const MbProperties & ); // \ru Записать свойства объекта \en Set properties of the object @@ -79,7 +79,7 @@ public : // \ru Общие функции твердого тела \en Common functions of solid virtual bool CreateShell( MbFaceShell *& shell, MbeCopyMode sameShell, - RPArray * items = c3d_null ); // \ru Построение \en Construction + RPArray * items = NULL ); // \ru Построение \en Construction /// \ru Дать параметры. \en Get the parameters. void GetParameters( SweptValues & params ) const { params = parameters; } diff --git a/C3d/Include/cr_transformed_solid.h b/C3d/Include/cr_transformed_solid.h index 938c151..d7b1c5f 100644 --- a/C3d/Include/cr_transformed_solid.h +++ b/C3d/Include/cr_transformed_solid.h @@ -43,12 +43,12 @@ public: // \ru Деструктор \en Destructor public: // \ru Общие функции математического объекта \en Common functions of the mathematical object virtual MbeCreatorType IsA() const; // \ru Тип элемента \en A type of element - virtual MbCreator & Duplicate( MbRegDuplicate * = c3d_null ) const; // \ru Сделать копию \en Create a copy + virtual MbCreator & Duplicate( MbRegDuplicate * = NULL ) const; // \ru Сделать копию \en Create a copy virtual bool IsSame( const MbCreator & other, double accuracy ) const; // \ru Являются ли объекты равными? \en Determine whether an object is equal? virtual bool SetEqual ( const MbCreator & ); // \ru Сделать равным \en Make equal - virtual void Transform( const MbMatrix3D &, MbRegTransform * = c3d_null ); // \ru Преобразовать по матрице \en Transform according to the matrix - virtual void Move ( const MbVector3D &, MbRegTransform * = c3d_null ); // \ru Сдвиг по вектору \en Translation by a vector - virtual void Rotate ( const MbAxis3D &, double angle, MbRegTransform * = c3d_null ); // \ru Повернуть вокруг оси \en Rotate around an axis + virtual void Transform( const MbMatrix3D &, MbRegTransform * = NULL ); // \ru Преобразовать по матрице \en Transform according to the matrix + virtual void Move ( const MbVector3D &, MbRegTransform * = NULL ); // \ru Сдвиг по вектору \en Translation by a vector + virtual void Rotate ( const MbAxis3D &, double angle, MbRegTransform * = NULL ); // \ru Повернуть вокруг оси \en Rotate around an axis virtual MbePrompt GetPropertyName(); // \ru Выдать заголовок свойства объекта \en Get a name of object property virtual void GetProperties( MbProperties & ); // \ru Выдать свойства объекта \en Get properties of the object @@ -58,7 +58,7 @@ public: // \ru Общие функции математического объе /// \ru Построение оболочки \en Creation of a shell virtual bool CreateShell( MbFaceShell *&, MbeCopyMode sameShell, - RPArray * items = c3d_null ); + RPArray * items = NULL ); virtual void Refresh( MbFaceShell & ); ///< \ru Обновить форму оболочки \en Update shape of the shell // \ru Добавить модификацию по матрице \en Add a modification by a matrix void AddMatrix( MbFaceShell &, const MbMatrix3D & ); diff --git a/C3d/Include/cr_truncated_shell.h b/C3d/Include/cr_truncated_shell.h index ca2993a..8f4da09 100644 --- a/C3d/Include/cr_truncated_shell.h +++ b/C3d/Include/cr_truncated_shell.h @@ -43,20 +43,20 @@ class MATH_CLASS MbTruncatedShell : public MbCreator { private : std::vector selIndices; ///< \ru Идентификаторы выбранных граней усекаемой оболочки. \en Identifiers of selected faces of the shell being truncated. MbSplitData splitItems; ///< \ru Усекающие элементы c ориентациями. \en Truncating elements with orientations. - c3d::BoolVector orients; ///< \ru Ориентация усекающих элементов. \en Orientation of truncating elements. + SArray orients; ///< \ru Ориентация усекающих элементов. \en Orientation of truncating elements. bool mergeFaces; ///< \ru Сливать подобные грани (true). \en Whether to merge similar faces (true). bool mergeEdges; ///< \ru Сливать подобные ребра (true). \en Whether to merge similar edges (true). public: /// \ru Конструктор по двумерным кривым. \en Constructor by two-dimensional curves. MbTruncatedShell( const MbPlacement3D &, const RPArray &, bool same, - const c3d::BoolVector & orients, const MbMergingFlags &, const MbSNameMaker & ); + const SArray & orients, const MbMergingFlags &, const MbSNameMaker & ); /// \ru Конструктор по трехмерным кривым. \en Constructor by three-dimensional curves. MbTruncatedShell( const RPArray &, bool same, - const c3d::BoolVector & orients, const MbMergingFlags &, const MbSNameMaker & ); + const SArray & orients, const MbMergingFlags &, const MbSNameMaker & ); /// \ru Конструктор по поверхностям. \en Constructor by surfaces. MbTruncatedShell( const RPArray &, bool same, - const c3d::BoolVector & orients, const MbMergingFlags &, const MbSNameMaker & ); + const SArray & orients, const MbMergingFlags &, const MbSNameMaker & ); /// \ru Конструктор по строителям тела. \en Constructor by solid creators. MbTruncatedShell( const MbSolid &, bool same, bool keepShell, bool orient, const MbMergingFlags &, const MbSNameMaker & ); @@ -68,11 +68,11 @@ private: public: virtual MbeCreatorType IsA() const; // \ru Тип элемента \en Type of element - virtual MbCreator & Duplicate( MbRegDuplicate * = c3d_null ) const; // \ru Сделать копию \en Create a copy + virtual MbCreator & Duplicate( MbRegDuplicate * = NULL ) const; // \ru Сделать копию \en Create a copy - virtual void Transform( const MbMatrix3D &, MbRegTransform * = c3d_null ); // \ru Преобразовать элемент согласно матрице \en Transform element according to the matrix - virtual void Move ( const MbVector3D &, MbRegTransform * = c3d_null ); // \ru Сдвиг \en Translation - virtual void Rotate ( const MbAxis3D &, double angle, MbRegTransform * = c3d_null ); // \ru Повернуть вокруг оси \en Rotate about an axis + virtual void Transform( const MbMatrix3D &, MbRegTransform * = NULL ); // \ru Преобразовать элемент согласно матрице \en Transform element according to the matrix + virtual void Move ( const MbVector3D &, MbRegTransform * = NULL ); // \ru Сдвиг \en Translation + virtual void Rotate ( const MbAxis3D &, double angle, MbRegTransform * = NULL ); // \ru Повернуть вокруг оси \en Rotate about an axis virtual void GetProperties( MbProperties & properties ); // \ru Выдать свойства объекта \en Get properties of the object virtual void SetProperties( const MbProperties & properties ); // \ru Записать свойства объекта \en Set properties of the object @@ -90,7 +90,7 @@ public: // \ru Построение оболочки по исходным данным \en Construction of a shell from the given data virtual bool CreateShell( MbFaceShell *& shell, MbeCopyMode sameShell, - RPArray * items = c3d_null ); + RPArray * items = NULL ); // \ru Установить номера выбраных граней усекаемого тела \en Set indices of selected faces of the solid being truncated. void SetSelIndices( const std::vector & selInds ); @@ -139,18 +139,18 @@ IMPL_PERSISTENT_OPS( MbTruncatedShell ) \ingroup Model_Creators */ // --- -MATH_FUNC (MbCreator *) TruncateSurfacesSol( MbSolid & initSolid, - SArray & selIndices, - MbeCopyMode sameShell, - const MbSNameMaker & operNames, - RPArray & items, - c3d::BoolVector & orients, - bool curvesSplitMode, - MbeCopyMode solidsCopyMode, - const MbMergingFlags & mergeFlags, // флаги слияния граней и ребер - MbResultType & res, - MbFaceShell *& resShell, - MbPlacement3D *& resDir ); +MATH_FUNC (MbCreator *) TruncateSurfacesSol( MbSolid & initSolid, + SArray & selIndices, + MbeCopyMode sameShell, + const MbSNameMaker & operNames, + RPArray & items, + SArray & orients, + bool curvesSplitMode, + MbeCopyMode solidsCopyMode, + const MbMergingFlags & mergeFlags, // флаги слияния граней и ребер + MbResultType & res, + MbFaceShell *& resShell, + MbPlacement3D *& resDir ); #endif // __TRUNCATED_SHELL_H diff --git a/C3d/Include/cr_union_solid.h b/C3d/Include/cr_union_solid.h index 87decdc..b0851e5 100644 --- a/C3d/Include/cr_union_solid.h +++ b/C3d/Include/cr_union_solid.h @@ -79,10 +79,10 @@ public : // \ru Общие функции математического объекта \en Common functions of the mathematical object virtual MbeCreatorType IsA() const; // \ru Тип элемента \en A type of element - virtual MbCreator & Duplicate( MbRegDuplicate * = c3d_null ) const ; // \ru Сделать копию \en Create a copy - virtual void Transform( const MbMatrix3D &, MbRegTransform * = c3d_null ); // \ru Преобразовать элемент согласно матрице \en Transform element according to the matrix - virtual void Move( const MbVector3D &, MbRegTransform * = c3d_null ); // \ru Сдвиг \en Translation - virtual void Rotate( const MbAxis3D &, double angle, MbRegTransform * = c3d_null ); // \ru Повернуть вокруг оси \en Rotate around an axis + virtual MbCreator & Duplicate( MbRegDuplicate * = NULL ) const ; // \ru Сделать копию \en Create a copy + virtual void Transform( const MbMatrix3D &, MbRegTransform * = NULL ); // \ru Преобразовать элемент согласно матрице \en Transform element according to the matrix + virtual void Move( const MbVector3D &, MbRegTransform * = NULL ); // \ru Сдвиг \en Translation + virtual void Rotate( const MbAxis3D &, double angle, MbRegTransform * = NULL ); // \ru Повернуть вокруг оси \en Rotate around an axis virtual MbePrompt GetPropertyName(); // \ru Выдать заголовок свойства объекта \en Get a name of object property virtual void GetProperties( MbProperties & ); // \ru Выдать свойства объекта \en Get properties of the object @@ -102,7 +102,7 @@ public : // \ru Общие функции твердого тела \en Common functions of solid virtual bool CreateShell( MbFaceShell *& shell, MbeCopyMode sameShell, - RPArray * items = c3d_null ); // \ru Построение \en Construction + RPArray * items = NULL ); // \ru Построение \en Construction virtual void SetYourVersion( VERSION version, bool forAll ); @@ -115,7 +115,7 @@ public: /// \ru Общее количество строителей. \en Total count of creators. size_t GetCreatorsCount() const { return creators.size(); } /// \ru Дать строитель. \en Get the creator. - const MbCreator * GetCreator( size_t k ) const { return ((k < creators.size()) ? &(*creators[k]) : c3d_null); } + const MbCreator * GetCreator( size_t k ) const { return ((k < creators.size()) ? &(*creators[k]) : NULL); } public: /// \ru Собрать группы общих строителей тел. \en Collect groups of shared creators. @@ -140,8 +140,8 @@ IMPL_PERSISTENT_OPS( MbUnionSolid ) Before the operation a shell set is united into a single shell which contains all the faces of shell set. Union of the intersected shells is performed if necessary. The function simultaneously constructs the shell and creates its constructor. \n \~ - \param[in] solid - \ru Оболочка, с которой выполняется булева операция объединённого множества оболочек (может быть c3d_null). - \en The shell the Boolean operation of the united shell set is performed with (can be c3d_null). \~ + \param[in] solid - \ru Оболочка, с которой выполняется булева операция объединённого множества оболочек (может быть NULL). + \en The shell the Boolean operation of the united shell set is performed with (can be NULL). \~ \param[in] sameShell - \ru Способ копирования граней оболочки. \en Method of shell faces copying. \~ \param[in] creators - \ru Строители набора оболочек. @@ -186,7 +186,7 @@ MATH_FUNC (MbCreator *) CreateUnion( MbFaceShell * solid, bool isArray, // \ru Флаг массива \en Flag of array MbResultType & res, MbFaceShell *& shell, - RPArray * notGluedShells = c3d_null ); + RPArray * notGluedShells = NULL ); //------------------------------------------------------------------------------ diff --git a/C3d/Include/creator.h b/C3d/Include/creator.h index 0f2af4b..2526f85 100644 --- a/C3d/Include/creator.h +++ b/C3d/Include/creator.h @@ -69,10 +69,6 @@ enum MbeCreatorType { ct_Undefined = 0, ///< \ru Неизвестный объект. \en Unknown object. ct_Creator = 1, ///< \ru Строитель объекта. \en Constructor of object. \n - ct_DisplaceMaker = 10, ///< \ru Строитель изменённого объекта. \en Constructor of a changed object. \n - ct_MotionMaker = 11, ///< \ru Строитель перемещенного объекта. \en Constructor of a moved object. \n - ct_RotationMaker = 12, ///< \ru Строитель Повёрнутого вокруг оси объекта. \en Constructor of a rotated object. \n - ct_TransformationMaker = 13, ///< \ru Строитель трансформированного объекта. \en Constructor of a transformed object. \n // \ru Строители точек. \en Creators of points. ct_PointsCreator = 101, ///< \ru Строитель точечного каркаса. \en Constructor of point-frame. \n @@ -251,7 +247,7 @@ public : \return \ru Копия объекта. \en The object copy. \~ */ - virtual MbCreator & Duplicate( MbRegDuplicate * iReg = c3d_null ) const = 0; + virtual MbCreator & Duplicate( MbRegDuplicate * iReg = NULL ) const = 0; /** \brief \ru Преобразовать согласно матрице. \en Transform according to the matrix. \~ @@ -274,7 +270,7 @@ public : \param[in] iReg - \ru Регистратор. \en Registrator. \~ */ - virtual void Transform( const MbMatrix3D & matr, MbRegTransform * iReg = c3d_null ) = 0; + virtual void Transform( const MbMatrix3D & matr, MbRegTransform * iReg = NULL ) = 0; /** \brief \ru Сдвинуть вдоль вектора. \en Translate along a vector. \~ @@ -297,7 +293,7 @@ public : \param[in] iReg - \ru Регистратор. \en Registrator. \~ */ - virtual void Move ( const MbVector3D & to, MbRegTransform * iReg = c3d_null ) = 0; + virtual void Move ( const MbVector3D & to, MbRegTransform * iReg = NULL ) = 0; /** \brief \ru Повернуть объект вокруг оси. \en Rotate an object about the axis. \~ @@ -322,7 +318,7 @@ public : \param[in] iReg - \ru Регистратор. \en Registrator. \~ */ - virtual void Rotate ( const MbAxis3D & axis, double angle, MbRegTransform * iReg = c3d_null ) = 0; + virtual void Rotate ( const MbAxis3D & axis, double angle, MbRegTransform * iReg = NULL ) = 0; /** \brief \ru Являются ли объекты равными? \en Determine whether an object is equal? \~ @@ -360,13 +356,13 @@ public : \en A shell to be modified or a new shell. \~ \param[in] sameShell - \ru Полнота копирования элементов при построении. \en Whether to perform complete copying of elements while constructing. \~ - \param[in] items - \ru Контейнер для складывания элементов невыполненных построений (может быть c3d_null). - \en Container for the elements of not performed constructions (can be c3d_null). \~ + \param[in] items - \ru Контейнер для складывания элементов невыполненных построений (может быть NULL). + \en Container for the elements of not performed constructions (can be NULL). \~ \return \ru Выполнено ли построение. \en Whether the construction is performed. \~ */ virtual bool CreateShell( MbFaceShell *& shell, MbeCopyMode sameShell, - RPArray * items = c3d_null ); + RPArray * items = NULL ); /** \brief \ru Построить оболочку по исходным данным. \en Create a shell from the initial data. \~ @@ -376,13 +372,13 @@ public : \en A shell to be modified or a new shell. \~ \param[in] sameShell - \ru Полнота копирования элементов при построении. \en Whether to perform complete copying of elements while constructing. \~ - \param[in] items - \ru Контейнер для складывания элементов невыполненных построений (может быть c3d_null). - \en Container for the elements of not performed constructions (can be c3d_null). \~ + \param[in] items - \ru Контейнер для складывания элементов невыполненных построений (может быть NULL). + \en Container for the elements of not performed constructions (can be NULL). \~ \return \ru Выполнено ли построение. \en Whether the construction is performed. \~ */ bool CreateShell( c3d::ShellSPtr & shell, MbeCopyMode sameShell, - RPArray * items = c3d_null ); + RPArray * items = NULL ); /** \brief \ru Построить проволочный каркас по исходным данным. \en Create a wire-frame from the source data. \~ @@ -392,13 +388,13 @@ public : \en A frame to be modified or a new frame. \~ \param[in] sameShell - \ru Полнота копирования элементов при построении. \en Whether to perform complete copying of elements while constructing. \~ - \param[in] items - \ru Контейнер для складывания элементов невыполненных построений (может быть c3d_null). - \en Container for the elements of not performed constructions (can be c3d_null). \~ + \param[in] items - \ru Контейнер для складывания элементов невыполненных построений (может быть NULL). + \en Container for the elements of not performed constructions (can be NULL). \~ \return \ru Выполнено ли построение. \en Whether the construction is performed. \~ */ virtual bool CreateWireFrame( MbWireFrame *& frame, MbeCopyMode sameShell, - RPArray * items = c3d_null ); + RPArray * items = NULL ); /** \brief \ru Построить проволочный каркас по исходным данным. \en Create a wire-frame from the source data. \~ @@ -421,13 +417,13 @@ public : \en A frame to be modified or a new frame. \~ \param[in] sameShell - \ru Полнота копирования элементов при построении. \en Whether to perform complete copying of elements while constructing. \~ - \param[in] items - \ru Контейнер для складывания элементов невыполненных построений (может быть c3d_null). - \en Container for the elements of not performed constructions (can be c3d_null). \~ + \param[in] items - \ru Контейнер для складывания элементов невыполненных построений (может быть NULL). + \en Container for the elements of not performed constructions (can be NULL). \~ \return \ru Выполнено ли построение. \en Whether the construction is performed. \~ */ virtual bool CreatePointFrame( MbPointFrame *& frame, MbeCopyMode sameShell, - RPArray * items = c3d_null ); + RPArray * items = NULL ); /** \brief \ru Построить точечный каркас по исходным данным. \en Create a point-frame from the source data. \~ @@ -459,13 +455,11 @@ public : /// \ru Изменить объект по контрольным точкам. \en Change the object by control points. virtual void SetBasisPoints( const MbControlData3D & ); /// \ru Посчитать внутренние построители по типу. \en Count internal creators by type. - virtual size_t GetCreatorsCount( MbeCreatorType ct ) const; // { return (IsA() == ct) ? 1 : 0; } + virtual size_t GetCreatorsCount( MbeCreatorType ct ) const { return (IsA() == ct) ? 1 : 0; } /// \ru Получить внутренние построители по типу. \en Get internal creators by type. - virtual bool GetInternalCreators( MbeCreatorType, c3d::ConstCreatorsSPtrVector & ) const; + virtual bool GetInternalCreators( MbeCreatorType, c3d::ConstCreatorsSPtrVector & ) const { return false; } /// \ru Получить внутренние построители по типу. \en Get internal creators by type. - virtual bool SetInternalCreators( MbeCreatorType, c3d::CreatorsSPtrVector & ); - /// \ru Переместить/Изменить строитель. \en Displace/Change the creator. - virtual bool Perform( MbCreator * ) const; + virtual bool SetInternalCreators( MbeCreatorType, c3d::CreatorsSPtrVector & ) { return false; } /// \ru Установить версию объектов. \en Set the objects version. virtual void SetYourVersion( VERSION version, bool forAll ); diff --git a/C3d/Include/creator_transaction.h b/C3d/Include/creator_transaction.h index 4c7a1b6..b241d19 100644 --- a/C3d/Include/creator_transaction.h +++ b/C3d/Include/creator_transaction.h @@ -68,7 +68,7 @@ public: transactions.reserve( iCount ); for ( size_t i = 0; i < iCount; i++ ) { MbCreator * creator = const_cast( creators[i] ); - if ( creator != c3d_null ) { + if ( creator != NULL ) { creator->AddRef(); transactions.push_back( creator ); } @@ -84,21 +84,19 @@ public: virtual bool RebuildItem( MbeCopyMode sameShell, RPArray * items, IProgressIndicator * progInd ); /// \ru Очистить присланный журнал и скопировать в него строители. \en Clear the given history tree and copy the creators to it. - void CreatorsCopy ( MbTransactions & other, MbRegDuplicate * iReg = c3d_null ) const; + void CreatorsCopy ( MbTransactions & other, MbRegDuplicate * iReg = NULL ) const; /// \ru Очистить журнал и скопировать в него строители из присланного журнала. \en Clear the history tree and copy the creators from the given history tree to it. void CreatorsAssign ( const MbTransactions & other ); /// \ru Сделать строители равными соответствующим строителям присланного журнала, если строители подобны. \en Make the creators equal to the creators from the given history tree if the creators are similar. bool SetCreatorsEqual ( const MbTransactions & other ); /// \ru Проверить, являются ли соответствующие строители присланного журнала подобными. \en Check whether the corresponding creators of the given history tree are similar. bool IsCreatorsSimilar( const MbTransactions & other ) const; - // Посчитать внутренние построители по типу. \en Count internal creators by type. - size_t GetCreatorsCount( MbeCreatorType ct ) const; /// \ru Преобразовать согласно матрице строители. \en Transform the creators according to the matrix. - void CreatorsTransform( const MbMatrix3D &, MbRegTransform * = c3d_null ); + void CreatorsTransform( const MbMatrix3D &, MbRegTransform * = NULL ); /// \ru Сдвинуть вдоль вектора строители. \en Move creators along the vector. - void CreatorsMove ( const MbVector3D &, MbRegTransform * = c3d_null ); + void CreatorsMove ( const MbVector3D &, MbRegTransform * = NULL ); /// \ru Повернуть вокруг оси строители на заданный угол. \en Rotate the creators about the axis by the given angle. - void CreatorsRotate ( const MbAxis3D &, double angle, MbRegTransform * = c3d_null ); + void CreatorsRotate ( const MbAxis3D &, double angle, MbRegTransform * = NULL ); /// \ru Выдать количество строителей. \en Get the creators count. size_t GetCreatorsCount() const { return transactions.size(); } /// \ru Зарезервировать место для строителей. \en Reserve space for creators. @@ -121,7 +119,7 @@ public: c3d::CreatorSPtr creator; creators.reserve( creators.size() + addCnt ); for ( size_t i = 0; i < addCnt; ++i ) { - if ( transactions[i] != c3d_null ) { + if ( transactions[i] != NULL ) { creator = static_cast(&transactions[i]->Duplicate()); creators.push_back( creator ); ::DetachItem( creator ); @@ -145,7 +143,7 @@ public: c3d::CreatorSPtr creator; for ( size_t i = 0, addCnt = creators.size(); i < addCnt; ++i ) { creator = creators[i]; - if ( creator != c3d_null ) { + if ( creator != NULL ) { creator->AddRef(); transactions.push_back( creator ); ::DetachItem( creator ); diff --git a/C3d/Include/cur_arc.h b/C3d/Include/cur_arc.h index ca20731..b622cb6 100644 --- a/C3d/Include/cur_arc.h +++ b/C3d/Include/cur_arc.h @@ -377,12 +377,12 @@ public : \en \name Common functions of a geometric object. \{ */ virtual MbePlaneType IsA() const; // \ru Тип элемента \en A type of element - virtual MbPlaneItem & Duplicate( MbRegDuplicate * = c3d_null ) const; // \ru Сделать копию элемента \en Create a copy of the element + virtual MbPlaneItem & Duplicate( MbRegDuplicate * = NULL ) const; // \ru Сделать копию элемента \en Create a copy of the element virtual bool IsSame ( const MbPlaneItem & other, double accuracy = LENGTH_EPSILON ) const; virtual bool SetEqual ( const MbPlaneItem & ); // \ru Сделать равным \en Make equal - virtual void Transform( const MbMatrix & matr, MbRegTransform * ireg = c3d_null, const MbSurface * newSurface = c3d_null ); // \ru Преобразовать согласно матрице \en Transform according to the matrix - virtual void Move ( const MbVector &, MbRegTransform * = c3d_null, const MbSurface * newSurface = c3d_null ); // \ru Сдвиг \en Translation - virtual void Rotate( const MbCartPoint & pnt, const MbDirection & angle, MbRegTransform * = c3d_null, const MbSurface * newSurface = c3d_null ); // \ru Поворот \en Rotation + virtual void Transform( const MbMatrix & matr, MbRegTransform * ireg = NULL, const MbSurface * newSurface = NULL ); // \ru Преобразовать согласно матрице \en Transform according to the matrix + virtual void Move ( const MbVector &, MbRegTransform * = NULL, const MbSurface * newSurface = NULL ); // \ru Сдвиг \en Translation + virtual void Rotate( const MbCartPoint & pnt, const MbDirection & angle, MbRegTransform * = NULL, const MbSurface * newSurface = NULL ); // \ru Поворот \en Rotation virtual double DistanceToPoint( const MbCartPoint & ) const;// \ru Расстояние до точки \en Distance to a point virtual bool DistanceToPointIfLess( const MbCartPoint & toP, double & d ) const; // \ru Расстояние до точки, если оно меньше d \en Distance to a point if it is less than 'd' virtual void AddYourGabaritTo( MbRect & r ) const; // \ru Добавь свой габарит в прямой прям-к \en Add own bounding rectangle to an upright bounding rectangle @@ -445,7 +445,7 @@ public : /** \ru \name Общие функции кривой \en \name Common functions of the curve \{ */ - virtual void Inverse( MbRegTransform * iReg = c3d_null ); // \ru Изменить направление \en Change direction + virtual void Inverse( MbRegTransform * iReg = NULL ); // \ru Изменить направление \en Change direction virtual double GetMetricLength() const; // \ru Выдать метрическую длину кривой \en Get the metric length of the curve virtual double CalculateMetricLength() const; // \ru Посчитать метрическую длину \en Calculate metric length @@ -459,7 +459,7 @@ public : virtual double PointProjection( const MbCartPoint & pnt ) const; // \ru Проекция точки на кривую \en Projection of a point onto the curve virtual bool NearPointProjection( const MbCartPoint & pnt, double xEpsilon, double yEpsilon, - double & t, bool ext, MbRect1D * tRange = c3d_null ) const; // \ru Проекция точки на кривую или её продолжение в области поиска проекции \en Projection of the point onto the curve or its extension in the projection region + double & t, bool ext, MbRect1D * tRange = NULL ) const; // \ru Проекция точки на кривую или её продолжение в области поиска проекции \en Projection of the point onto the curve or its extension in the projection region // \ru Вычисление всех касательных к кривой из данной точки \en Calculation of all the tangents to the curve from a given point virtual void TangentPoint( const MbCartPoint & pnt, SArray & tFind ) const; // \ru Вычисление всех перпендикуляров к кривой из данной точки \en Calculation of all the perpendiculars to the curve from a given point @@ -949,15 +949,15 @@ public : void Init( const MbCartPoint & pc, const MbCartPoint & p1, const MbCartPoint & p2, int initSense ); // \ru Инициализация по начальной и конечной точкам и 1/2 угла раствора дуги \en Initialization by the starting and end points and 1/2 of the arc opening angle - // \ru Если diskrData != c3d_null, то округлить радиус и скорректировать первую \en If diskrData != c3d_null, then round the radius and correct the first + // \ru Если diskrData != NULL, то округлить радиус и скорректировать первую \en If diskrData != NULL, then round the radius and correct the first // \ru Или вторую точку (зависит от correctFirstPnt) \en Or the second point (depends on correctFirstPnt) /** \brief \ru Инициализировать дугу окружность. \en Initialize a circular arc. \~ \details \ru Инициализация происходит по начальной и конечной точкам и 1/2 угла раствора дуги. - Если diskrData != c3d_null, радиус округляется и корректируется первая + Если diskrData != NULL, радиус округляется и корректируется первая или вторая точка (зависит от correctFirstPnt). \en The initialization is performed by the starting and end points and 1/2 of the arc opening angle. - If diskrData != c3d_null, the radius is rounded and the first + If diskrData != NULL, the radius is rounded and the first or the second point is corrected (depends on correctFirstPnt). \~ \param[in] a2 - \ru 1/2 угла раствора дуги окружности. \en 1/2 of the circular arc opening angle. \~ @@ -973,7 +973,7 @@ public : correctFirstPnt == true - the first point is to be corrected. \~ */ void Init( double a2, MbCartPoint & p1, MbCartPoint & p2, - const DiskreteLengthData * diskrData = c3d_null, + const DiskreteLengthData * diskrData = NULL, bool correctFirstPnt = true ); // \ru Инициализация эллипса \en Ellipse initialization /** \brief \ru Инициализировать эллипс. diff --git a/C3d/Include/cur_arc3d.h b/C3d/Include/cur_arc3d.h index 3af393d..f9c35e1 100644 --- a/C3d/Include/cur_arc3d.h +++ b/C3d/Include/cur_arc3d.h @@ -300,10 +300,10 @@ public : \en \name Common functions of a geometric object. \{ */ virtual MbeSpaceType IsA() const; // \ru Тип элемента \en A type of element - virtual MbSpaceItem & Duplicate( MbRegDuplicate * = c3d_null ) const; // \ru Сделать копию элемента \en Create a copy of the element - virtual void Transform( const MbMatrix3D &, MbRegTransform * = c3d_null ); // \ru Преобразовать элемент согласно матрице \en Transform element according to the matrix - virtual void Move ( const MbVector3D &, MbRegTransform * = c3d_null ); // \ru Сдвиг \en Translation - virtual void Rotate ( const MbAxis3D &, double angle, MbRegTransform * = c3d_null ); // \ru Повернуть вокруг оси \en Rotate around an axis + virtual MbSpaceItem & Duplicate( MbRegDuplicate * = NULL ) const; // \ru Сделать копию элемента \en Create a copy of the element + virtual void Transform( const MbMatrix3D &, MbRegTransform * = NULL ); // \ru Преобразовать элемент согласно матрице \en Transform element according to the matrix + virtual void Move ( const MbVector3D &, MbRegTransform * = NULL ); // \ru Сдвиг \en Translation + virtual void Rotate ( const MbAxis3D &, double angle, MbRegTransform * = NULL ); // \ru Повернуть вокруг оси \en Rotate around an axis virtual bool IsSame ( const MbSpaceItem & other, double accuracy = LENGTH_EPSILON ) const; virtual bool SetEqual ( const MbSpaceItem & ); // \ru Сделать равным \en Make equal virtual double DistanceToPoint( const MbCartPoint3D & ) const;// \ru Расстояние до точки \en Distance to a point @@ -356,13 +356,13 @@ public : virtual void Explore( double & t, bool ext, MbCartPoint3D & pnt, MbVector3D & fir, MbVector3D * sec, MbVector3D * thir ) const; /** \} */ - virtual void Inverse( MbRegTransform * iReg = c3d_null ); // \ru Изменить направление \en Change direction + virtual void Inverse( MbRegTransform * iReg = NULL ); // \ru Изменить направление \en Change direction virtual double Step ( double t, double sag ) const; // \ru Вычисление шага по стрелке прогиба. \en Calculation of parameter step by the sag. virtual double DeviationStep( double t, double angle ) const; // \ru Вычисление шага по углу отклонения нормали. \en Calculation of parameter step by the deviation angle. virtual double MetricStep ( double t, double length ) const; // \ru Вычисление шага параметра по длине. \en Calculation of parameter step by the given length. // \ru Все проекции точки на кривую \en All the projections of a point onto the curve - virtual bool NearPointProjection( const MbCartPoint3D &, double & t, bool ext, MbRect1D * tRange = c3d_null ) const; // \ru Ближайшая проекция точки на кривую \en The closest projection of a point onto the curve + virtual bool NearPointProjection( const MbCartPoint3D &, double & t, bool ext, MbRect1D * tRange = NULL ) const; // \ru Ближайшая проекция точки на кривую \en The closest projection of a point onto the curve virtual MbNurbs3D * NurbsCurve( const MbCurveIntoNurbsInfo & ) const; virtual MbCurve3D * NurbsCurve( const MbNurbsParameters & ) const; // \ru Построить Nurbs-копию кривой \en Construct NURBS-copy of the curve @@ -377,15 +377,15 @@ public : virtual size_t GetCount() const; virtual void GetPointsByEvenLengthDelta( size_t n, std::vector & pnts ) const; // \ru Выдать n точек кривой с равными интервалами по длине дуги \en Get n points of curves equally spaced by the arc length - virtual MbCurve * GetMap( const MbMatrix3D &, MbRect1D * pRgn = c3d_null, - VERSION version = Math::DefaultMathVersion(), bool * coincParams = c3d_null ) const; // \ru Дать плоскую проекцию кривой \en Get a planar projection of a curve + virtual MbCurve * GetMap( const MbMatrix3D &, MbRect1D * pRgn = NULL, + VERSION version = Math::DefaultMathVersion(), bool * coincParams = NULL ) const; // \ru Дать плоскую проекцию кривой \en Get a planar projection of a curve virtual MbCurve * GetMapPsp( const MbMatrix3D &, double zNear, - MbRect1D * pRgn = c3d_null ) const; + MbRect1D * pRgn = NULL ) const; virtual double GetRadius() const; // \ru Дать физический радиус объекта или ноль, если это невозможно. \en Get the physical radius of the object or null if it impossible. virtual bool GetCircleAxis ( MbAxis3D & ) const; // \ru Дать ось кривой \en Get the axis of the curve // \ru Дать плоскую кривую и плейсмент, если пространственная кривая плоская (после использования вызывать DeleteItem на двумерную кривую) \en Get a planar curve and placement, if the spatial curve is planar (after using the DeleteItem must be called on a three-dimensional curve) - virtual bool GetPlaneCurve( MbCurve *& curve2d, MbPlacement3D & place, bool saveParams, PlanarCheckParams params = PlanarCheckParams() ) const; + virtual bool GetPlaneCurve( MbCurve *& curve2d, MbPlacement3D & place, bool saveParams, VERSION version = Math::DefaultMathVersion() ) const; virtual void CalculateGabarit( MbCube & ) const; // \ru Вычислить габарит кривой \en Calculate bounding box of curve virtual void CalculateLocalGabarit( const MbMatrix3D &, MbCube & ) const; // \ru Рассчитать габарит относительно л.с.к. \en Calculate bounding box relative to local coordinate system @@ -413,9 +413,9 @@ public : void AlignXAxis(); ///< \ru Повернуть плейсмент круговой дуги так, чтобы ось ox указывала в начальную точку дуги. \en Rotate the placement of a circular arc so as the ox-axis points to the start point of the arc. /// \ru Является ли кривая плоской? \en Whether the curve is planar? - virtual bool IsPlanar( double accuracy = METRIC_EPSILON ) const; + virtual bool IsPlanar() const; /// \ru Заполнить плейсемент, если кривая плоская. \en Fill the placement if a curve is planar. - virtual bool GetPlacement( MbPlacement3D & place, PlanarCheckParams params = PlanarCheckParams() ) const; + virtual bool GetPlacement( MbPlacement3D & place, VERSION version = Math::DefaultMathVersion() ) const; const MbPlacement3D & GetPlacement() const { return position; } MbPlacement3D & SetPlacement() { return position; } diff --git a/C3d/Include/cur_b_spline.h b/C3d/Include/cur_b_spline.h index 3f5ed6f..199e50e 100644 --- a/C3d/Include/cur_b_spline.h +++ b/C3d/Include/cur_b_spline.h @@ -56,12 +56,12 @@ public: // \ru Общие функции математического объекта \en The common functions of the mathematical object virtual MbeSpaceType IsA() const; // \ru Тип элемента \en A type of element - virtual MbSpaceItem & Duplicate( MbRegDuplicate * = c3d_null ) const; // \ru Сделать копию элемента \en Create a copy of the element + virtual MbSpaceItem & Duplicate( MbRegDuplicate * = NULL ) const; // \ru Сделать копию элемента \en Create a copy of the element virtual bool IsSame( const MbSpaceItem & other, double accuracy = LENGTH_EPSILON ) const; virtual bool SetEqual( const MbSpaceItem & init ); // \ru Сделать равным \en Make equal - virtual void Transform( const MbMatrix3D & matr, MbRegTransform * = c3d_null ); // \ru Преобразовать элемент согласно матрице \en Transform element according to the matrix - virtual void Move( const MbVector3D & to, MbRegTransform * = c3d_null ); // \ru Сдвиг \en Translation - virtual void Rotate( const MbAxis3D & axis, double angle, MbRegTransform * = c3d_null ); // \ru Повернуть вокруг оси \en Rotate about an axis + virtual void Transform( const MbMatrix3D & matr, MbRegTransform * = NULL ); // \ru Преобразовать элемент согласно матрице \en Transform element according to the matrix + virtual void Move( const MbVector3D & to, MbRegTransform * = NULL ); // \ru Сдвиг \en Translation + virtual void Rotate( const MbAxis3D & axis, double angle, MbRegTransform * = NULL ); // \ru Повернуть вокруг оси \en Rotate about an axis virtual void CalculateMesh( const MbStepData & stepData, const MbFormNote & note, MbMesh & mesh ) const; // \ru Построить полигональную копию mesh. \en Build polygonal copy mesh. virtual void GetProperties( MbProperties & properties ); // \ru Выдать свойства объекта \en Get properties of the object @@ -87,7 +87,7 @@ public: virtual MbNurbs3D * NurbsCurve( const MbCurveIntoNurbsInfo & ) const; - virtual void Inverse( MbRegTransform * iReg = c3d_null ); // \ru Изменить направление \en Change direction + virtual void Inverse( MbRegTransform * iReg = NULL ); // \ru Изменить направление \en Change direction void CalculateOnePolygon( size_t i, const MbStepData & stepData, MbPolygon3D * polygon ) const; // \ru Pассчитать полигон по параметру T \en Calculate polygon of the parameter T // \ru Расчет весовых функций и их первых, вторых и третьих производных \en Calculation of the weight functions and their first, second and third derivatives diff --git a/C3d/Include/cur_bezier.h b/C3d/Include/cur_bezier.h index 04e1d93..be2e5c9 100644 --- a/C3d/Include/cur_bezier.h +++ b/C3d/Include/cur_bezier.h @@ -220,10 +220,10 @@ public : virtual MbePlaneType IsA() const; // \ru Тип элемента \en A type of element virtual bool SetEqual( const MbPlaneItem & ); // \ru Сделать элементы равными \en Make the elements equal virtual bool IsSame( const MbPlaneItem & other, double accuracy = LENGTH_EPSILON ) const; // \ru Является ли кривая curve копией данной кривой ? \en Whether the 'curve' curve is duplicate of current curve. - virtual void Transform( const MbMatrix & matr, MbRegTransform * ireg = c3d_null, const MbSurface * newSurface = c3d_null ); // \ru Преобразовать элемент согласно матрице \en Transform element according to the matrix - virtual void Move( const MbVector & to, MbRegTransform * = c3d_null, const MbSurface * newSurface = c3d_null ); // \ru Сдвиг \en Translation - virtual void Rotate( const MbCartPoint & pnt, const MbDirection & angle, MbRegTransform * = c3d_null, const MbSurface * newSurface = c3d_null ); // \ru Поворот \en Rotation - virtual MbPlaneItem & Duplicate( MbRegDuplicate * = c3d_null ) const; // \ru Сделать копию элемента \en Create a copy of the element + virtual void Transform( const MbMatrix & matr, MbRegTransform * ireg = NULL, const MbSurface * newSurface = NULL ); // \ru Преобразовать элемент согласно матрице \en Transform element according to the matrix + virtual void Move( const MbVector & to, MbRegTransform * = NULL, const MbSurface * newSurface = NULL ); // \ru Сдвиг \en Translation + virtual void Rotate( const MbCartPoint & pnt, const MbDirection & angle, MbRegTransform * = NULL, const MbSurface * newSurface = NULL ); // \ru Поворот \en Rotation + virtual MbPlaneItem & Duplicate( MbRegDuplicate * = NULL ) const; // \ru Сделать копию элемента \en Create a copy of the element /** \} */ /** \ru \name Функции инициализации сплайна. \en \name Spline initialization functions. @@ -310,7 +310,7 @@ public : virtual MbCurve * Trimmed( double t1, double t2, int sense ) const; virtual MbContour * NurbsContour() const; - virtual void Inverse( MbRegTransform * iReg = c3d_null ); // \ru Изменение направления кривой на противоположное \en Change to the opposite direction of a curve + virtual void Inverse( MbRegTransform * iReg = NULL ); // \ru Изменение направления кривой на противоположное \en Change to the opposite direction of a curve virtual void GetProperties( MbProperties & properties ); // \ru Выдать свойства объекта \en Get properties of the object virtual void SetProperties( const MbProperties & properties ); // \ru Записать свойства объекта \en Set properties of the object @@ -472,7 +472,7 @@ public : virtual bool DistanceAlong( double & t, double len, int curveDir, double eps = Math::LengthEps, VERSION version = Math::DefaultMathVersion() ) const; - virtual bool IsContinuousDerivative( bool & contLength, bool & contDirect, c3d::DoubleVector * params = c3d_null, double epsilon = EPSILON ) const; // \ru Непрерывна ли первая производная? \en Have the first derivative the continuous? + virtual bool IsContinuousDerivative( bool & contLength, bool & contDirect, c3d::DoubleVector * params = NULL, double epsilon = EPSILON ) const; // \ru Непрерывна ли первая производная? \en Have the first derivative the continuous? // \ru Устранить разрывы первых производных по длине. \en Eliminate the discontinuities of the first derivative at length. virtual bool SetContinuousDerivativeLength( VERSION version, double epsilon = EPSILON ); diff --git a/C3d/Include/cur_bezier3d.h b/C3d/Include/cur_bezier3d.h index 6695acf..445a1ca 100644 --- a/C3d/Include/cur_bezier3d.h +++ b/C3d/Include/cur_bezier3d.h @@ -112,12 +112,12 @@ public : // \ru Общие функции математического объекта \en The common functions of the mathematical object virtual MbeSpaceType IsA() const; // \ru Тип элемента \en A type of element - virtual MbSpaceItem & Duplicate( MbRegDuplicate * = c3d_null ) const; // \ru Сделать копию элемента \en Create a copy of the element + virtual MbSpaceItem & Duplicate( MbRegDuplicate * = NULL ) const; // \ru Сделать копию элемента \en Create a copy of the element virtual bool IsSame ( const MbSpaceItem & other, double accuracy = LENGTH_EPSILON ) const; virtual bool SetEqual ( const MbSpaceItem & ); // \ru Сделать равным \en Make equal - virtual void Transform( const MbMatrix3D &, MbRegTransform * = c3d_null ); // \ru Преобразовать элемент согласно матрице \en Transform element according to the matrix - virtual void Move ( const MbVector3D &, MbRegTransform * = c3d_null ); // \ru Сдвиг \en Translation - virtual void Rotate ( const MbAxis3D &, double angle, MbRegTransform * = c3d_null ); // \ru Поворот \en Rotation + virtual void Transform( const MbMatrix3D &, MbRegTransform * = NULL ); // \ru Преобразовать элемент согласно матрице \en Transform element according to the matrix + virtual void Move ( const MbVector3D &, MbRegTransform * = NULL ); // \ru Сдвиг \en Translation + virtual void Rotate ( const MbAxis3D &, double angle, MbRegTransform * = NULL ); // \ru Поворот \en Rotation virtual void GetProperties( MbProperties & ); // \ru Выдать свойства объекта \en Get properties of the object virtual void SetProperties( const MbProperties & ); // \ru Записать свойства объекта \en Set properties of the object @@ -137,7 +137,7 @@ public : virtual double Step( double t, double sag ) const; // \ru Вычисление шага аппроксимации \en Calculate step of approximation virtual double DeviationStep( double t, double angle ) const; - virtual void Inverse( MbRegTransform * iReg = c3d_null ); // \ru Изменить направление \en Change direction + virtual void Inverse( MbRegTransform * iReg = NULL ); // \ru Изменить направление \en Change direction virtual bool Break( MbBezier3D &, double t1, double t2 ) const; // \ru Разбить на две части \en Split into two parts @@ -147,7 +147,7 @@ public : virtual MbCurve3D * TrimmBreak( double t1, double t2, int sense ) const; // \ru Дать плоскую кривую и плейсмент, если пространственная кривая плоская (после использования вызывать DeleteItem на двумерную кривую) // \en Give a planar curve and placement, if the spatial curve is planar (after using the DeleteItem must be called for a two-dimensional curve) - virtual bool GetPlaneCurve( MbCurve *& curve2d, MbPlacement3D & place, bool saveParams, PlanarCheckParams params = PlanarCheckParams() ) const; + virtual bool GetPlaneCurve( MbCurve *& curve2d, MbPlacement3D & place, bool saveParams, VERSION version = Math::DefaultMathVersion() ) const; /// \ru Получить границы участков кривой, которые описываются одной аналитической функцией. /// \en Get the boundaries of the curve sections that are described by one analytical function. \~ @@ -180,8 +180,8 @@ public : ptrdiff_t GetSplinesCount() const { return splinesCount; } // \ru Количество сплайнов \en The number of splines // \ru Функции только 3D кривой \en Function for 3D-curve - virtual MbCurve * GetMap( const MbMatrix3D &, MbRect1D * pRgn = c3d_null, - VERSION version = Math::DefaultMathVersion(), bool * coincParams = c3d_null ) const; // \ru Дать плоскую проекцию кривой \en Get a planar projection of curve + virtual MbCurve * GetMap( const MbMatrix3D &, MbRect1D * pRgn = NULL, + VERSION version = Math::DefaultMathVersion(), bool * coincParams = NULL ) const; // \ru Дать плоскую проекцию кривой \en Get a planar projection of curve virtual size_t GetCount() const; @@ -191,7 +191,7 @@ public : virtual bool DistanceAlong( double & t, double len, int curveDir, double eps = Math::metricPrecision, VERSION version = Math::DefaultMathVersion() ) const; - virtual bool IsContinuousDerivative( bool & contLength, bool & contDirect, c3d::DoubleVector * params = c3d_null, double epsilon = EPSILON ) const; // \ru Непрерывна ли первая производная? \en Have the first derivative the continuous? + virtual bool IsContinuousDerivative( bool & contLength, bool & contDirect, c3d::DoubleVector * params = NULL, double epsilon = EPSILON ) const; // \ru Непрерывна ли первая производная? \en Have the first derivative the continuous? // \ru Устранить разрывы первых производных по длине. \en Eliminate the discontinuities of the first derivative at length. virtual bool SetContinuousDerivativeLength( VERSION version, double epsilon = EPSILON ); diff --git a/C3d/Include/cur_bridge3d.h b/C3d/Include/cur_bridge3d.h index a3db18c..fecd521 100644 --- a/C3d/Include/cur_bridge3d.h +++ b/C3d/Include/cur_bridge3d.h @@ -67,13 +67,13 @@ public: // \ru Общие функции математического объекта \en Common functions of the mathematical object virtual MbeSpaceType IsA() const; // \ru Тип элемента \en A type of element - virtual MbSpaceItem & Duplicate( MbRegDuplicate * = c3d_null ) const; // \ru Сделать копию элемента \en Create a copy of the element + virtual MbSpaceItem & Duplicate( MbRegDuplicate * = NULL ) const; // \ru Сделать копию элемента \en Create a copy of the element virtual bool IsSame ( const MbSpaceItem & other, double accuracy = LENGTH_EPSILON ) const; // \ru Является ли объект копией \en Whether the object is a copy virtual bool SetEqual ( const MbSpaceItem & ); // \ru Сделать равным \en Make equal virtual bool IsSimilar( const MbSpaceItem & init ) const; // \ru Сделать элементы равными \en Make the elements equal - virtual void Transform( const MbMatrix3D &, MbRegTransform * = c3d_null ); // \ru Преобразовать элемент согласно матрице \en Transform element according to the matrix - virtual void Move ( const MbVector3D &, MbRegTransform * = c3d_null ); // \ru Сдвиг \en Translation - virtual void Rotate ( const MbAxis3D &, double angle, MbRegTransform * = c3d_null ); // \ru Повернуть вокруг оси \en Rotate around an axis + virtual void Transform( const MbMatrix3D &, MbRegTransform * = NULL ); // \ru Преобразовать элемент согласно матрице \en Transform element according to the matrix + virtual void Move ( const MbVector3D &, MbRegTransform * = NULL ); // \ru Сдвиг \en Translation + virtual void Rotate ( const MbAxis3D &, double angle, MbRegTransform * = NULL ); // \ru Повернуть вокруг оси \en Rotate around an axis virtual void AddYourGabaritTo( MbCube & ) const; // \ru Добавь свой габарит в куб \en Add own bounding box into a bounding box virtual void Refresh(); // \ru Сбросить все временные данные \en Flush all the temporary data virtual void PrepareIntegralData( const bool forced ) const; // \ru Рассчитать временные (mutable) данные объекта. \en Calculate temporary (mutable) data of an object. @@ -97,7 +97,7 @@ public: virtual void Explore( double & t, bool ext, MbCartPoint3D & pnt, MbVector3D & fir, MbVector3D * sec, MbVector3D * thir ) const; - virtual void Inverse ( MbRegTransform * iReg = c3d_null ); // \ru Изменить направление \en Change direction + virtual void Inverse ( MbRegTransform * iReg = NULL ); // \ru Изменить направление \en Change direction virtual double Step ( double t, double sag ) const; // \ru Вычисление шага аппроксимации \en Calculation of the approximation step virtual double DeviationStep( double t, double angle ) const; diff --git a/C3d/Include/cur_character_curve.h b/C3d/Include/cur_character_curve.h index 630c735..ce9dccb 100644 --- a/C3d/Include/cur_character_curve.h +++ b/C3d/Include/cur_character_curve.h @@ -71,12 +71,12 @@ public: // \ru Общие функции геометрического объекта. \en Common functions of a geometric object. virtual MbePlaneType IsA() const; // \ru Тип элемента \en A type of element - virtual MbPlaneItem & Duplicate ( MbRegDuplicate * = c3d_null ) const; // \ru Сделать копию элемента \en Create a copy of the element + virtual MbPlaneItem & Duplicate ( MbRegDuplicate * = NULL ) const; // \ru Сделать копию элемента \en Create a copy of the element virtual bool IsSame ( const MbPlaneItem & other, double accuracy = LENGTH_EPSILON ) const; // \ru Кривая есть копия этой кривой ? \en Is a curve a copy of this curve? virtual bool SetEqual ( const MbPlaneItem & ); // \ru Сделать равным \en Make equal - virtual void Transform( const MbMatrix &, MbRegTransform * = c3d_null, const MbSurface * newSurface = c3d_null ); // \ru Преобразовать элемент согласно матрице \en Transform element according to the matrix - virtual void Move ( const MbVector &, MbRegTransform * = c3d_null, const MbSurface * newSurface = c3d_null ); // \ru Сдвиг \en Translation - virtual void Rotate ( const MbCartPoint & pnt, const MbDirection & angle, MbRegTransform * = c3d_null, const MbSurface * newSurface = c3d_null ); // \ru Повернуть вокруг оси \en Rotate around an axis + virtual void Transform( const MbMatrix &, MbRegTransform * = NULL, const MbSurface * newSurface = NULL ); // \ru Преобразовать элемент согласно матрице \en Transform element according to the matrix + virtual void Move ( const MbVector &, MbRegTransform * = NULL, const MbSurface * newSurface = NULL ); // \ru Сдвиг \en Translation + virtual void Rotate ( const MbCartPoint & pnt, const MbDirection & angle, MbRegTransform * = NULL, const MbSurface * newSurface = NULL ); // \ru Повернуть вокруг оси \en Rotate around an axis virtual void AddYourGabaritTo( MbRect & ) const; // \ru Добавь в прям-к свой габарит \en Add own bounding rectangle to the bounding rectangle virtual void PrepareIntegralData( const bool forced ) const; // \ru Рассчитать временные (mutable) данные объекта. \en Calculate temporary (mutable) data of an object. @@ -103,7 +103,7 @@ public: virtual double GetLengthEvaluation() const; // \ru Оценка метрической длины кривой \en Metric length evaluation of a curve virtual void CalculateGabarit( MbRect & ) const; // \ru Определить габаритный прямоугольник кривой. - virtual void Inverse ( MbRegTransform * iReg = c3d_null ); // \ru Изменить направление \en Change direction + virtual void Inverse ( MbRegTransform * iReg = NULL ); // \ru Изменить направление \en Change direction virtual size_t GetCount () const; // \ru Определить количество разбиений для прохода в операциях. \en Define the number of splittings for one passage in operations. virtual MbNurbs * NurbsCurve ( const MbCurveIntoNurbsInfo & ) const; diff --git a/C3d/Include/cur_character_curve3d.h b/C3d/Include/cur_character_curve3d.h index 2fd24e3..84382ba 100644 --- a/C3d/Include/cur_character_curve3d.h +++ b/C3d/Include/cur_character_curve3d.h @@ -79,12 +79,12 @@ public: VISITING_CLASS( MbCharacterCurve3D ) virtual MbeSpaceType IsA () const; // \ru Тип элемента \en A type of element - virtual MbSpaceItem & Duplicate( MbRegDuplicate * = c3d_null ) const; // \ru Сделать копию элемента \en Create a copy of the element + virtual MbSpaceItem & Duplicate( MbRegDuplicate * = NULL ) const; // \ru Сделать копию элемента \en Create a copy of the element virtual bool IsSame ( const MbSpaceItem & other, double accuracy = LENGTH_EPSILON ) const; // \ru Кривая есть копия этой кривой ? \en Is a curve a copy of this curve? virtual bool SetEqual ( const MbSpaceItem & ); // \ru Сделать равным \en Make equal - virtual void Transform ( const MbMatrix3D &, MbRegTransform * = c3d_null ); // \ru Преобразовать элемент согласно матрице \en Transform element according to the matrix - virtual void Move ( const MbVector3D &, MbRegTransform * = c3d_null ); // \ru Сдвиг \en Translation - virtual void Rotate ( const MbAxis3D &, double angle, MbRegTransform * = c3d_null ); // \ru Повернуть вокруг оси \en Rotate around an axis + virtual void Transform ( const MbMatrix3D &, MbRegTransform * = NULL ); // \ru Преобразовать элемент согласно матрице \en Transform element according to the matrix + virtual void Move ( const MbVector3D &, MbRegTransform * = NULL ); // \ru Сдвиг \en Translation + virtual void Rotate ( const MbAxis3D &, double angle, MbRegTransform * = NULL ); // \ru Повернуть вокруг оси \en Rotate around an axis virtual void AddYourGabaritTo( MbCube & ) const; virtual void PrepareIntegralData( const bool forced ) const; // \ru Рассчитать временные (mutable) данные объекта. \en Calculate temporary (mutable) data of an object. @@ -110,16 +110,16 @@ public: virtual double Step ( double t, double sag ) const; ///< \ru Вычисление шага параметра по величине прогиба кривой \en Calculation of parameter step by value of sag of the curve virtual double DeviationStep( double t, double ang ) const; ///< \ru Вычисление шага параметра по углу отклонения касательной \en Calculation of parameter by the angle of tangent deviation - virtual void Inverse( MbRegTransform * iReg = c3d_null ); // \ru Изменить направление \en Change direction + virtual void Inverse( MbRegTransform * iReg = NULL ); // \ru Изменить направление \en Change direction virtual double GetMetricLength() const; // \ru Метрическая длина кривой \en Metric length of a curve virtual double GetLengthEvaluation() const; - virtual bool IsPlanar( double accuracy = METRIC_EPSILON ) const; // \ru Является ли кривая плоской \en Whether the curve is planar - virtual bool GetPlacement( MbPlacement3D & place, PlanarCheckParams params = PlanarCheckParams() ) const; // \ru Заполнить плейсемент, если кривая плоская \en Fill the placement if curve is planar + virtual bool IsPlanar() const; // \ru Является ли кривая плоской \en Whether the curve is planar + virtual bool GetPlacement( MbPlacement3D & place, VERSION version = Math::DefaultMathVersion() ) const; // \ru Заполнить плейсемент, если кривая плоская \en Fill the placement if curve is planar // \ru Дать плоскую кривую и плейсмент, если пространственная кривая плоская (после использования вызывать DeleteItem на двумерную кривую) \en Get a planar curve and placement, if the spatial curve is planar (after using the DeleteItem must be called on a three-dimensional curve) - virtual bool GetPlaneCurve ( MbCurve *& curve2d, MbPlacement3D & place, bool saveParams, PlanarCheckParams params = PlanarCheckParams() ) const; - virtual MbCurve * GetMap( const MbMatrix3D & into, MbRect1D * pRegion = c3d_null, - VERSION version = Math::DefaultMathVersion(), bool * coincParams = c3d_null ) const; // \ru Дать плоскую проекцию кривой \en Get a planar projection of curve + virtual bool GetPlaneCurve ( MbCurve *& curve2d, MbPlacement3D & place, bool saveParams, VERSION version = Math::DefaultMathVersion() ) const; + virtual MbCurve * GetMap( const MbMatrix3D & into, MbRect1D * pRegion = NULL, + VERSION version = Math::DefaultMathVersion(), bool * coincParams = NULL ) const; // \ru Дать плоскую проекцию кривой \en Get a planar projection of curve // \ru Определить количество разбиений для прохода в операциях. \en Define the number of splittings for one passage in operations. virtual size_t GetCount() const; virtual MbNurbs3D * NurbsCurve( const MbCurveIntoNurbsInfo & ) const; diff --git a/C3d/Include/cur_cone_spiral.h b/C3d/Include/cur_cone_spiral.h index 61cd5da..dc5b0c2 100644 --- a/C3d/Include/cur_cone_spiral.h +++ b/C3d/Include/cur_cone_spiral.h @@ -197,7 +197,7 @@ public: public: // \ru Общие функции математического объекта. \en The common functions of the mathematical object. virtual MbeSpaceType IsA() const; // \ru Получить тип. \en Get a type. - virtual MbSpaceItem & Duplicate( MbRegDuplicate * = c3d_null ) const; // \ru Создать копию. \en Create a copy. + virtual MbSpaceItem & Duplicate( MbRegDuplicate * = NULL ) const; // \ru Создать копию. \en Create a copy. virtual bool IsSame( const MbSpaceItem &, double accuracy = LENGTH_EPSILON ) const; virtual void GetProperties( MbProperties & ); // \ru Выдать свойства объекта. \en Get properties of the object. @@ -223,18 +223,18 @@ public: virtual double DeviationStep( double t, double angle ) const; // \ru Вычисление шага по углу отклонения нормали. \en Calculation of parameter step by the deviation angle. virtual double MetricStep ( double t, double length ) const; // \ru Вычисление шага параметра по длине. \en Calculation of parameter step by the given length. - virtual MbCurve * GetMap( const MbMatrix3D &, MbRect1D * pRgn = c3d_null, - VERSION version = Math::DefaultMathVersion(), bool * coincParams = c3d_null ) const; + virtual MbCurve * GetMap( const MbMatrix3D &, MbRect1D * pRgn = NULL, + VERSION version = Math::DefaultMathVersion(), bool * coincParams = NULL ) const; virtual MbCurve3D * Trimmed( double t1, double t2, int sense ) const; // \ru Создание усеченной кривой. \en Creation of a trimmed curve. - virtual void Inverse( MbRegTransform * = c3d_null ); // \ru Изменить направление. \en Change the direction. + virtual void Inverse( MbRegTransform * = NULL ); // \ru Изменить направление. \en Change the direction. virtual MbNurbs3D * NurbsCurve( const MbCurveIntoNurbsInfo & ) const; virtual double CalculateLength( double t1, double t2 ) const; // \ru Ближайшая проекция точки на спираль. \en The nearest point projection on the spiral. - virtual bool NearPointProjection( const MbCartPoint3D & p, double & t, bool ext, MbRect1D * tRange = c3d_null ) const; + virtual bool NearPointProjection( const MbCartPoint3D & p, double & t, bool ext, MbRect1D * tRange = NULL ) const; // \ru Частные функции спирали. \en Special functions for spiral. virtual bool SetStep( double s ); // \ru Изменить шаг. \en Change the step. diff --git a/C3d/Include/cur_contour.h b/C3d/Include/cur_contour.h index abeef2f..6d6e66c 100644 --- a/C3d/Include/cur_contour.h +++ b/C3d/Include/cur_contour.h @@ -102,13 +102,13 @@ public: virtual MbePlaneType IsA() const; // \ru Тип элемента \en A type of element virtual MbePlaneType Type() const; // \ru Тип элемента \en A type of element - virtual MbPlaneItem & Duplicate( MbRegDuplicate * = c3d_null ) const; // \ru Сделать копию элемента \en Create a copy of the element. + virtual MbPlaneItem & Duplicate( MbRegDuplicate * = NULL ) const; // \ru Сделать копию элемента \en Create a copy of the element. virtual bool IsSimilar ( const MbPlaneItem & ) const; // \ru Являются ли элементы подобными \en Whether the elements are similar. virtual bool SetEqual( const MbPlaneItem & ); // \ru Сделать элементы равными \en Make equal elements. virtual bool IsSame( const MbPlaneItem &, double accuracy = LENGTH_EPSILON ) const; // \ru Является ли кривая curve копией данной кривой ? \en Whether the curve "curve" is a copy of a given curve? - virtual void Transform( const MbMatrix &, MbRegTransform * ireg = c3d_null, const MbSurface * newSurface = c3d_null ); // \ru Преобразовать элемент согласно матрице \en Transform element according to the matrix. - virtual void Move( const MbVector &, MbRegTransform * = c3d_null, const MbSurface * newSurface = c3d_null ); // \ru Сдвиг \en Translation. - virtual void Rotate( const MbCartPoint &, const MbDirection & angle, MbRegTransform * = c3d_null, const MbSurface * newSurface = c3d_null ); // \ru Поворот \en Rotation. + virtual void Transform( const MbMatrix &, MbRegTransform * ireg = NULL, const MbSurface * newSurface = NULL ); // \ru Преобразовать элемент согласно матрице \en Transform element according to the matrix. + virtual void Move( const MbVector &, MbRegTransform * = NULL, const MbSurface * newSurface = NULL ); // \ru Сдвиг \en Translation. + virtual void Rotate( const MbCartPoint &, const MbDirection & angle, MbRegTransform * = NULL, const MbSurface * newSurface = NULL ); // \ru Поворот \en Rotation. /** \brief \ru Построить эквидистантную кривую, смещённую на заданное расстояние. \en Construct the equidistant curve which is shifted by the given value. \~ @@ -128,8 +128,8 @@ public: You can use the OffsetContour function instead this function. \~ \param[in] rad - \ru Величина эквидистантного смещения. \en Equidistant offset. \~ - \return \ru Возвращает эквидистантный контур, если получилось его построить, иначе - c3d_null. - \en Returns the equidistant curve if it's possible to build it, otherwise - c3d_null. \~ + \return \ru Возвращает эквидистантный контур, если получилось его построить, иначе - NULL. + \en Returns the equidistant curve if it's possible to build it, otherwise - NULL. \~ */ virtual MbCurve * Offset( double rad ) const; // \ru Смещение контура. \en Shift of a contour @@ -300,7 +300,7 @@ public: virtual double PointProjection( const MbCartPoint & ) const; // \ru Проекция точки на кривую \en Point projection on the curve virtual bool NearPointProjection( const MbCartPoint &, double xEpsilon, double yEpsilon, - double & t, bool ext, MbRect1D * tRange = c3d_null ) const; // \ru Проекция точки на кривую или её продолжение в области поиска проекции \en Point projection on the curve or its extension in the projection search area + double & t, bool ext, MbRect1D * tRange = NULL ) const; // \ru Проекция точки на кривую или её продолжение в области поиска проекции \en Point projection on the curve or its extension in the projection search area /** \brief \ru Параметрическое расстояние до ближайшей границы. \en Parametric distance to the nearest boundary. @@ -416,7 +416,7 @@ public: void SetSense( int sense ); // \ru Изменить направление обхода контура \en Change the traverse direction of the contour - virtual void Inverse( MbRegTransform * = c3d_null ); + virtual void Inverse( MbRegTransform * = NULL ); // \ru Согласовать параметризацию сегментов, если до инвертации она была согласованной. \en Agree on segment parameterization, if it was consistent before inversion. bool NormalizeReparametrization(); virtual size_t GetCount() const; // \ru Количество разбиений для прохода в операциях \en The number of partitions for passage in the operations @@ -464,7 +464,7 @@ public: \param[in] epsilon - \ru Погрешность вычисления. \en The accuracy of the calculation. \~ */ - virtual bool IsContinuousDerivative( bool & contLength, bool & contDirect, c3d::DoubleVector * params = c3d_null, double epsilon = EPSILON ) const; + virtual bool IsContinuousDerivative( bool & contLength, bool & contDirect, c3d::DoubleVector * params = NULL, double epsilon = EPSILON ) const; /** \brief \ru Устранить разрывы производных по длине в стыках сегментов. \en Eliminate the discontinuities of the derivatives of the length of the joints of the segments. @@ -778,13 +778,13 @@ void MbContour::GetCornerParams( Params & params ) const double pLength = 0.0; const MbCurve * segment = GetSegment( 0 ); - if ( segment != c3d_null ) + if ( segment != NULL ) pLength = segment->GetParamLength(); for ( size_t segInd = 1; segInd < segCount; ++segInd ) { params.push_back( pLength ); segment = GetSegment( segInd ); - if ( segment != c3d_null ) + if ( segment != NULL ) pLength += segment->GetParamLength(); } } diff --git a/C3d/Include/cur_contour3d.h b/C3d/Include/cur_contour3d.h index 08acdf2..9ea1a2f 100644 --- a/C3d/Include/cur_contour3d.h +++ b/C3d/Include/cur_contour3d.h @@ -92,13 +92,13 @@ public: virtual MbeSpaceType IsA() const; // \ru Тип элемента \en Type of element virtual MbeSpaceType Type() const; // \ru Групповой тип элемента \en Group element type - virtual MbSpaceItem & Duplicate( MbRegDuplicate * = c3d_null ) const; // \ru Сделать копию элемента \en Create a copy of the element + virtual MbSpaceItem & Duplicate( MbRegDuplicate * = NULL ) const; // \ru Сделать копию элемента \en Create a copy of the element virtual bool IsSame ( const MbSpaceItem & other, double accuracy = LENGTH_EPSILON ) const; // \ru Является ли объект копией \en Whether the object is a copy virtual bool SetEqual ( const MbSpaceItem & ); // \ru Сделать равным \en Make equal virtual bool IsSimilar( const MbSpaceItem & ) const; // \ru Являются ли объекты подобными \en Whether the objects are similar - virtual void Transform( const MbMatrix3D &, MbRegTransform * = c3d_null ); // \ru Преобразовать элемент согласно матрице \en Transform element according to the matrix - virtual void Move ( const MbVector3D &, MbRegTransform * = c3d_null ); // \ru Сдвиг \en Translation - virtual void Rotate ( const MbAxis3D &, double angle, MbRegTransform * = c3d_null ); // \ru Повернуть вокруг оси \en Rotate about an axis + virtual void Transform( const MbMatrix3D &, MbRegTransform * = NULL ); // \ru Преобразовать элемент согласно матрице \en Transform element according to the matrix + virtual void Move ( const MbVector3D &, MbRegTransform * = NULL ); // \ru Сдвиг \en Translation + virtual void Rotate ( const MbAxis3D &, double angle, MbRegTransform * = NULL ); // \ru Повернуть вокруг оси \en Rotate about an axis virtual double DistanceToPoint( const MbCartPoint3D & ) const; // \ru Расстояние до точки \en Distance to a point virtual void PrepareIntegralData( const bool forced ) const; // \ru Рассчитать временные (mutable) данные объекта. \en Calculate temporary (mutable) data of an object. @@ -172,7 +172,7 @@ public: virtual MbNurbs3D * NurbsCurve( const MbCurveIntoNurbsInfo & ) const; virtual MbCurve3D * Trimmed( double t1, double t2, int sense ) const; // \ru Создание усеченной кривой \en Creation of a trimmed curve // \ru Изменить направление \en Change direction - virtual void Inverse( MbRegTransform * iReg = c3d_null ); + virtual void Inverse( MbRegTransform * iReg = NULL ); // \ru Согласовать параметризацию сегментов, если до инвертации она была согласованной. \en Agree on segment parameterization, if it was consistent before inversion. bool NormalizeReparametrization(); /// \ru Подобные ли кривые для объединения (слива). \en Whether the curves to union (joining) are similar. @@ -180,7 +180,7 @@ public: // \ru Все проекции точки на кривую \en All point projections on the curve // \ru Ближайшая проекция точки на кривую \en The nearest point projection to the curve - virtual bool NearPointProjection( const MbCartPoint3D &, double & t, bool ext, MbRect1D * tRange = c3d_null ) const; + virtual bool NearPointProjection( const MbCartPoint3D &, double & t, bool ext, MbRect1D * tRange = NULL ) const; virtual double CalculateMetricLength() const; // \ru Посчитать метрическую длину \en Calculate the metric length virtual double CalculateLength( double t1, double t2 ) const; @@ -190,18 +190,18 @@ public: virtual void CalculateLocalGabarit( const MbMatrix3D &, MbCube & ) const; // \ru Рассчитать габарит относительно л.с.к. \en Calculate bounding box relative to the local coordinate system. virtual void CalculateGabarit( MbCube & ) const; // \ru Вычислить габарит кривой \en Calculate the bounding box of curve - virtual MbCurve * GetMap( const MbMatrix3D &, MbRect1D * pRgn = c3d_null, - VERSION version = Math::DefaultMathVersion(), bool * coincParams = c3d_null ) const; // \ru Дать плоскую проекцию кривой \en Get a planar projection of curve + virtual MbCurve * GetMap( const MbMatrix3D &, MbRect1D * pRgn = NULL, + VERSION version = Math::DefaultMathVersion(), bool * coincParams = NULL ) const; // \ru Дать плоскую проекцию кривой \en Get a planar projection of curve virtual MbCurve * GetProjection( const MbPlacement3D & place, VERSION version ) const; // \ru Дать проекцию ребра на плоскость. \en Get the edge projection onto plane. virtual size_t GetCount() const; virtual void ChangeCarrier( const MbSpaceItem & item, MbSpaceItem & init ); // \ru Изменение носителя \en Changing of carrier virtual double GetRadius() const; // \ru Дать физический радиус объекта или ноль, если это невозможно. \en Get the physical radius of the object or null if it impossible. - virtual bool IsPlanar ( double accuracy = METRIC_EPSILON ) const; // \ru Является ли кривая плоской \en Whether the curve is planar? - virtual bool GetPlacement( MbPlacement3D & place, PlanarCheckParams params = PlanarCheckParams() ) const; // \ru Заполнить плейсемент, ести кривая плоская \en Fill the placement if curve is planar + virtual bool IsPlanar () const; // \ru Является ли кривая плоской \en Whether the curve is planar? + virtual bool GetPlacement( MbPlacement3D & place, VERSION version = Math::DefaultMathVersion() ) const; // \ru Заполнить плейсемент, ести кривая плоская \en Fill the placement if curve is planar // \ru Дать плоскую кривую и плейсмент, если пространственная кривая плоская (после использования вызывать DeleteItem на двумерную кривую) \en Give a planar curve and placement, if the spatial curve is planar (after using the DeleteItem must be called on a three-dimensional curve) - virtual bool GetPlaneCurve( MbCurve *& curve2d, MbPlacement3D & place, bool saveParams, PlanarCheckParams params = PlanarCheckParams() ) const; + virtual bool GetPlaneCurve( MbCurve *& curve2d, MbPlacement3D & place, bool saveParams, VERSION version = Math::DefaultMathVersion() ) const; /// \ru Дать поверхностную кривую, если пространственная кривая поверхностная (после использования вызывать DeleteItem на аргументы). \en Get surface curve if the space curve is surface (after the using call DeleteItem for arguments) virtual bool GetSurfaceCurve( MbCurve *& curve2d, MbSurface *& surface, VERSION version = Math::DefaultMathVersion() ) const; virtual void GetWeightCentre( MbCartPoint3D & ) const; @@ -229,7 +229,7 @@ public: \param[in] epsilon - \ru Погрешность вычисления. \en The accuracy of the calculation. \~ */ - virtual bool IsContinuousDerivative( bool & contLength, bool & contDirect, c3d::DoubleVector * params = c3d_null, double epsilon = EPSILON ) const; + virtual bool IsContinuousDerivative( bool & contLength, bool & contDirect, c3d::DoubleVector * params = NULL, double epsilon = EPSILON ) const; /** \brief \ru Устранить разрывы производных по длине в стыках сегментов. \en Eliminate the discontinuities of the derivatives of the length of the joints of the segments. @@ -403,11 +403,11 @@ MbContour3D::MbContour3D( const CurvesVector & initSegments, bool sameCurves ) const size_t count = initSegments.size(); if ( count > 0 ) { - MbRegDuplicate * ireg = c3d_null; + MbRegDuplicate * ireg = NULL; MbAutoRegDuplicate autoreg( ireg ); for ( size_t i = 0; i < count; ++i ) { const MbCurve3D * initSegment = initSegments[i]; - if ( initSegment != c3d_null ) { + if ( initSegment != NULL ) { C3D_ASSERT( initSegment->GetSubstrate().Type() != st_Contour3D ); // \ru Использование контура не по назначению. \en Wrong contour use as contours container. MbCurve3D * segment = sameCurves ? const_cast(initSegment) : static_cast(&initSegment->Duplicate( ireg )); segments.push_back( segment ); @@ -430,7 +430,7 @@ bool MbContour3D::Init( const CurvesVector & initSegments, bool sameCurves, bool ::AddRefItems( initSegments ); DeleteSegments(); for ( size_t i = 0; i < count; ++i ) { - if ( initSegments[i] != c3d_null ) { + if ( initSegments[i] != NULL ) { C3D_ASSERT( initSegments[i]->GetSubstrate().Type() != st_Contour3D ); // \ru Использование контура не по назначению. \en Wrong contour use as contours container. MbCurve3D * initSegment = &const_cast( *initSegments[i] ); MbCurve3D * segment = sameCurves ? initSegment : static_cast(&initSegment->Duplicate()); @@ -481,7 +481,7 @@ void MbContour3D::GetSegments( CurvesVector & curves ) const SPtr curve; for ( size_t k = 0; k < segmentsCnt; ++k ) { curve = const_cast(segments[k]); - if ( curve != c3d_null ) { + if ( curve != NULL ) { curves.push_back( curve ); ::DetachItem( curve ); } diff --git a/C3d/Include/cur_contour_on_plane.h b/C3d/Include/cur_contour_on_plane.h index dfa9009..ed15544 100644 --- a/C3d/Include/cur_contour_on_plane.h +++ b/C3d/Include/cur_contour_on_plane.h @@ -63,7 +63,7 @@ public : // \ru Общие функции математического объекта. \en The common functions of the mathematical object. virtual MbeSpaceType IsA() const; // \ru Дать тип элемента. \en Get a type of the element. - virtual MbSpaceItem & Duplicate( MbRegDuplicate * = c3d_null ) const ; // \ru Сделать копию элемента. \en Create a copy of the element. + virtual MbSpaceItem & Duplicate( MbRegDuplicate * = NULL ) const ; // \ru Сделать копию элемента. \en Create a copy of the element. virtual MbContourOnSurface & CurvesDuplicate() const; // \ru Сделать копию со старой подложкой. \en Make a copy with old substrate. virtual bool IsSame( const MbSpaceItem &, double accuracy = LENGTH_EPSILON ) const; // \ru Определить, является ли копией данного объекта? \en Determine whether the object is copy of a given object. @@ -98,11 +98,11 @@ public : virtual bool ChangeSurface( const MbSurface & newsurf ); // \ru Заменить поверхность контура. \en Replace the surface of contour. virtual void ChangeCarrier( const MbSpaceItem & item, MbSpaceItem & init ); // \ru Изменить носителя. \en Change the carrier. - virtual bool IsPlanar( double accuracy = METRIC_EPSILON ) const; // \ru Является ли кривая плоской? \en Whether the curve is planar? + virtual bool IsPlanar() const; // \ru Является ли кривая плоской? \en Whether the curve is planar? // \ru Дать плоскую кривую и плейсмент, если пространственная кривая плоская (после использования вызывать DeleteItem на двумерную кривую). \en Get planar curve and placement if the space curve is planar (after the using call DeleteItem for two-dimensional curves) - virtual bool GetPlaneCurve( MbCurve *& curve2d, MbPlacement3D & place3d, bool saveParams, PlanarCheckParams params = PlanarCheckParams() ) const; + virtual bool GetPlaneCurve( MbCurve *& curve2d, MbPlacement3D & place3d, bool saveParams, VERSION version = Math::DefaultMathVersion() ) const; // \ru Заполнить плейсмент, если кривая плоская. \en Fill the placement if curve is planar. - virtual bool GetPlacement( MbPlacement3D & place, PlanarCheckParams params = PlanarCheckParams() ) const; + virtual bool GetPlacement( MbPlacement3D & place, VERSION version = Math::DefaultMathVersion() ) const; virtual double GetRadius() const; // \ru Дать физический радиус объекта или ноль, если это невозможно. \en Get the physical radius of the object or null if it impossible. virtual bool GetCircleAxis( MbAxis3D & ) const; // \ru Дать ось кривой. \en Get the curve axis. @@ -112,8 +112,8 @@ public : virtual bool IsStraight( bool ignoreParams = false ) const; // \ru Определить, является ли линия прямолинейной? \en Determine whether the line is straight. - virtual MbCurve * GetMap( const MbMatrix3D &, MbRect1D *pRgn = c3d_null, - VERSION version = Math::DefaultMathVersion(), bool * coincParams = c3d_null ) const; // \ru Дать плоскую проекцию кривой. \en Get a planar projection of curve. + virtual MbCurve * GetMap( const MbMatrix3D &, MbRect1D *pRgn = NULL, + VERSION version = Math::DefaultMathVersion(), bool * coincParams = NULL ) const; // \ru Дать плоскую проекцию кривой. \en Get a planar projection of curve. virtual void GetPointsByEvenLengthDelta( size_t n, std::vector & pnts ) const; // \ru Выдать n точек кривой с равными интервалами по длине дуги. \en Get n points of curve with equal intervals along the length of the arc. @@ -129,7 +129,7 @@ public : /// \ru Заменить локальную систему координат плоскости. \en Replace the local coordinate system of a plane. void SetPlacement( const MbPlacement3D & ); /// \ru Инвертировать нормаль плоскости. \en Invert the normal of plane. - void InvertNormal( MbRegTransform * = c3d_null ); + void InvertNormal( MbRegTransform * = NULL ); private: void operator = ( const MbContourOnPlane & ); // \ru Не реализовано !!! \en Not implemented !!! diff --git a/C3d/Include/cur_contour_on_surface.h b/C3d/Include/cur_contour_on_surface.h index bf11c49..8c969f2 100644 --- a/C3d/Include/cur_contour_on_surface.h +++ b/C3d/Include/cur_contour_on_surface.h @@ -44,8 +44,8 @@ class MbSegmentsSearchTree; class MATH_CLASS MbContourOnSurface : public MbCurve3D { protected : - MbSurface * surface; ///< \ru Указатель на базовую поверхность (всегда не c3d_null). \en The pointer to the base surface (this value is never c3d_null). - MbContour * contour; ///< \ru Указатель на 2D-контур в плоскости параметров поверхности (всегда не c3d_null). \en The pointer to 2D-contour in the plane of the surface parameters (this value is never c3d_null). + MbSurface * surface; ///< \ru Указатель на базовую поверхность (всегда не NULL). \en The pointer to the base surface (this value is never NULL). + MbContour * contour; ///< \ru Указатель на 2D-контур в плоскости параметров поверхности (всегда не NULL). \en The pointer to 2D-contour in the plane of the surface parameters (this value is never NULL). mutable double area; ///< \ru Площадь 2D-контура со знаком. \en The area of 2D-contour with sign. mutable MbCube cube; ///< \ru Габаритный куб. \en Bounding box. mutable double metricLength; ///< \ru Метрическая длина. \en The metric length. @@ -99,15 +99,15 @@ public : virtual MbeSpaceType IsA() const; // \ru Дать тип элемента. \en Get a type of the element. virtual MbeSpaceType Type() const; // \ru Дать тип элемента. \en Get a type of the element. - virtual MbSpaceItem & Duplicate( MbRegDuplicate * = c3d_null ) const; // \ru Сделать копию элемента. \en Create a copy of the element. + virtual MbSpaceItem & Duplicate( MbRegDuplicate * = NULL ) const; // \ru Сделать копию элемента. \en Create a copy of the element. /// \ru Сделать копию на той же поверхности. \en Create a copy on the same surface. virtual MbContourOnSurface & CurvesDuplicate() const; virtual bool IsSame ( const MbSpaceItem & other, double accuracy = LENGTH_EPSILON ) const; // \ru Определить, является ли копией данного объекта? \en Determine whether the object is copy of a given object. virtual bool SetEqual ( const MbSpaceItem & ); // \ru Сделать равным. \en Make equal. virtual bool IsSimilar( const MbSpaceItem & ) const; // \ru Определить, являются ли объекты подобными. \en Determine whether the objects are similar. - virtual void Transform( const MbMatrix3D &, MbRegTransform * = c3d_null ); // \ru Преобразовать элемент согласно матрице. \en Transform element according to the matrix. - virtual void Move ( const MbVector3D &, MbRegTransform * = c3d_null ); // \ru Сдвинуть вдоль вектора. \en Move along a vector. - virtual void Rotate ( const MbAxis3D &, double angle, MbRegTransform * = c3d_null ); // \ru Повернуть вокруг оси. \en Rotate around an axis. + virtual void Transform( const MbMatrix3D &, MbRegTransform * = NULL ); // \ru Преобразовать элемент согласно матрице. \en Transform element according to the matrix. + virtual void Move ( const MbVector3D &, MbRegTransform * = NULL ); // \ru Сдвинуть вдоль вектора. \en Move along a vector. + virtual void Rotate ( const MbAxis3D &, double angle, MbRegTransform * = NULL ); // \ru Повернуть вокруг оси. \en Rotate around an axis. virtual double DistanceToPoint( const MbCartPoint3D & ) const; // \ru Вычислить расстояние до точки. \en Calculate the distance to a point. virtual void AddYourGabaritTo( MbCube &r ) const; // \ru Добавить габарит в куб. \en Add bounding box into a cube. virtual void CalculateMesh( const MbStepData & stepData, const MbFormNote & note, MbMesh & mesh ) const; // \ru Построить полигональную копию mesh. \en Build polygonal copy mesh. @@ -140,7 +140,7 @@ public : MbCartPoint3D & pnt, MbVector3D & fir, MbVector3D * sec, MbVector3D * thir ) const; /// \ru Изменить ориентацию контура относительно поверхности. \en Change the contour orientation relative to a surface. - virtual void Inverse( MbRegTransform * iReg = c3d_null ); + virtual void Inverse( MbRegTransform * iReg = NULL ); virtual MbNurbs3D * NurbsCurve( const MbCurveIntoNurbsInfo & ) const; // \ru Установить параметры NURBS. \en Set the NURBS parameters. @@ -167,25 +167,25 @@ public : virtual bool ChangeSurface( const MbSurface & ); /// \ru Заменить двумерный контур. \en Replace the two-dimensional contour. void ChangeContour( MbContour & ); - virtual bool IsPlanar( double accuracy = METRIC_EPSILON ) const; // \ru Определить, является ли кривая плоской. \en Determine whether the curve is planar. + virtual bool IsPlanar() const; // \ru Определить, является ли кривая плоской. \en Determine whether the curve is planar. virtual bool IsSmoothConnected( double angleEps ) const; // \ru Определить, является ли контур гладким. \en Define whether the contour is smooth. // \ru Дать плоскую кривую и плейсмент, если пространственная кривая плоская (после использования вызывать DeleteItem на двумерную кривую). \en Get planar curve and placement if the space curve is planar (after the using call DeleteItem for two-dimensional curves) - virtual bool GetPlaneCurve( MbCurve *& curve2d, MbPlacement3D & place3d, bool saveParams, PlanarCheckParams params = PlanarCheckParams() ) const; + virtual bool GetPlaneCurve( MbCurve *& curve2d, MbPlacement3D & place3d, bool saveParams, VERSION version = Math::DefaultMathVersion() ) const; // \ru Дать поверхностную кривую, если пространственная кривая поверхностная (после использования вызывать DeleteItem на аргументы). \en Get surface curve if the space curve is surface (after the using call DeleteItem for arguments) virtual bool GetSurfaceCurve( MbCurve *& curve2d, MbSurface *& surface, VERSION version = Math::DefaultMathVersion() ) const; // \ru Заполнить плейсмент, если кривая плоская. \en Fill the placement if curve is planar. - virtual bool GetPlacement( MbPlacement3D & place, PlanarCheckParams params = PlanarCheckParams() ) const; + virtual bool GetPlacement( MbPlacement3D & place, VERSION version = Math::DefaultMathVersion() ) const; - virtual bool NearPointProjection( const MbCartPoint3D &, double & t, bool ext, MbRect1D * tRange = c3d_null ) const; // \ru Вычислить ближайшую проекцию точки на кривую. \en Calculate the nearest projection of the point on the curve. + virtual bool NearPointProjection( const MbCartPoint3D &, double & t, bool ext, MbRect1D * tRange = NULL ) const; // \ru Вычислить ближайшую проекцию точки на кривую. \en Calculate the nearest projection of the point on the curve. virtual bool IsStraight( bool ignoreParams = false ) const; // \ru Определить, является ли линия прямолинейной. \en Determine whether the line is straight. - virtual MbCurve * GetMap( const MbMatrix3D &, MbRect1D * pRgn = c3d_null, - VERSION version = Math::DefaultMathVersion(), bool * coincParams = c3d_null ) const; // \ru Дать плоскую проекцию кривой. \en Get a planar projection of curve. + virtual MbCurve * GetMap( const MbMatrix3D &, MbRect1D * pRgn = NULL, + VERSION version = Math::DefaultMathVersion(), bool * coincParams = NULL ) const; // \ru Дать плоскую проекцию кривой. \en Get a planar projection of curve. /// \ru Найти все особые точки функции кривизны кривой. /// \en Find all the special points of the curvature function of the curve. virtual void GetCurvatureSpecialPoints( std::vector & points ) const; - virtual bool IsContinuousDerivative( bool & contLength, bool & contDirect, c3d::DoubleVector * params = c3d_null, double epsilon = EPSILON ) const; // \ru Непрерывна ли первая производная? \en Have the first derivative the continuous? + virtual bool IsContinuousDerivative( bool & contLength, bool & contDirect, c3d::DoubleVector * params = NULL, double epsilon = EPSILON ) const; // \ru Непрерывна ли первая производная? \en Have the first derivative the continuous? // \ru Устранить разрывы первых производных по длине. \en Eliminate the discontinuities of the first derivative at length. virtual bool SetContinuousDerivativeLength( VERSION version, double epsilon = EPSILON ); @@ -211,9 +211,6 @@ public : /// \ru Вычислить нормали к поверхности по параметру кривой. \en Calculate normals to the surface in the curve parameter. void SurfaceNormal( double t, MbVector3D & n ) const; - /// \ru Кривизна поверхности в поперечном направлении к вектору tau. \en The surface curvature in the transverse direction to the vector tau. - double SurfaceTransversalCurvature( double t, const MbVector3D & tau ) const; - /** \brief \ru Найти сегмент контура. \en Find a contour segment. \~ \details \ru Найти сегмент контура по параметру контура. \n diff --git a/C3d/Include/cur_contour_with_breaks.h b/C3d/Include/cur_contour_with_breaks.h index 173d886..456155e 100644 --- a/C3d/Include/cur_contour_with_breaks.h +++ b/C3d/Include/cur_contour_with_breaks.h @@ -84,10 +84,10 @@ public : \en \name Common functions of a geometric object. \{ */ virtual MbePlaneType IsA() const; // \ru Тип элемента. \en A type of element. - virtual void Transform( const MbMatrix & matr, MbRegTransform * ireg = c3d_null, const MbSurface * newSurface = c3d_null ); // \ru Преобразовать элемент согласно матрице. \en Transform element according to the matrix. - virtual void Move( const MbVector & to, MbRegTransform * = c3d_null, const MbSurface * newSurface = c3d_null ); // \ru Сдвиг. \en Move. - virtual void Rotate( const MbCartPoint & pnt, const MbDirection & angle, MbRegTransform * = c3d_null, const MbSurface * newSurface = c3d_null ); // \ru Поворот. \en Rotation. - virtual MbPlaneItem & Duplicate( MbRegDuplicate * = c3d_null ) const; // \ru Сделать копию элемента. \en Create a copy of the element. + virtual void Transform( const MbMatrix & matr, MbRegTransform * ireg = NULL, const MbSurface * newSurface = NULL ); // \ru Преобразовать элемент согласно матрице. \en Transform element according to the matrix. + virtual void Move( const MbVector & to, MbRegTransform * = NULL, const MbSurface * newSurface = NULL ); // \ru Сдвиг. \en Move. + virtual void Rotate( const MbCartPoint & pnt, const MbDirection & angle, MbRegTransform * = NULL, const MbSurface * newSurface = NULL ); // \ru Поворот. \en Rotation. + virtual MbPlaneItem & Duplicate( MbRegDuplicate * = NULL ) const; // \ru Сделать копию элемента. \en Create a copy of the element. /** \} */ /**\ru \name Функции доступа к данным: разрывы. \en \name Functions for access to data: breaks. @@ -160,11 +160,11 @@ public : \en Invisible part by the number of break. \~ \details \ru Невидимая часть по номеру разрыва.\n Номер проверяется на корректность. - В случае, если номер не меньше числа разрывов, функция вернет c3d_null.\n + В случае, если номер не меньше числа разрывов, функция вернет NULL.\n После использования полученный контур нужно удалить. \en Invisible part by the number of break. \n A number Is checked for correctness. - If the number is not less than the number of breaks, the function returns c3d_null. \n + If the number is not less than the number of breaks, the function returns NULL. \n The resulting contour is to be deleted after use. \~ \param[in] i - \ru Номер разрыва, должен быть меньше количества видимых частей. \en The number of break must be less than the number of visible parts. \~ diff --git a/C3d/Include/cur_cosinusoid.h b/C3d/Include/cur_cosinusoid.h index 5c745cd..b9fb77b 100644 --- a/C3d/Include/cur_cosinusoid.h +++ b/C3d/Include/cur_cosinusoid.h @@ -90,11 +90,11 @@ public: virtual MbePlaneType IsA() const; // \ru Тип элемента \en Type of element virtual bool SetEqual ( const MbPlaneItem & ); // \ru Сделать элементы равными \en Make the elements equal virtual bool IsBounded () const { return true; } // \ru Ограниченность кривой \en Bounded curve - virtual void Transform ( const MbMatrix & matr, MbRegTransform * ireg = c3d_null, const MbSurface * newSurface = c3d_null ); // \ru Преобразовать элемент согласно матрице \en Transform element according to the matrix - virtual void Move ( const MbVector & to, MbRegTransform * = c3d_null, const MbSurface * newSurface = c3d_null ); // \ru Сдвиг \en Translation - virtual void Rotate ( const MbCartPoint & pnt, const MbDirection & angle, MbRegTransform * = c3d_null, const MbSurface * newSurface = c3d_null ); // \ru Поворот \en Rotation + virtual void Transform ( const MbMatrix & matr, MbRegTransform * ireg = NULL, const MbSurface * newSurface = NULL ); // \ru Преобразовать элемент согласно матрице \en Transform element according to the matrix + virtual void Move ( const MbVector & to, MbRegTransform * = NULL, const MbSurface * newSurface = NULL ); // \ru Сдвиг \en Translation + virtual void Rotate ( const MbCartPoint & pnt, const MbDirection & angle, MbRegTransform * = NULL, const MbSurface * newSurface = NULL ); // \ru Поворот \en Rotation virtual bool IsSame ( const MbPlaneItem & other, double accuracy = LENGTH_EPSILON ) const; - virtual MbPlaneItem & Duplicate ( MbRegDuplicate * = c3d_null ) const; // \ru Сделать копию элемента \en Create a copy of the element + virtual MbPlaneItem & Duplicate ( MbRegDuplicate * = NULL ) const; // \ru Сделать копию элемента \en Create a copy of the element virtual void Refresh(); // \ru Сбросить все временные данные \en Reset all temporary data virtual void PrepareIntegralData( const bool forced ) const; // \ru Рассчитать временные (mutable) данные объекта. \en Calculate temporary (mutable) data of an object. @@ -124,7 +124,7 @@ public: virtual bool HasLength ( double & length ) const; virtual double GetMetricLength() const; // \ru Метрическая длина \en The metric length - virtual void Inverse( MbRegTransform * iReg = c3d_null ); // \ru Изменение направления кривой на противоположное \en Change to the opposite direction of a curve + virtual void Inverse( MbRegTransform * iReg = NULL ); // \ru Изменение направления кривой на противоположное \en Change to the opposite direction of a curve virtual MbNurbs * NurbsCurve( const MbCurveIntoNurbsInfo & ) const; @@ -140,7 +140,7 @@ public: virtual double PointProjection( const MbCartPoint & pnt ) const; // \ru Проекция точки на кривую \en Point projection on the curve virtual bool NearPointProjection( const MbCartPoint & pnt, double xEpsilon, double yEpsilon, - double & t, bool ext, MbRect1D * tRange = c3d_null ) const; // \ru Проекция точки на кривую или её продолжение в области поиска проекции \en Point projection on the curve or its extension in the projection search area + double & t, bool ext, MbRect1D * tRange = NULL ) const; // \ru Проекция точки на кривую или её продолжение в области поиска проекции \en Point projection on the curve or its extension in the projection search area virtual void GetProperties( MbProperties & properties ); // \ru Выдать свойства объекта \en Get properties of the object virtual void SetProperties( const MbProperties & properties ); // \ru Записать свойства объекта \en Set properties of the object @@ -173,10 +173,10 @@ public: void Init1( CosinusoidPar & par, MbCartPoint & p1, MbCartPoint & p2, double & len, double & angle ); void Init2( CosinusoidPar & par, const MbCartPoint & p1, MbCartPoint & p2, const double & len, double & angle ); void Init3( CosinusoidPar & par, const MbCartPoint & p1, MbCartPoint & p2, double & len, const double & angle, - const DiskreteLengthData * = c3d_null ); + const DiskreteLengthData * = NULL ); void Init4( CosinusoidPar & par, MbCartPoint & p1, const MbCartPoint & p2, const double & len, double & angle ); void Init5( CosinusoidPar & par, MbCartPoint & p1, const MbCartPoint & p2, double & len, const double & angle, - const DiskreteLengthData * = c3d_null ); + const DiskreteLengthData * = NULL ); void Init6( CosinusoidPar & par, const MbCartPoint & p1, MbCartPoint & p2, const double & len, const double & angle ); void Init7( CosinusoidPar & par, MbCartPoint & p1, const MbCartPoint & p2, const double & len, const double & angle ); void Init8( CosinusoidPar & par, MbCartPoint & p1, MbCartPoint & p2, double & len, double & angle, diff --git a/C3d/Include/cur_crooked_spiral.h b/C3d/Include/cur_crooked_spiral.h index e45da06..a01898f 100644 --- a/C3d/Include/cur_crooked_spiral.h +++ b/C3d/Include/cur_crooked_spiral.h @@ -57,7 +57,7 @@ class MATH_CLASS MbCrookedSpiral : public MbSpiral { typedef std::vector CurveParams; protected: - MbCurve * curve; ///< \ru Кривая, задающая ось спирали, (не может быть c3d_null). \en The curve which determines the axis of the spiral, (can not be c3d_null). + MbCurve * curve; ///< \ru Кривая, задающая ось спирали, (не может быть NULL). \en The curve which determines the axis of the spiral, (can not be NULL). double radius; ///< \ru Радиус спирали. \en A spiral radius. double wMin; ///< \ru Минимальное значение параметра curve. \en Minimal value of parameter "curve". double wMax; ///< \ru Максимальное значение параметра curve. \en Maximal value of parameter "curve". @@ -84,7 +84,7 @@ public : // \ru Общие функции математического объекта \en Common functions of the mathematical object virtual MbeSpaceType IsA() const; // \ru Тип элемента \en Type of element - virtual MbSpaceItem & Duplicate( MbRegDuplicate * = c3d_null ) const; // \ru Сделать копию элемента \en Create a copy of the element + virtual MbSpaceItem & Duplicate( MbRegDuplicate * = NULL ) const; // \ru Сделать копию элемента \en Create a copy of the element virtual bool IsSame( const MbSpaceItem & other, double accuracy = LENGTH_EPSILON ) const; virtual bool SetEqual( const MbSpaceItem & init ); // \ru Сделать равным \en Make equal @@ -108,7 +108,7 @@ public : virtual void Explore( double & t, bool ext, MbCartPoint3D & pnt, MbVector3D & fir, MbVector3D * sec, MbVector3D * thir ) const; - virtual void Inverse( MbRegTransform * iReg = c3d_null ); // \ru Изменить направление \en Change direction + virtual void Inverse( MbRegTransform * iReg = NULL ); // \ru Изменить направление \en Change direction virtual MbCurve3D * Trimmed( double t1, double t2, int sense ) const; // \ru Создание усеченной кривой \en Creation of a trimmed curve virtual double CalculateLength( double t1, double t2 ) const; diff --git a/C3d/Include/cur_cubic_spline.h b/C3d/Include/cur_cubic_spline.h index ee4979c..29a8393 100644 --- a/C3d/Include/cur_cubic_spline.h +++ b/C3d/Include/cur_cubic_spline.h @@ -195,10 +195,10 @@ public : virtual MbePlaneType IsA () const; // \ru Тип элемента \en Type of element virtual bool SetEqual ( const MbPlaneItem & ); // \ru Сделать элементы равными \en Make equal elements virtual bool IsSame ( const MbPlaneItem &, double accuracy = LENGTH_EPSILON ) const; // \ru Является ли кривая curve копией данной кривой \en Whether the curve "curve" is a copy of a given curve - virtual void Transform( const MbMatrix &, MbRegTransform * ireg = c3d_null, const MbSurface * newSurface = c3d_null ); // \ru Преобразовать элемент согласно матрице \en Transform element according to the matrix - virtual void Move ( const MbVector &, MbRegTransform * = c3d_null, const MbSurface * newSurface = c3d_null ); // \ru Сдвиг \en Translation - virtual void Rotate ( const MbCartPoint &, const MbDirection &, MbRegTransform * = c3d_null, const MbSurface * newSurface = c3d_null ); // \ru Поворот \en Rotation - virtual MbPlaneItem & Duplicate( MbRegDuplicate * = c3d_null ) const; // \ru Сделать копию элемента \en Create a copy of the element + virtual void Transform( const MbMatrix &, MbRegTransform * ireg = NULL, const MbSurface * newSurface = NULL ); // \ru Преобразовать элемент согласно матрице \en Transform element according to the matrix + virtual void Move ( const MbVector &, MbRegTransform * = NULL, const MbSurface * newSurface = NULL ); // \ru Сдвиг \en Translation + virtual void Rotate ( const MbCartPoint &, const MbDirection &, MbRegTransform * = NULL, const MbSurface * newSurface = NULL ); // \ru Поворот \en Rotation + virtual MbPlaneItem & Duplicate( MbRegDuplicate * = NULL ) const; // \ru Сделать копию элемента \en Create a copy of the element /** \} */ /** \ru \name Функции описания области определения кривой. @@ -246,7 +246,7 @@ public : \{ */ virtual void Rebuild (); // \ru Пересчитать Безье кривую \en Recalculate Bezier curve virtual void SetClosed( bool cls ); // \ru Установить признак замкнутости. \en Set attribute of closedness. - virtual void Inverse ( MbRegTransform * iReg = c3d_null ); // \ru Изменение направления кривой на противоположное \en Change to the opposite direction of a curve + virtual void Inverse ( MbRegTransform * iReg = NULL ); // \ru Изменение направления кривой на противоположное \en Change to the opposite direction of a curve /** \brief \ru Построить усеченную кривую. \en Construct a trimmed curve. \~ diff --git a/C3d/Include/cur_cubic_spline3d.h b/C3d/Include/cur_cubic_spline3d.h index 6954681..5253207 100644 --- a/C3d/Include/cur_cubic_spline3d.h +++ b/C3d/Include/cur_cubic_spline3d.h @@ -247,13 +247,13 @@ public: void Init( const MbCubicSpline &, const MbPlacement3D & ); // \ru Общие функции математического объекта \en Common functions of the mathematical object - virtual MbSpaceItem & Duplicate( MbRegDuplicate * = c3d_null ) const; // \ru Сделать копию элемента \en Create a copy of the element + virtual MbSpaceItem & Duplicate( MbRegDuplicate * = NULL ) const; // \ru Сделать копию элемента \en Create a copy of the element virtual MbeSpaceType IsA() const; // \ru Тип элемента \en Type of element virtual bool IsSame ( const MbSpaceItem & other, double accuracy = LENGTH_EPSILON ) const; virtual bool SetEqual ( const MbSpaceItem & ); // \ru Сделать равным \en Make equal - virtual void Transform( const MbMatrix3D &, MbRegTransform * = c3d_null ); // \ru Преобразовать элемент согласно матрице \en Transform element according to the matrix - virtual void Move ( const MbVector3D &, MbRegTransform * = c3d_null ); // \ru Сдвиг \en Translation - virtual void Rotate ( const MbAxis3D &, double angle, MbRegTransform * = c3d_null ); // \ru Повернуть вокруг оси \en Rotate about an axis + virtual void Transform( const MbMatrix3D &, MbRegTransform * = NULL ); // \ru Преобразовать элемент согласно матрице \en Transform element according to the matrix + virtual void Move ( const MbVector3D &, MbRegTransform * = NULL ); // \ru Сдвиг \en Translation + virtual void Rotate ( const MbAxis3D &, double angle, MbRegTransform * = NULL ); // \ru Повернуть вокруг оси \en Rotate about an axis virtual void GetProperties( MbProperties & ); // \ru Выдать свойства объекта \en Get properties of the object virtual void SetProperties( const MbProperties & ); // \ru Записать свойства объекта \en Set properties of the object @@ -277,19 +277,19 @@ public: virtual MbNurbs3D * NurbsCurve( const MbCurveIntoNurbsInfo & ) const; virtual MbCurve3D * NurbsCurve( const MbNurbsParameters & ) const; - virtual void Inverse ( MbRegTransform * iReg = c3d_null ); // \ru Изменить направление \en Change direction + virtual void Inverse ( MbRegTransform * iReg = NULL ); // \ru Изменить направление \en Change direction virtual size_t GetCount() const; virtual void Rebuild (); // \ru Перестроить кривую \en Rebuild the curve virtual void SetClosed( bool cls ); // \ru Установить признак замкнутости. \en Set attribute of closedness. virtual bool IsDegenerate( double eps = METRIC_PRECISION ) const; virtual MbCurve3D * TrimmBreak( double t1, double t2, int sense ) const; // \ru Создать усеченную кривую \en Create the trimmed curve - virtual MbCurve * GetMap( const MbMatrix3D &, MbRect1D * pRgn = c3d_null, - VERSION version = Math::DefaultMathVersion(), bool * coincParams = c3d_null ) const; + virtual MbCurve * GetMap( const MbMatrix3D &, MbRect1D * pRgn = NULL, + VERSION version = Math::DefaultMathVersion(), bool * coincParams = NULL ) const; - virtual bool IsPlanar ( double accuracy = METRIC_EPSILON ) const; // \ru Является ли кривая плоской \en Whether a curve is planar - virtual bool GetPlacement( MbPlacement3D & place, PlanarCheckParams params = PlanarCheckParams() ) const; // \ru Заполнить плейсемент, ести кривая плоская \en Fill the placement if curve is planar + virtual bool IsPlanar () const; // \ru Является ли кривая плоской \en Whether a curve is planar + virtual bool GetPlacement( MbPlacement3D & place, VERSION version = Math::DefaultMathVersion() ) const; // \ru Заполнить плейсемент, ести кривая плоская \en Fill the placement if curve is planar // \ru Дать плоскую кривую и плейсмент, если пространственная кривая плоская (после использования вызывать DeleteItem на двумерную кривую) \en Give a planar curve and placement, if the spatial curve is planar (after using the DeleteItem must be called for a two-dimensional curve) - virtual bool GetPlaneCurve( MbCurve *& curve2d, MbPlacement3D & place, bool saveParams, PlanarCheckParams params = PlanarCheckParams() ) const; + virtual bool GetPlaneCurve( MbCurve *& curve2d, MbPlacement3D & place, bool saveParams, VERSION version = Math::DefaultMathVersion() ) const; // \ru Посчитать метрическую длину \en Calculate the metric length virtual double CalculateMetricLength() const; diff --git a/C3d/Include/cur_curve_spiral.h b/C3d/Include/cur_curve_spiral.h index 2c539f4..31e391a 100644 --- a/C3d/Include/cur_curve_spiral.h +++ b/C3d/Include/cur_curve_spiral.h @@ -88,7 +88,7 @@ public: // \ru Общие функции математического объекта \en Common functions of the mathematical object virtual MbeSpaceType IsA() const; // \ru Тип элемента \en Type of element - virtual MbSpaceItem & Duplicate( MbRegDuplicate * = c3d_null ) const; // \ru Сделать копию элемента \en Create a copy of the element + virtual MbSpaceItem & Duplicate( MbRegDuplicate * = NULL ) const; // \ru Сделать копию элемента \en Create a copy of the element virtual bool IsSame( const MbSpaceItem & other, double accuracy = LENGTH_EPSILON ) const; virtual bool SetEqual( const MbSpaceItem & init ); // \ru Сделать равным \en Make equal @@ -112,7 +112,7 @@ public: virtual void Explore( double & t, bool ext, MbCartPoint3D & pnt, MbVector3D & fir, MbVector3D * sec, MbVector3D * thir ) const; - virtual void Inverse( MbRegTransform * iReg = c3d_null ); // \ru Изменить направление \en Change direction + virtual void Inverse( MbRegTransform * iReg = NULL ); // \ru Изменить направление \en Change direction virtual MbCurve3D * Trimmed( double t1, double t2, int sense ) const; // \ru Создание усеченной кривой \en Creation of a trimmed curve diff --git a/C3d/Include/cur_hermit.h b/C3d/Include/cur_hermit.h index 15b2e6d..28f5186 100644 --- a/C3d/Include/cur_hermit.h +++ b/C3d/Include/cur_hermit.h @@ -211,11 +211,11 @@ public : virtual MbePlaneType IsA() const; // \ru Тип элемента \en Type of element virtual bool SetEqual( const MbPlaneItem & ); // \ru Сделать элементы равными \en Make the elements equal - virtual void Transform( const MbMatrix & matr, MbRegTransform * ireg = c3d_null, const MbSurface * newSurface = c3d_null ); // \ru Преобразовать элемент согласно матрице \en Transform element according to the matrix - virtual void Move( const MbVector & to, MbRegTransform * = c3d_null, const MbSurface * newSurface = c3d_null ); // \ru Сдвиг \en Translation - virtual void Rotate( const MbCartPoint & pnt, const MbDirection & angle, MbRegTransform * = c3d_null, const MbSurface * newSurface = c3d_null ); // \ru Поворот \en Rotation + virtual void Transform( const MbMatrix & matr, MbRegTransform * ireg = NULL, const MbSurface * newSurface = NULL ); // \ru Преобразовать элемент согласно матрице \en Transform element according to the matrix + virtual void Move( const MbVector & to, MbRegTransform * = NULL, const MbSurface * newSurface = NULL ); // \ru Сдвиг \en Translation + virtual void Rotate( const MbCartPoint & pnt, const MbDirection & angle, MbRegTransform * = NULL, const MbSurface * newSurface = NULL ); // \ru Поворот \en Rotation virtual bool IsSame( const MbPlaneItem & other, double accuracy = LENGTH_EPSILON ) const; - virtual MbPlaneItem & Duplicate( MbRegDuplicate * = c3d_null ) const; // \ru Сделать копию элемента \en Create a copy of the element + virtual MbPlaneItem & Duplicate( MbRegDuplicate * = NULL ) const; // \ru Сделать копию элемента \en Create a copy of the element /** \} */ /** \ru \name Общие функции кривой @@ -246,7 +246,7 @@ public : virtual void Explore( double & t, bool ext, MbCartPoint & pnt, MbVector & fir, MbVector * sec, MbVector * thir ) const; - virtual void Inverse( MbRegTransform * iReg = c3d_null ); // \ru Изменить направление \en Change direction + virtual void Inverse( MbRegTransform * iReg = NULL ); // \ru Изменить направление \en Change direction virtual double Step( double t, double sag ) const; // \ru Вычисление шага аппроксимации с учетом радиуса кривизны \en Calculation of approximation step with consideration of curvature radius virtual double DeviationStep( double t, double angle ) const; // \ru Вычисление шага аппроксимации по угловой толерантности \en Calculation of approximation step by angular tolerance virtual void IntersectHorizontal( double y, SArray & ) const; // \ru Пересечение кривой с горизонтальной прямой \en Intersection of a curve with a horizontal line @@ -254,7 +254,7 @@ public : virtual double PointProjection( const MbCartPoint & pnt ) const; // \ru Проекция точки на кривую \en Point projection on the curve virtual bool NearPointProjection( const MbCartPoint & pnt, double xEpsilon, double yEpsilon, - double & t, bool ext, MbRect1D * tRange = c3d_null ) const; // \ru Проекция точки на кривую или её продолжение в области поиска проекции \en Point projection on the curve or its extension in the projection search area + double & t, bool ext, MbRect1D * tRange = NULL ) const; // \ru Проекция точки на кривую или её продолжение в области поиска проекции \en Point projection on the curve or its extension in the projection search area virtual double CalculateMetricLength() const; // \ru Посчитать метрическую длину разомкнутой \en Calculate the open metric length virtual bool GetWeightCentre( MbCartPoint & wc ) const; // \ru Посчитать центр тяжести кривой \en Calculate the gravity center of the curve virtual void CalculateGabarit( MbRect & r ) const; // \ru Определить габариты \en Calculate bounding box diff --git a/C3d/Include/cur_hermit3d.h b/C3d/Include/cur_hermit3d.h index f3c6929..9a53d3f 100644 --- a/C3d/Include/cur_hermit3d.h +++ b/C3d/Include/cur_hermit3d.h @@ -211,12 +211,12 @@ public : // \ru Общие функции математического объекта \en Common functions of the mathematical object virtual MbeSpaceType IsA() const; // \ru Тип элемента \en Type of element - virtual MbSpaceItem & Duplicate( MbRegDuplicate * = c3d_null ) const; // \ru Сделать копию элемента \en Create a copy of the element + virtual MbSpaceItem & Duplicate( MbRegDuplicate * = NULL ) const; // \ru Сделать копию элемента \en Create a copy of the element virtual bool IsSame ( const MbSpaceItem & other, double accuracy = LENGTH_EPSILON ) const; virtual bool SetEqual ( const MbSpaceItem & ); // \ru Сделать равным \en Make equal - virtual void Transform( const MbMatrix3D &, MbRegTransform * = c3d_null ); // \ru Преобразовать \en Transform. - virtual void Move ( const MbVector3D &, MbRegTransform * = c3d_null ); // \ru Сдвиг \en Translation - virtual void Rotate ( const MbAxis3D &, double angle, MbRegTransform * = c3d_null ); // \ru Поворот \en Rotation + virtual void Transform( const MbMatrix3D &, MbRegTransform * = NULL ); // \ru Преобразовать \en Transform. + virtual void Move ( const MbVector3D &, MbRegTransform * = NULL ); // \ru Сдвиг \en Translation + virtual void Rotate ( const MbAxis3D &, double angle, MbRegTransform * = NULL ); // \ru Поворот \en Rotation virtual void GetProperties( MbProperties & ); // \ru Выдать свойства объекта \en Get properties of the object virtual void SetProperties( const MbProperties & ); // \ru Записать свойства объекта \en Set properties of the object @@ -236,7 +236,7 @@ public : virtual void Explore( double & t, bool ext, MbCartPoint3D & pnt, MbVector3D & fir, MbVector3D * sec, MbVector3D * thir ) const; - virtual void Inverse( MbRegTransform * iReg = c3d_null ); // \ru Изменить направление \en Change direction + virtual void Inverse( MbRegTransform * iReg = NULL ); // \ru Изменить направление \en Change direction virtual double Step ( double t, double sag ) const; // \ru Вычисление шага аппроксимации \en Calculation of approximation step virtual double DeviationStep( double t, double angle ) const; @@ -246,12 +246,12 @@ public : virtual MbCurve3D * Trimmed( double t1, double t2, int sense ) const; // \ru Создание усеченной кривой \en Creation of a trimmed curve virtual MbCurve3D * TrimmBreak( double t1, double t2, int sense ) const; // \ru Создание усеченной кривой \en Creation of a trimmed curve - virtual bool IsPlanar ( double accuracy = METRIC_EPSILON ) const; // \ru Является ли кривая плоской \en Whether a curve is planar. + virtual bool IsPlanar () const; // \ru Является ли кривая плоской \en Whether a curve is planar. virtual bool IsStraight( bool ignoreParams = false ) const; // \ru Признак прямолинейности кривой \en An attribute of curve straightness - virtual bool GetPlacement( MbPlacement3D & place, PlanarCheckParams params = PlanarCheckParams() ) const; // \ru Заполнить плейсемент, ести кривая плоская \en Fill the placement if curve is planar + virtual bool GetPlacement( MbPlacement3D & place, VERSION version = Math::DefaultMathVersion() ) const; // \ru Заполнить плейсемент, ести кривая плоская \en Fill the placement if curve is planar // \ru Дать плоскую кривую и плейсмент, если пространственная кривая плоская (после использования вызывать DeleteItem на двумерную кривую) \en Give a planar curve and placement, if the spatial curve is planar (after using the DeleteItem must be called for a two-dimensional curve) - virtual bool GetPlaneCurve( MbCurve *& curve2d, MbPlacement3D & place, bool saveParams, PlanarCheckParams params = PlanarCheckParams() ) const; + virtual bool GetPlaneCurve( MbCurve *& curve2d, MbPlacement3D & place, bool saveParams, VERSION version = Math::DefaultMathVersion() ) const; /// \ru Получить границы участков кривой, которые описываются одной аналитической функцией. /// \en Get the boundaries of the curve sections that are described by one analytical function. \~ @@ -276,7 +276,7 @@ public : virtual bool CheckParam ( double & t, ptrdiff_t & i0, ptrdiff_t & i1, double & t0, double & t1 ) const; // \ru Загнать параметр получить локальный индексы и параметры \en Move parameter into domain, get local indices and parameters virtual double GetParam( ptrdiff_t i ) const; // \ru Выдать параметр для точки с номером \en Get parameter for point with index - virtual bool NearPointProjection ( const MbCartPoint3D &, double & t, bool ext, MbRect1D * tRange = c3d_null ) const; // \ru Ближайшая проекция точки на кривую \en The nearest point projection to the curve + virtual bool NearPointProjection ( const MbCartPoint3D &, double & t, bool ext, MbRect1D * tRange = NULL ) const; // \ru Ближайшая проекция точки на кривую \en The nearest point projection to the curve virtual double CalculateMetricLength() const; // \ru Посчитать метрическую длину \en Calculate the metric length virtual void GetWeightCentre( MbCartPoint3D &wc ) const; // \ru Посчитать центр тяжести кривой \en Calculate the gravity center of the curve virtual void CalculateGabarit( MbCube & gab ) const; // \ru Вычислить габарит кривой \en Calculate the bounding box of curve @@ -284,8 +284,8 @@ public : VERSION version = Math::DefaultMathVersion() ) const; // \ru Сдвинуть параметр t на расстояние len по направлению \en Shift the parameter t by the distance 'len' in the direction // \ru Функции только 3D кривой \en Function for 3D-curve - virtual MbCurve * GetMap( const MbMatrix3D &, MbRect1D * pRgn = c3d_null, - VERSION version = Math::DefaultMathVersion(), bool * coincParams = c3d_null ) const; // \ru Дать плоскую проекцию кривой \en Get a planar projection of curve + virtual MbCurve * GetMap( const MbMatrix3D &, MbRect1D * pRgn = NULL, + VERSION version = Math::DefaultMathVersion(), bool * coincParams = NULL ) const; // \ru Дать плоскую проекцию кривой \en Get a planar projection of curve virtual size_t GetCount() const; // \ru Установить область изменения параметра. \en Set range of parameter. diff --git a/C3d/Include/cur_line.h b/C3d/Include/cur_line.h index 7eb461f..86b5356 100644 --- a/C3d/Include/cur_line.h +++ b/C3d/Include/cur_line.h @@ -71,11 +71,11 @@ public : virtual bool IsSimilar( const MbPlaneItem & ) const; // \ru Являются ли элементы подобными \en Whether the elements are similar virtual bool SetEqual ( const MbPlaneItem & ); // \ru Сделать элементы равными \en Make equal elements virtual bool IsSame ( const MbPlaneItem & other, double accuracy = LENGTH_EPSILON ) const; // \ru Является ли кривая curve копией данной кривой ? \en Whether the 'curve' curve is duplicate of current curve. - virtual void Transform( const MbMatrix &, MbRegTransform * ireg = c3d_null, const MbSurface * newSurface = c3d_null ); // \ru Преобразовать элемент согласно матрице \en Transform element according to the matrix - virtual void Move ( const MbVector &, MbRegTransform * = c3d_null, const MbSurface * newSurface = c3d_null ); // \ru Сдвиг \en Translation - virtual void Rotate( const MbCartPoint & pnt, const MbDirection & angle, MbRegTransform * = c3d_null, const MbSurface * newSurface = c3d_null ); // \ru Поворот \en Rotation + virtual void Transform( const MbMatrix &, MbRegTransform * ireg = NULL, const MbSurface * newSurface = NULL ); // \ru Преобразовать элемент согласно матрице \en Transform element according to the matrix + virtual void Move ( const MbVector &, MbRegTransform * = NULL, const MbSurface * newSurface = NULL ); // \ru Сдвиг \en Translation + virtual void Rotate( const MbCartPoint & pnt, const MbDirection & angle, MbRegTransform * = NULL, const MbSurface * newSurface = NULL ); // \ru Поворот \en Rotation - virtual MbPlaneItem & Duplicate( MbRegDuplicate * = c3d_null ) const; // \ru Сделать копию элемента \en Create a copy of the element + virtual MbPlaneItem & Duplicate( MbRegDuplicate * = NULL ) const; // \ru Сделать копию элемента \en Create a copy of the element virtual void AddYourGabaritTo ( MbRect & ) const; // \ru Добавь свой габарит в прямой прям-к \en Add bounding box into a straight box virtual void AddYourGabaritMtr( MbRect &, const MbMatrix & ) const; // \ru Добавь в прям-к свой габарит с учетом матрицы \en Add bounding rectangle into a box with consideration of the matrix @@ -149,7 +149,7 @@ public : // \ru Вычисление минимальной длины кривой между двумя точками на ней \en Calculation of minimal length of a curve between two points on it virtual double LengthBetween2Points( MbCartPoint & p1, MbCartPoint & p2, - MbCartPoint * pc = c3d_null ) const; + MbCartPoint * pc = NULL ) const; virtual bool DistanceAlong( double & t, double len, int curveDir, double eps = Math::LengthEps, VERSION version = Math::DefaultMathVersion() ) const; // \ru Сдвинуть параметр t на расстояние len по направлению \en Shift the parameter t by the distance 'len' in the direction @@ -166,7 +166,7 @@ public : virtual MbeItemLocation PointRelative ( const MbCartPoint & p, double eps = Math::LengthEps ) const; virtual double PointProjection ( const MbCartPoint & ) const; // \ru Проекция точки на кривую \en Point projection on the curve virtual bool NearPointProjection( const MbCartPoint & pnt, double xEpsilon, double yEpsilon, - double & t, bool ext, MbRect1D * tRange = c3d_null ) const; // \ru Проекция точки на кривую или её продолжение в области поиска проекции \en Point projection on the curve or its extension in the projection search area + double & t, bool ext, MbRect1D * tRange = NULL ) const; // \ru Проекция точки на кривую или её продолжение в области поиска проекции \en Point projection on the curve or its extension in the projection search area // \ru Вычисление всех перпендикуляров к кривой из данной точки \en Calculation of all perpendiculars to the curve from a given point virtual void PerpendicularPoint( const MbCartPoint & pnt, SArray & tFind ) const; @@ -186,7 +186,7 @@ public : virtual void IntersectHorizontal( double y, SArray & cross ) const; // \ru Пересечение с горизонтальной прямой \en Intersection with the horizontal line virtual void IntersectVertical ( double x, SArray & cross ) const; // \ru Пересечение с вертикальной прямой \en Intersection with the vertical line - virtual void Inverse( MbRegTransform * iReg = c3d_null ); // \ru Изменение направления кривой на противоположное \en Change to the opposite direction of a curve + virtual void Inverse( MbRegTransform * iReg = NULL ); // \ru Изменение направления кривой на противоположное \en Change to the opposite direction of a curve virtual bool IsClosed() const; // \ru Проверка замкнутости \en Check for closedness virtual bool IsBounded() const; // \ru Определить, является ли кривая ограниченной. \en Define whether the curve is bounded. virtual bool IsStraight( bool ignoreParams = false ) const; // \ru Признак прямолинейности кривой \en An attribute of curve straightness diff --git a/C3d/Include/cur_line3d.h b/C3d/Include/cur_line3d.h index 6f0b635..d6e8904 100644 --- a/C3d/Include/cur_line3d.h +++ b/C3d/Include/cur_line3d.h @@ -56,12 +56,12 @@ public : // \ru Общие функции математического объекта \en Common functions of the mathematical object virtual MbeSpaceType IsA() const; // \ru Тип элемента \en Type of element - virtual MbSpaceItem & Duplicate( MbRegDuplicate * = c3d_null ) const; // \ru Сделать копию элемента \en Create a copy of the element + virtual MbSpaceItem & Duplicate( MbRegDuplicate * = NULL ) const; // \ru Сделать копию элемента \en Create a copy of the element virtual bool IsSame ( const MbSpaceItem & other, double accuracy = LENGTH_EPSILON ) const; virtual bool SetEqual ( const MbSpaceItem & ); // \ru Сделать равным \en Make equal - virtual void Transform( const MbMatrix3D &, MbRegTransform * = c3d_null ); // \ru Преобразовать \en Transform - virtual void Move ( const MbVector3D &, MbRegTransform * = c3d_null ); // \ru Сдвиг \en Translation - virtual void Rotate ( const MbAxis3D &, double angle, MbRegTransform * = c3d_null ); // \ru Повернуть вокруг оси \en Rotate around an axis + virtual void Transform( const MbMatrix3D &, MbRegTransform * = NULL ); // \ru Преобразовать \en Transform + virtual void Move ( const MbVector3D &, MbRegTransform * = NULL ); // \ru Сдвиг \en Translation + virtual void Rotate ( const MbAxis3D &, double angle, MbRegTransform * = NULL ); // \ru Повернуть вокруг оси \en Rotate around an axis virtual double DistanceToPoint( const MbCartPoint3D & ) const; // \ru Расстояние до точки \en Distance to a point virtual void AddYourGabaritTo( MbCube & ) const; // \ru Добавить габарит кривой в куб. \en Add a bounding box of a curve to a cube. @@ -98,7 +98,7 @@ public : virtual bool DistanceAlong( double & t, double len, int curveDir, double eps = Math::metricPrecision, VERSION version = Math::DefaultMathVersion() ) const; - virtual void Inverse( MbRegTransform * iReg = c3d_null ); // \ru Изменить направление \en Change direction + virtual void Inverse( MbRegTransform * iReg = NULL ); // \ru Изменить направление \en Change direction virtual double GetMetricLength() const; // \ru Метрическая длина кривой \en Metric length of a curve virtual double Step ( double t, double sag ) const; // \ru Вычисление шага по стрелке прогиба. \en Calculation of parameter step by the sag. virtual double DeviationStep( double t, double angle ) const; // \ru Вычисление шага по углу отклонения нормали. \en Calculation of parameter step by the deviation angle. @@ -110,7 +110,7 @@ public : virtual void CalculateLocalGabarit( const MbMatrix3D & into, MbCube & ) const; // \ru Ближайшая проекция точки на кривую \en The nearest point projection to the curve - virtual bool NearPointProjection( const MbCartPoint3D &, double & t, bool ext, MbRect1D * tRange = c3d_null ) const; + virtual bool NearPointProjection( const MbCartPoint3D &, double & t, bool ext, MbRect1D * tRange = NULL ) const; bool operator == ( const MbLine3D & with ) const; // \ru Проверка на равенство \en Check for equality bool operator != ( const MbLine3D & with ) const; // \ru Проверка на неравенство \en Check for inequality @@ -118,16 +118,16 @@ public : virtual void GetCentre ( MbCartPoint3D & c ) const; // \ru Выдать центр кривой \en Get the center of curve virtual void GetWeightCentre( MbCartPoint3D & wc ) const; // \ru Выдать центр тяжести кривой \en Get the center of gravity of the curve virtual bool IsStraight( bool ignoreParams = false ) const; // \ru Является ли линия прямолинейной \en Whether the line is straight - virtual bool IsPlanar ( double accuracy = METRIC_EPSILON ) const; // \ru Является ли кривая плоской \en Whether a curve is planar + virtual bool IsPlanar () const; // \ru Является ли кривая плоской \en Whether a curve is planar virtual double GetParamToUnit() const; // \ru Дать приращение параметра, осреднённо соответствующее единичной длине в пространстве \en Get increment of parameter, corresponding to the unit length in space virtual double GetParamToUnit( double t ) const; // \ru Дать приращение параметра, соответствующее единичной длине в пространстве \en Get increment of parameter, corresponding to the unit length in space // \ru Дать плоскую проекцию кривой \en Get a planar projection of curve - virtual MbCurve * GetMap( const MbMatrix3D &, MbRect1D * pRgn = c3d_null, - VERSION version = Math::DefaultMathVersion(), bool * coincParams = c3d_null ) const; + virtual MbCurve * GetMap( const MbMatrix3D &, MbRect1D * pRgn = NULL, + VERSION version = Math::DefaultMathVersion(), bool * coincParams = NULL ) const; virtual MbCurve * GetMapPsp( const MbMatrix3D &, double zNear, - MbRect1D * pRgn = c3d_null ) const; + MbRect1D * pRgn = NULL ) const; virtual void CalculatePolygon( const MbStepData & stepData, MbPolygon3D & ) const; // \ru pассчитать полигон \en Calculate a polygon virtual bool IsSimilarToCurve( const MbCurve3D & curve, double precision = METRIC_PRECISION ) const; // \ru Подобные ли кривые для объединения (слива) \en Whether the curves for union (joining) are similar diff --git a/C3d/Include/cur_line_segment.h b/C3d/Include/cur_line_segment.h index 4d67a2d..f27ab7d 100644 --- a/C3d/Include/cur_line_segment.h +++ b/C3d/Include/cur_line_segment.h @@ -68,10 +68,10 @@ public : void Init1( const MbCartPoint &p1, const MbCartPoint &p2, double &len, double &angle ); void Init2( const MbCartPoint &p1, MbCartPoint &p2, const double &len, double &angle ); void Init3( const MbCartPoint &p1, MbCartPoint &p2, double &len, const double &angle, - const DiskreteLengthData * diskrData = c3d_null ); + const DiskreteLengthData * diskrData = NULL ); void Init4( MbCartPoint &p1, const MbCartPoint &p2, const double &len, double &angle ); void Init5( MbCartPoint &p1, const MbCartPoint &p2, double &len, const double &angle, - const DiskreteLengthData * diskrData = c3d_null ); + const DiskreteLengthData * diskrData = NULL ); void Init6( const MbCartPoint &p1, MbCartPoint &p2, const double &len, const double &angle ); void Init7( MbCartPoint &p1, const MbCartPoint &p2, const double &len, const double &angle ); void Init8( MbCartPoint &p1, MbCartPoint &p2, double &len, double &angle, @@ -86,10 +86,10 @@ public : virtual MbePlaneType IsA() const; // \ru Тип элемента \en Type of element virtual bool IsSame ( const MbPlaneItem & other, double accuracy = LENGTH_EPSILON ) const; // \ru Является ли кривая curve копией данной кривой ? \en Whether the 'curve' curve is duplicate of current curve. virtual bool SetEqual( const MbPlaneItem & ); // \ru Сделать элементы равными \en Make equal elements - virtual MbPlaneItem & Duplicate( MbRegDuplicate * = c3d_null ) const; // \ru Сделать копию элемента \en Create a copy of the element - virtual void Transform( const MbMatrix &, MbRegTransform * ireg = c3d_null, const MbSurface * newSurface = c3d_null ); // \ru Преобразовать элемент согласно матрице \en Transform element according to the matrix - virtual void Move( const MbVector &, MbRegTransform * = c3d_null, const MbSurface * newSurface = c3d_null ); // \ru Сдвиг \en Translation - virtual void Rotate( const MbCartPoint & pnt, const MbDirection & angle, MbRegTransform * = c3d_null, const MbSurface * newSurface = c3d_null ); // \ru Поворот \en Rotation + virtual MbPlaneItem & Duplicate( MbRegDuplicate * = NULL ) const; // \ru Сделать копию элемента \en Create a copy of the element + virtual void Transform( const MbMatrix &, MbRegTransform * ireg = NULL, const MbSurface * newSurface = NULL ); // \ru Преобразовать элемент согласно матрице \en Transform element according to the matrix + virtual void Move( const MbVector &, MbRegTransform * = NULL, const MbSurface * newSurface = NULL ); // \ru Сдвиг \en Translation + virtual void Rotate( const MbCartPoint & pnt, const MbDirection & angle, MbRegTransform * = NULL, const MbSurface * newSurface = NULL ); // \ru Поворот \en Rotation virtual void AddYourGabaritTo ( MbRect & ) const; // \ru Добавь свой габарит в прямой прям-к \en Add bounding box into a straight box virtual void CalculateGabarit ( MbRect & ) const; // \ru Определить габариты кривой \en Determine the bounding box of the curve virtual void CalculateLocalGabarit( const MbMatrix & into, MbRect & local ) const ; // \ru Добавь в прям-к свой габарит с учетом матрицы \en Add bounding box into a box with consideration of the matrix @@ -155,7 +155,7 @@ public : \en \name Common function of curve. \{ */ virtual double Curvature( double t ) const; // \ru Кривизна усеченной кривой \en Curvature of a trimmed curve - virtual void Inverse( MbRegTransform * iReg = c3d_null ); // \ru Изменить направление кривой \en Change direction of a curve + virtual void Inverse( MbRegTransform * iReg = NULL ); // \ru Изменить направление кривой \en Change direction of a curve virtual MbCurve * Offset( double rad ) const; // \ru Смещение отрезка \en Shift of a line segment virtual MbCurve * Trimmed( double t1, double t2, int sense ) const; @@ -179,7 +179,7 @@ public : virtual MbeItemLocation PointRelative( const MbCartPoint & pnt, double eps = Math::LengthEps ) const; virtual double PointProjection( const MbCartPoint & pnt ) const; // \ru Проекция точки на отрезок \en Point projection on the line segment virtual bool NearPointProjection( const MbCartPoint & pnt, double xEpsilon, double yEpsilon, - double & t, bool ext, MbRect1D * tRange = c3d_null ) const; // \ru Проекция точки на кривую или её продолжение в области поиска проекции \en Point projection on the curve or its extension in the projection search area + double & t, bool ext, MbRect1D * tRange = NULL ) const; // \ru Проекция точки на кривую или её продолжение в области поиска проекции \en Point projection on the curve or its extension in the projection search area virtual void PerpendicularPoint( const MbCartPoint & pnt, SArray & tFind ) const; // \ru Вычисление всех перпендикуляров к кривой из данной точки \en Calculation of all perpendiculars to the curve from a given point virtual void IntersectHorizontal( double y, SArray & cross ) const; // \ru Пересечение с горизонтальной прямой \en Intersection with the horizontal line virtual void IntersectVertical ( double x, SArray & cross ) const; // \ru Пересечение с вертикальной прямой \en Intersection with the vertical line @@ -188,7 +188,7 @@ public : virtual double GetMetricLength() const; // \ru Метрическая длина \en The metric length virtual double GetLengthEvaluation() const; // \ru Оценка метрической длины кривой \en Evaluation of the metric length of the curve // \ru Вычисление минимальной длины кривой между двумя точками на ней \en Calculation of minimal length of a curve between two points on it - virtual double LengthBetween2Points( MbCartPoint & p1, MbCartPoint & p2, MbCartPoint * pc = c3d_null ) const; + virtual double LengthBetween2Points( MbCartPoint & p1, MbCartPoint & p2, MbCartPoint * pc = NULL ) const; virtual bool DistanceAlong( double & t, double len, int curveDir, double eps = Math::LengthEps, VERSION version = Math::DefaultMathVersion() ) const; diff --git a/C3d/Include/cur_line_segment3d.h b/C3d/Include/cur_line_segment3d.h index 2797dc0..29532ea 100644 --- a/C3d/Include/cur_line_segment3d.h +++ b/C3d/Include/cur_line_segment3d.h @@ -64,12 +64,12 @@ public : // \ru Общие функции математического объекта \en Common functions of the mathematical object virtual MbeSpaceType IsA() const; // \ru Тип элемента \en Type of element - virtual MbSpaceItem & Duplicate( MbRegDuplicate * = c3d_null ) const; // \ru Сделать копию элемента \en Create a copy of the element + virtual MbSpaceItem & Duplicate( MbRegDuplicate * = NULL ) const; // \ru Сделать копию элемента \en Create a copy of the element virtual bool IsSame ( const MbSpaceItem & other, double accuracy = LENGTH_EPSILON ) const; virtual bool SetEqual ( const MbSpaceItem & ); // \ru Сделать равным \en Make equal - virtual void Transform( const MbMatrix3D &, MbRegTransform * = c3d_null ); // \ru Преобразовать элемент согласно матрице \en Transform element according to the matrix - virtual void Move ( const MbVector3D &, MbRegTransform * = c3d_null ); // \ru Сдвиг \en Translation - virtual void Rotate ( const MbAxis3D &, double angle, MbRegTransform * = c3d_null ); // \ru Повернуть вокруг оси \en Rotate about an axis + virtual void Transform( const MbMatrix3D &, MbRegTransform * = NULL ); // \ru Преобразовать элемент согласно матрице \en Transform element according to the matrix + virtual void Move ( const MbVector3D &, MbRegTransform * = NULL ); // \ru Сдвиг \en Translation + virtual void Rotate ( const MbAxis3D &, double angle, MbRegTransform * = NULL ); // \ru Повернуть вокруг оси \en Rotate about an axis virtual void GetProperties( MbProperties & ); // \ru Выдать свойства объекта \en Get properties of the object virtual void SetProperties( const MbProperties & ); // \ru Записать свойства объекта \en Set properties of the object @@ -100,7 +100,7 @@ public : virtual MbCurve3D * NurbsCurve( const MbNurbsParameters & ) const; // \ru Построить Nurbs-копию кривой \en Construct NURBS copy of the curve virtual MbCurve3D * Trimmed( double t1, double t2, int sense ) const; - virtual void Inverse( MbRegTransform * iReg = c3d_null ); // \ru Изменить направление \en Change direction + virtual void Inverse( MbRegTransform * iReg = NULL ); // \ru Изменить направление \en Change direction virtual double CalculateMetricLength() const; // \ru Метрическая длина кривой \en Metric length of a curve virtual double GetLengthEvaluation() const; virtual double CalculateLength( double t1, double t2 ) const; @@ -111,19 +111,19 @@ public : virtual void GetCentre ( MbCartPoint3D & wc ) const; // \ru Посчитать центр кривой \en Calculate a center of curve virtual void GetWeightCentre( MbCartPoint3D & wc ) const; // \ru Посчитать центр тяжести кривой \en Calculate the gravity center of the curve virtual double Curvature( double t ) const; // \ru Кривизна усеченной кривой \en Curvature of a trimmed curve - virtual bool NearPointProjection ( const MbCartPoint3D &, double & t, bool ext, MbRect1D * tRange = c3d_null ) const; // \ru Ближайшая проекция точки на кривую \en The nearest point projection to the curve + virtual bool NearPointProjection ( const MbCartPoint3D &, double & t, bool ext, MbRect1D * tRange = NULL ) const; // \ru Ближайшая проекция точки на кривую \en The nearest point projection to the curve virtual double Step ( double t, double sag ) const; // \ru Вычисление шага по стрелке прогиба. \en Calculation of parameter step by the sag. virtual double DeviationStep( double t, double angle ) const; // \ru Вычисление шага по углу отклонения нормали. \en Calculation of parameter step by the deviation angle. virtual double MetricStep ( double t, double length ) const; // \ru Вычисление шага параметра по длине. \en Calculation of parameter step by the given length. - virtual MbCurve * GetMap( const MbMatrix3D &, MbRect1D * pRgn = c3d_null, - VERSION version = Math::DefaultMathVersion(), bool * coincParams = c3d_null ) const; // \ru Дать плоскую проекцию кривой. \en Get a planar projection of curve. - virtual MbCurve * GetMapPsp( const MbMatrix3D &, double zNear, MbRect1D * pRgn = c3d_null ) const; // \ru Дать перспективную плоскую проекцию кривой. \en Get a planar geometric projection of curve. + virtual MbCurve * GetMap( const MbMatrix3D &, MbRect1D * pRgn = NULL, + VERSION version = Math::DefaultMathVersion(), bool * coincParams = NULL ) const; // \ru Дать плоскую проекцию кривой. \en Get a planar projection of curve. + virtual MbCurve * GetMapPsp( const MbMatrix3D &, double zNear, MbRect1D * pRgn = NULL ) const; // \ru Дать перспективную плоскую проекцию кривой. \en Get a planar geometric projection of curve. virtual bool IsStraight( bool ignoreParams = false ) const; // \ru Является ли линия прямолинейной \en Whether the line is straight virtual size_t GetCount () const; - virtual bool IsPlanar ( double accuracy = METRIC_EPSILON ) const; // \ru Является ли кривая плоской \en Whether a curve is planar + virtual bool IsPlanar () const; // \ru Является ли кривая плоской \en Whether a curve is planar virtual bool DistanceAlong( double & t, double len, int curveDir, double eps = Math::metricPrecision, VERSION version = Math::DefaultMathVersion() ) const; // \ru Сдвинуть параметр t на расстояние len по направлению \en Shift the parameter t by the distance 'len' in the direction virtual void CalculatePolygon( const MbStepData & stepData, MbPolygon3D & polygon ) const; // \ru Рассчитать полигон \en Calculate a polygon diff --git a/C3d/Include/cur_nurbs.h b/C3d/Include/cur_nurbs.h index fa10d38..e9786a2 100644 --- a/C3d/Include/cur_nurbs.h +++ b/C3d/Include/cur_nurbs.h @@ -399,7 +399,7 @@ public : uppIndex = (ptrdiff_t)initPoints.size() - 1; pointList.assign( initPoints.begin(), initPoints.end() ); - if ( initWeights != c3d_null ) { + if ( initWeights != NULL ) { if ( (ptrdiff_t)initWeights->size() == uppIndex + 1 ) weights.assign( initWeights->begin(), initWeights->end() ); else { @@ -535,16 +535,16 @@ public : /// \ru Создать кубический NURBS по точкам, через которые он проходит, и параметрам сопряжения. \en Create cubic NURBS by parameters of conjugation and points which it passes through. static MbNurbs * CreateNURBS4( const SArray &, MbeSplineParamType spType, - const c3d::PntMatingData2D & begData, - const c3d::PntMatingData2D & endData ); + const MbPntMatingData & begData, + const MbPntMatingData & endData ); /// \ru Создать кубический NURBS по интерполяционным точкам и данным сопряжения в каждой точке. \en Create cubic NURBS by interpolation points and data of conjugation at each point. static MbNurbs * CreateNURBS4( const SArray &, MbeSplineParamType spType, bool closed, - RPArray & ); + RPArray< MbPntMatingData > & ); /// \ru Создать кубический NURBS по интерполяционным точкам, их параметрам и данным сопряжения в каждой точке. \en Create cubic NURBS by interpolation points, parameters and data of conjugation at each point. static MbNurbs * CreateNURBS4( const SArray &, const SArray &, bool closed, - RPArray & ); + RPArray< MbPntMatingData > & ); /** \brief \ru Интерполяция. \en Interpolation. \~ \details \ru Создать плоский сплайн четвертого порядка по точкам, признаку замкнутости и типу параметризации.\n @@ -607,7 +607,7 @@ public : static MbNurbs * CreateNURBS4( const MbBezier & ); /// \ru Установить сопряжение на конце. \en Set conjugation at the end. - bool AttachG( c3d::PntMatingData2D & connectData, bool beg ); + bool AttachG( MbPntMatingData & connectData, bool beg ); /// \ru Увеличить порядок кривой, не изменяя ее геометрическую форму и параметризацию. \en Increase order of curve without changing its geometric shape and parametrization. bool RaiseDegree ( size_t, double relEps = Math::paramEpsilon ); @@ -627,12 +627,12 @@ public : \en \name Common functions of geometric object. \{ */ virtual MbePlaneType IsA() const; // \ru Тип элемента. \en A type of element. - virtual MbPlaneItem & Duplicate( MbRegDuplicate * = c3d_null ) const; // \ru Сделать копию элемента \en Create a copy of the element + virtual MbPlaneItem & Duplicate( MbRegDuplicate * = NULL ) const; // \ru Сделать копию элемента \en Create a copy of the element virtual bool IsSame( const MbPlaneItem & other, double accuracy = LENGTH_EPSILON ) const; // \ru Является ли кривая other копией данной кривой? \en Whether the curve is duplicate of current curve. virtual bool SetEqual( const MbPlaneItem & ); // \ru Сделать элементы равными. \en Make elements equal. - virtual void Transform( const MbMatrix & matr, MbRegTransform * ireg = c3d_null, const MbSurface * newSurface = c3d_null ); // \ru Преобразовать элемент согласно матрице. \en Transform element according to the matrix. - virtual void Move( const MbVector & to, MbRegTransform * = c3d_null, const MbSurface * newSurface = c3d_null ); // \ru Сдвиг. \en Translation. - virtual void Rotate( const MbCartPoint & pnt, const MbDirection & angle, MbRegTransform * = c3d_null, const MbSurface * newSurface = c3d_null ); // \ru Поворот. \en Rotation. + virtual void Transform( const MbMatrix & matr, MbRegTransform * ireg = NULL, const MbSurface * newSurface = NULL ); // \ru Преобразовать элемент согласно матрице. \en Transform element according to the matrix. + virtual void Move( const MbVector & to, MbRegTransform * = NULL, const MbSurface * newSurface = NULL ); // \ru Сдвиг. \en Translation. + virtual void Rotate( const MbCartPoint & pnt, const MbDirection & angle, MbRegTransform * = NULL, const MbSurface * newSurface = NULL ); // \ru Поворот. \en Rotation. virtual void GetProperties( MbProperties & ); // \ru Выдать свойства объекта. \en Get properties of the object. virtual void SetProperties( const MbProperties & ); // \ru Записать свойства объекта. \en Set properties of the object. @@ -705,7 +705,7 @@ public : virtual MbCurve * Trimmed( double t1, double t2, int sense ) const; virtual void Refresh(); // \ru Сбросить все временные данные. \en Reset all temporary data. - virtual void Inverse( MbRegTransform * iReg = c3d_null ); // \ru Изменение направления кривой на противоположное. \en Set the opposite direction of curve. + virtual void Inverse( MbRegTransform * iReg = NULL ); // \ru Изменение направления кривой на противоположное. \en Set the opposite direction of curve. // \ru Определить, является ли кривая репараметризованно такой же. \en Define whether a reparameterized curve is the same. virtual bool IsReparamSame( const MbCurve & curve, double & factor ) const; @@ -766,9 +766,9 @@ public : virtual double PointProjection( const MbCartPoint & pnt ) const; // \ru Найти проекцию точки на кривую. \en Find the point projection to the curve. virtual bool NearPointProjection( const MbCartPoint & pnt, double xEpsilon, double yEpsilon, - double & t, bool ext, MbRect1D * tRange = c3d_null ) const; + double & t, bool ext, MbRect1D * tRange = NULL ) const; - virtual bool IsContinuousDerivative( bool & contLength, bool & contDirect, c3d::DoubleVector * params = c3d_null, double epsilon = EPSILON ) const; // \ru Непрерывна ли первая производная? \en Have the first derivative the continuous? + virtual bool IsContinuousDerivative( bool & contLength, bool & contDirect, c3d::DoubleVector * params = NULL, double epsilon = EPSILON ) const; // \ru Непрерывна ли первая производная? \en Have the first derivative the continuous? // \ru Устранить разрывы первых производных по длине. \en Eliminate the discontinuities of the first derivative at length. virtual bool SetContinuousDerivativeLength( VERSION version, double epsilon = EPSILON ); @@ -888,7 +888,7 @@ public : void AddCurves( NurbsCurves & curves ) { for ( size_t i = 0, icount = curves.size(); i < icount; ++i ) { - if ( curves[i] != c3d_null ) + if ( curves[i] != NULL ) AddCurve( *curves[i] ); } } @@ -946,7 +946,7 @@ private: // \ru Системные методы. \en System methods. // \ru Расчет весовых функций и их первых производных. \en Calculation of weight functions and its first derivatives. ptrdiff_t WeightFunctions( double & x, CcArray & ) const; // \ru Вычисление шага аппроксимации в обе стороны. \en Calculation of approximation step in both directions. - double StepD( double & t, double sag, bool checkAngle = false, double angle = 0.0, MbNurbsAuxiliaryData * cache = c3d_null ) const; + double StepD( double & t, double sag, bool checkAngle = false, double angle = 0.0, MbNurbsAuxiliaryData * cache = NULL ) const; // \ru Вычисление шага аппроксимации сплайна второго порядка. \en Calculation of approximation step of second order spline. double PolylineStep( double t, bool half, MbNurbsAuxiliaryData * cache ) const; // \ru Уточнить проекцию \en Specify projection. @@ -981,12 +981,12 @@ MbNurbs::MbNurbs( size_t initDegree, bool initClosed, const PointsVector & initP closed = initClosed; degree = initDegree; // Степень В-сплайна. - if ( initWeights != c3d_null ) + if ( initWeights != NULL ) weights.assign( initWeights->begin(), initWeights->end() ); else weights.assign( initPoints.size(), 1.0 ); - if ( initKnots != c3d_null ) { + if ( initKnots != NULL ) { knots.assign( initKnots->begin(), initKnots->end() ); uppKnotsIndex = (ptrdiff_t)knots.size() - 1; } diff --git a/C3d/Include/cur_nurbs3d.h b/C3d/Include/cur_nurbs3d.h index 01fe17f..442bec4 100644 --- a/C3d/Include/cur_nurbs3d.h +++ b/C3d/Include/cur_nurbs3d.h @@ -127,7 +127,7 @@ protected: */ MbNurbs3D( size_t deg, bool cls, const SArray & points, - const SArray * weights = c3d_null, const SArray * knots = c3d_null ); + const SArray * weights = NULL, const SArray * knots = NULL ); MbNurbs3D( const MbNurbs3D & ); public : virtual ~MbNurbs3D(); @@ -171,7 +171,7 @@ public : \en Returns pointer to the created object or null pointer in case of failure. \~ */ static MbNurbs3D * Create( size_t degree, const SArray & points, bool closed, - const SArray * weights = c3d_null ); + const SArray * weights = NULL ); /** \brief \ru Создать сплайн. \en Create spline. \~ \details \ru Создать сплайн и установить параметры сплайна.\n @@ -238,7 +238,7 @@ public : \en Returns pointer to the created object or null pointer in case of failure. \~ */ static MbNurbs3D * CreateThrough( size_t degree, bool cls, const SArray & points, - const SArray & params, SArray * aKnots = c3d_null ); + const SArray & params, SArray * aKnots = NULL ); /** \brief \ru Заполнить NURBS по данным parasolid. \en Fill NURBS by parasolid data. \~ \details \ru Заполнить NURBS по данным parasolid.\n @@ -294,7 +294,7 @@ public: \en Closedness attribute. \~ */ bool Init( size_t degree, const SArray & points, bool closed, - const SArray * weights = c3d_null ); + const SArray * weights = NULL ); /** \brief \ru Инициализация. \en Initialization. \~ \details \ru Установить параметры сплайна.\n @@ -386,11 +386,9 @@ public: \param[in] endData - \ru Параметр сопряжения в конечной точке сплайна. \en Parameter of conjugation at the end point of the spline. \~ */ - bool Init( size_t degree, - const SArray & points, - const SArray & weights, - c3d::PntMatingData3D & begData, - c3d::PntMatingData3D & endData ); + bool Init( size_t degree, const SArray & points, const SArray & weights, + MbPntMatingData & begData, + MbPntMatingData & endData ); /** \brief \ru Инициализация. \en Initialization. \~ \details \ru Установить параметры сплайна.\n @@ -428,19 +426,19 @@ public: \en Nondecreasing sequence of knots. \~ */ bool InitThrough( size_t degree, bool cls, const SArray & points, - const SArray & params, SArray * aKnots = c3d_null ); + const SArray & params, SArray * aKnots = NULL ); /// \ru Установить тип формы. \en Set the type of shape. void SetFormType( MbeNurbsCurveForm f ) { form = f; } // \ru Общие функции математического объекта. \en The common functions of the mathematical object. virtual MbeSpaceType IsA() const; // \ru Тип элемента. \en A type of element. - virtual MbSpaceItem & Duplicate( MbRegDuplicate * = c3d_null ) const ; // \ru Сделать копию элемента. \en Create a copy of the element. + virtual MbSpaceItem & Duplicate( MbRegDuplicate * = NULL ) const ; // \ru Сделать копию элемента. \en Create a copy of the element. virtual bool IsSame ( const MbSpaceItem & other, double accuracy = LENGTH_EPSILON ) const; // \ru Является ли кривая копией данной кривой? \en Whether the curve is a duplicate of the current curve. virtual bool SetEqual ( const MbSpaceItem & ); // \ru Сделать равным. \en Make equal. - virtual void Transform( const MbMatrix3D &, MbRegTransform * = c3d_null ); // \ru Преобразовать элемент согласно матрице. \en Transform element according to the matrix. - virtual void Move ( const MbVector3D &, MbRegTransform * = c3d_null ); // \ru Сдвиг. \en Move. - virtual void Rotate ( const MbAxis3D &, double angle, MbRegTransform * = c3d_null ); // \ru Повернуть вокруг оси. \en Rotate around an axis. + virtual void Transform( const MbMatrix3D &, MbRegTransform * = NULL ); // \ru Преобразовать элемент согласно матрице. \en Transform element according to the matrix. + virtual void Move ( const MbVector3D &, MbRegTransform * = NULL ); // \ru Сдвиг. \en Move. + virtual void Rotate ( const MbAxis3D &, double angle, MbRegTransform * = NULL ); // \ru Повернуть вокруг оси. \en Rotate around an axis. virtual void GetProperties( MbProperties & ); // \ru Выдать свойства объекта. \en Get properties of the object. virtual void SetProperties( const MbProperties & ); // \ru Записать свойства объекта. \en Set properties of the object. @@ -477,12 +475,12 @@ public: virtual double GetRadius() const; // \ru Дать физический радиус объекта или ноль, если это невозможно. \en Get the physical radius of the object or null if it impossible. virtual bool GetCircleAxis ( MbAxis3D & ) const; // \ru Дать ось кривой \en Get the axis of the curve // \ru Дать плоскую кривую и плейсмент, если пространственная кривая плоская (после использования вызывать DeleteItem на двумерную кривую). \en Get a planar curve and placement, if the spatial curve is planar (after using the DeleteItem must be called for a two-dimensional curve) - virtual bool GetPlaneCurve( MbCurve *& curve2d, MbPlacement3D & place, bool saveParams, PlanarCheckParams params = PlanarCheckParams() ) const; + virtual bool GetPlaneCurve( MbCurve *& curve2d, MbPlacement3D & place, bool saveParams, VERSION version = Math::DefaultMathVersion() ) const; // \ru Ближайшая проекция точки на кривую. \en The nearest projection of a point onto the curve. - virtual bool NearPointProjection( const MbCartPoint3D &, double & t, bool ext, MbRect1D * tRange = c3d_null ) const; + virtual bool NearPointProjection( const MbCartPoint3D &, double & t, bool ext, MbRect1D * tRange = NULL ) const; virtual void Refresh(); // \ru Сбросить все временные данные. \en Reset all temporary data. - virtual void Inverse( MbRegTransform * iReg = c3d_null ); // \ru Изменить направление. \en Change the direction. + virtual void Inverse( MbRegTransform * iReg = NULL ); // \ru Изменить направление. \en Change the direction. // \ru Определить, является ли кривая репараметризованно такой же. \en Determine whether a reparameterized curve is the same. virtual bool IsReparamSame( const MbCurve3D & curve, double & factor ) const; @@ -523,7 +521,7 @@ public: virtual double GetParam( ptrdiff_t i ) const; // \ru Выдать параметр для точки с заданным номером. \en Get parameter for a point with the given index. virtual void ResetTCalc() const; // \ru Сбросить текущее значение параметра \en Reset the current value of the parameter - virtual bool IsContinuousDerivative( bool & contLength, bool & contDirect, c3d::DoubleVector * params = c3d_null, double epsilon = EPSILON ) const; // \ru Непрерывна ли первая производная? \en Have the first derivative the continuous? + virtual bool IsContinuousDerivative( bool & contLength, bool & contDirect, c3d::DoubleVector * params = NULL, double epsilon = EPSILON ) const; // \ru Непрерывна ли первая производная? \en Have the first derivative the continuous? // \ru Устранить разрывы первых производных по длине. \en Eliminate the discontinuities of the first derivative at length. virtual bool SetContinuousDerivativeLength( VERSION version, double epsilon = EPSILON ); @@ -607,30 +605,28 @@ public: // \ru Функции только 3D кривой. \en Functions of 3D curve only. - virtual MbCurve * GetMap( const MbMatrix3D &, MbRect1D * pRgn = c3d_null, - VERSION version = Math::DefaultMathVersion(), bool * coincParams = c3d_null ) const; // \ru Дать плоскую проекцию кривой. \en Get a planar projection of a curve. + virtual MbCurve * GetMap( const MbMatrix3D &, MbRect1D * pRgn = NULL, + VERSION version = Math::DefaultMathVersion(), bool * coincParams = NULL ) const; // \ru Дать плоскую проекцию кривой. \en Get a planar projection of a curve. virtual size_t GetCount() const; // \ru Количество разбиений для прохода в операциях с поверхностями. \en Count of subdivisions for pass in operations with surfaces. /// \ru Установить сопряжение на конце. \en Set conjugation at the end. - bool AttachG( c3d::PntMatingData3D & connectData, bool beg, bool isWrongAttachG1_K12 = false ); + bool AttachG( MbPntMatingData & connectData, bool beg, bool isWrongAttachG1_K12 = false ); /// \ru Создать кубический NURBS по точкам, через которые он проходит, и параметрам сопряжения. \en Create cubic NURBS by parameters of conjugation and points which it passes through. - static MbNurbs3D * CreateNURBS4( const SArray & points, - MbeSplineParamType spType, - const c3d::PntMatingData3D & begData, - const c3d::PntMatingData3D & endData, - MbeSplineCreateType useInitThrough ); + static MbNurbs3D * CreateNURBS4( const SArray &, MbeSplineParamType spType, + const MbPntMatingData & begData, + const MbPntMatingData & endData, + MbeSplineCreateType useInitThrough ); /// \ru Создать кубический NURBS по интерполяционным точкам и данным сопряжения в каждой точке. \en Create cubic NURBS by interpolation points and data of conjugation at each point. - static MbNurbs3D * CreateNURBS4( const SArray & points, - MbeSplineParamType spType, - bool closed, - RPArray & matingData, - MbeSplineCreateType useInitThrough ); + static MbNurbs3D * CreateNURBS4( const SArray &, MbeSplineParamType spType, + bool closed, + RPArray< MbPntMatingData > &, + MbeSplineCreateType useInitThrough ); /// \ru Создать кубический NURBS по интерполяционным точкам, их параметрам и данным сопряжения в каждой точке. \en Create cubic NURBS by interpolation points, parameters and data of conjugation at each point. static MbNurbs3D * CreateNURBS4( const SArray &, const SArray &, bool closed, - RPArray &, + RPArray< MbPntMatingData > &, MbeSplineCreateType useInitThrough ); /// \ru Создать кубический NURBS по точкам, через которые он проходит, и признаку замкнутости. \en Create a cubic NURBS by the attribute of closedness and points which it passes through. static MbNurbs3D * CreateNURBS4( const SArray &, bool cls, MbeSplineParamType spType, @@ -694,11 +690,9 @@ public: \details \ru Создать сплайн произвольного порядка через точки, с управлением касательными и кривизной в этих точках. \en Create a spline of any order containing the given points with managing of tangent and curvature at these points.\~ */ - static MbNurbs3D * CreateNURBS( size_t initDegree, - const SArray & initPoints, - const SArray & initParams, - bool initClosed, - RPArray & matingData ); + static MbNurbs3D * CreateNURBS( size_t initDegree, const SArray & initPoints, + const SArray & initParams, bool initClosed, + RPArray> & matingData ); /** \brief \ru Разбить кривую. \en Split the curve. \~ \details \ru Разбить недифференцируемую NURBS-кривую четвертой степени в трижды кратном внутреннем узле.\n @@ -753,42 +747,39 @@ private: // \ru BEG: Внутренние функции CreateNURBS4 по двум сопряжениям. \en BEG: Internal CreateNURBS4 functions by two conjugations. // \ru Создать интерполяционный кубический NURBS, удовлетворяющий условиям сопряжения по касательным. \en Create an interpolation cubic NURBS meeting conditions of conjugation by tangents. - bool AttachG1_NURBS4( const SArray & points, - const SArray & params, - const c3d::PntMatingData3D & begData, - const c3d::PntMatingData3D & endData ); + bool AttachG1_NURBS4( const SArray &, const SArray & params, + const MbPntMatingData & begData, + const MbPntMatingData & endData ); // \ru Создать интерполяционный кубический NURBS, удовлетворяющий условиям сопряжения со вторым порядком гладкости. \en Create an interpolation cubic NURBS meeting conditions of conjugation with the second order of smoothness. - bool AttachG2_NURBS4( const SArray & points, - const SArray & params, - const c3d::PntMatingData3D & begData, - const c3d::PntMatingData3D & endData ); + bool AttachG2_NURBS4( const SArray &, const SArray & params, + const MbPntMatingData & begData, + const MbPntMatingData & endData ); // \ru END: Внутренние функции CreateNURBS4 по двум сопряжениям. \en END: Internal CreateNURBS4 functions by two conjugations. // \ru BEG: Внутренние функции CreateNURBS4 по массиву сопряжений. \en BEG: Internal CreateNURBS4 functions by an array of conjugations. // \ru Построение интерполяционного NURBS4 с возможными заданными управляющими параметрами. \en Create an interpolation NURBS4 with possibly given driving parameters. - bool CreateC2_NURBS4( const SArray & points, - MbeSplineParamType spType, - RPArray & inferredData, - const SArray & params, - MbeSplineCreateType useInitThrough, - bool cls = false ); + bool CreateC2_NURBS4( const SArray &, MbeSplineParamType spType, + RPArray< MbPntMatingData > &, + const SArray &, + MbeSplineCreateType useInitThrough, + bool cls = false ); // \ru Построение интерполяционного незамкнутого NURBS4 в общем случае \en Create an interpolation open NURBS4 in general case // \ru С возможными заданными управляющими параметрами в средних точках. \en With possibly given driving parameters at middle points. // \ru Считаем, что данные для сопряжений заданы корректно. Этот факт проверяется до запуска функции. \en Consider that the given data for conjugations is correct. This fact is checked before calling the function. - static MbNurbs3D * CreateC2Nurbs4Common( const SArray & points, - RPArray & inferredData, - const SArray & params, - const SArray & knots, - size_t addCount, - bool cls, - MbeSplineCreateType useInitThrough, - size_t deg = 4 ); + static MbNurbs3D * CreateC2Nurbs4Common( const SArray & arPoints, + RPArray< MbPntMatingData > & inferredData, + const SArray & arParams, + const SArray & arKnots, + size_t addCount, + bool cls, + MbeSplineCreateType useInitThrough, + size_t deg = 4 ); // \ru END: Внутренние функции CreateNURBS4 по массиву сопряжений. \en END: Internal CreateNURBS4 functions by an array of conjugations. // \ru Расчет весовых функций и их первых производных. \en Calculation of weight functions and their first derivatives. ptrdiff_t WeightFunctions ( double & x, CcArray & m ) const; /// \ru Вычисление шага аппроксимации. \en Calculation of a step of approximation. - double StepD( double t, double sag, bool checkAngle, double angle = Math::lowRenderAng, MbNurbs3DAuxiliaryData * cache = c3d_null ) const; + double StepD( double t, double sag, bool checkAngle, double angle = Math::lowRenderAng, MbNurbs3DAuxiliaryData * cache = NULL ) const; // \ru Вычисление шага аппроксимации сплайна второго порядка. \en Calculation of approximation step of second order spline. double PolylineStep( double t, bool half, MbNurbs3DAuxiliaryData * cache ) const; // \ru Уточнить проекцию \en Specify projection. diff --git a/C3d/Include/cur_nurbs_vector.h b/C3d/Include/cur_nurbs_vector.h index fb15fd8..2832663 100644 --- a/C3d/Include/cur_nurbs_vector.h +++ b/C3d/Include/cur_nurbs_vector.h @@ -29,7 +29,7 @@ public: double * w; public: - MbNURBSVector2D() : x( c3d_null ), y( c3d_null ), w( c3d_null ) {} + MbNURBSVector2D() : x( NULL ), y( NULL ), w( NULL ) {} ~MbNURBSVector2D(); // \ru освободить память \en free memory public: @@ -51,7 +51,7 @@ private: // // --- inline void MbNURBSVector2D::Init( ptrdiff_t i, const MbCartPoint &ip, double iw ) { - if ( w != c3d_null ) { + if ( w != NULL ) { x[i] = ( ip.x * iw ); y[i] = ( ip.y * iw ); w[i] = iw; @@ -69,7 +69,7 @@ inline void MbNURBSVector2D::Init( ptrdiff_t i, const MbCartPoint &ip, double iw inline void MbNURBSVector2D::SetZero( ptrdiff_t i ) { x[i] = 0.0; y[i] = 0.0; - if ( w != c3d_null ) + if ( w != NULL ) w[i] = 0.0; } @@ -80,7 +80,7 @@ inline void MbNURBSVector2D::SetZero( ptrdiff_t i ) { inline void MbNURBSVector2D::Set( ptrdiff_t i, const MbNURBSVector2D &p, ptrdiff_t ip ) { x[i] = p.x[ip]; y[i] = p.y[ip]; - if ( w != c3d_null ) + if ( w != NULL ) w[i] = p.w[ip]; } @@ -95,7 +95,7 @@ inline void MbNURBSVector2D::Dec( ptrdiff_t i, { x[i] = ( (p2.x[ip2] - p1.x[ip1]) * kk ); y[i] = ( (p2.y[ip2] - p1.y[ip1]) * kk ); - if ( w != c3d_null ) + if ( w != NULL ) w[i] = ( (p2.w[ip2] - p1.w[ip1]) * kk ); } @@ -107,7 +107,7 @@ inline void MbNURBSVector2D::Set( ptrdiff_t i, const MbNURBSVector2D & p, ptrdif { x[i] = ( p.x[ip] * kk ); y[i] = ( p.y[ip] * kk ); - if ( w != c3d_null ) + if ( w != NULL ) w[i] = ( p.w[ip] * kk ); } diff --git a/C3d/Include/cur_nurbs_vector3d.h b/C3d/Include/cur_nurbs_vector3d.h index 2a2c85f..0476a22 100644 --- a/C3d/Include/cur_nurbs_vector3d.h +++ b/C3d/Include/cur_nurbs_vector3d.h @@ -212,7 +212,7 @@ inline void MbNURBSVector::Set( ptrdiff_t i, const MbNURBSVector & p, ptrdiff_t inline void MbNURBSVector::Set( ptrdiff_t i, const DoubleTriple * t, double * ww, ptrdiff_t ip ) { _vec[i].Init( t[ip].x , t[ip].y , t[ip].z ); - if ( useWeights && ww != c3d_null ) + if ( useWeights && ww != NULL ) w(i) = ww[ip]; } diff --git a/C3d/Include/cur_offset_curve.h b/C3d/Include/cur_offset_curve.h index 7ef7470..00e0471 100644 --- a/C3d/Include/cur_offset_curve.h +++ b/C3d/Include/cur_offset_curve.h @@ -40,7 +40,7 @@ class MbRegTransform; // --- class MATH_CLASS MbOffsetCurve : public MbCurve { protected : - MbCurve * basisCurve; ///< \ru Базовая кривая (всегда не c3d_null) \en Base curve (always not c3d_null). + MbCurve * basisCurve; ///< \ru Базовая кривая (всегда не NULL) \en Base curve (always not NULL). double tmin; ///< \ru Начальный параметр basisCurve. \en Start parameter of basisCurve. double tmax; ///< \ru Конечный параметр basisCurve. \en End parameter of basisCurve. bool closed; ///< \ru Замкнутость basisCurve. \en Closedness of basisCurve. @@ -102,10 +102,10 @@ public : virtual MbePlaneType IsA() const; // \ru Тип элемента \en Type of element virtual bool IsSimilar ( const MbPlaneItem & ) const; // \ru Являются ли элементы подобными \en Whether the elements are similar virtual bool SetEqual( const MbPlaneItem & ); // \ru Сделать элементы равными \en Make equal elements - virtual MbPlaneItem & Duplicate( MbRegDuplicate * = c3d_null ) const; // \ru Сделать копию элемента \en Create a copy of the element - virtual void Transform( const MbMatrix & matr, MbRegTransform * ireg = c3d_null, const MbSurface * newSurface = c3d_null ); // \ru Преобразовать элемент согласно матрице \en Transform element according to the matrix - virtual void Move( const MbVector & to, MbRegTransform * = c3d_null, const MbSurface * newSurface = c3d_null ); // \ru Сдвиг \en Translation - virtual void Rotate( const MbCartPoint & pnt, const MbDirection & angle, MbRegTransform * = c3d_null, const MbSurface * newSurface = c3d_null ); // \ru Поворот \en Rotation + virtual MbPlaneItem & Duplicate( MbRegDuplicate * = NULL ) const; // \ru Сделать копию элемента \en Create a copy of the element + virtual void Transform( const MbMatrix & matr, MbRegTransform * ireg = NULL, const MbSurface * newSurface = NULL ); // \ru Преобразовать элемент согласно матрице \en Transform element according to the matrix + virtual void Move( const MbVector & to, MbRegTransform * = NULL, const MbSurface * newSurface = NULL ); // \ru Сдвиг \en Translation + virtual void Rotate( const MbCartPoint & pnt, const MbDirection & angle, MbRegTransform * = NULL, const MbSurface * newSurface = NULL ); // \ru Поворот \en Rotation virtual bool IsSame( const MbPlaneItem & other, double accuracy = LENGTH_EPSILON ) const; // \ru Является ли кривая curve копией данной кривой ? \en Whether the 'curve' curve is duplicate of current curve. virtual void AddYourGabaritTo( MbRect & ) const; // \ru Добавь свой габарит в прямой прям-к \en Add bounding box into a straight box @@ -192,7 +192,7 @@ public : \{ */ virtual bool IsStraight( bool ignoreParams = false ) const; // \ru Является ли линия прямолинейной \en Whether the line is straight virtual MbCurve * Offset( double rad ) const; // \ru Смещение смещенной кривой \en Offset of the offset curve - virtual void Inverse( MbRegTransform * iReg = c3d_null ); // \ru Изменение направления кривой на противоположное \en Change to the opposite direction of a curve + virtual void Inverse( MbRegTransform * iReg = NULL ); // \ru Изменение направления кривой на противоположное \en Change to the opposite direction of a curve virtual void Refresh(); // \ru Сбросить все временные данные \en Reset all temporary data virtual void PrepareIntegralData( const bool forced ) const; // \ru Рассчитать временные (mutable) данные объекта. \en Calculate temporary (mutable) data of an object. @@ -237,7 +237,7 @@ public : virtual void GetBasisPoints( MbControlData & ) const; // \ru Выдать контрольные точки объекта. \en Get control points of object. virtual void SetBasisPoints( const MbControlData & ); // \ru Изменить объект по контрольным точкам. \en Change the object by control points. - virtual bool IsContinuousDerivative( bool & contLength, bool & contDirect, c3d::DoubleVector * params = c3d_null, double epsilon = EPSILON ) const; // \ru Непрерывна ли первая производная? \en Have the first derivative the continuous? + virtual bool IsContinuousDerivative( bool & contLength, bool & contDirect, c3d::DoubleVector * params = NULL, double epsilon = EPSILON ) const; // \ru Непрерывна ли первая производная? \en Have the first derivative the continuous? // \ru Устранить разрывы первых производных по длине. \en Eliminate the discontinuities of the first derivative at length. virtual bool SetContinuousDerivativeLength( VERSION version, double epsilon = EPSILON ); diff --git a/C3d/Include/cur_offset_curve3d.h b/C3d/Include/cur_offset_curve3d.h index b108bea..2cf0a1a 100644 --- a/C3d/Include/cur_offset_curve3d.h +++ b/C3d/Include/cur_offset_curve3d.h @@ -103,7 +103,7 @@ public: // \ru Общие функции математического объекта \en Common functions of the mathematical object virtual MbeSpaceType IsA() const; // \ru Тип элемента \en Type of element - virtual MbSpaceItem & Duplicate( MbRegDuplicate * = c3d_null ) const; // \ru Сделать копию элемента \en Create a copy of the element + virtual MbSpaceItem & Duplicate( MbRegDuplicate * = NULL ) const; // \ru Сделать копию элемента \en Create a copy of the element virtual bool IsSame ( const MbSpaceItem & other, double accuracy = LENGTH_EPSILON ) const; virtual bool SetEqual ( const MbSpaceItem & ); // \ru Сделать равным \en Make equal virtual bool IsSimilar( const MbSpaceItem & ) const; // \ru Являются ли объекты подобными \en Whether the objects are similar @@ -147,16 +147,16 @@ public: virtual const MbCurve3D & GetBasisCurve() const; virtual MbCurve3D & SetBasisCurve(); //virtual MbCurve3D * Trimmed( double t1, double t2, int sense ) const; // \ru Создание усеченной кривой \en Creation of a trimmed curve - virtual void Inverse( MbRegTransform * iReg = c3d_null ); // \ru Изменить направление \en Change direction + virtual void Inverse( MbRegTransform * iReg = NULL ); // \ru Изменить направление \en Change direction virtual size_t GetCount() const; virtual void ChangeCarrier( const MbSpaceItem & item, MbSpaceItem & init ); // \ru Изменение носителя \en Changing of carrier virtual bool IsStraight( bool ignoreParams = false ) const; // \ru Является ли линия прямолинейной \en Whether the line is straight - virtual bool IsPlanar ( double accuracy = METRIC_EPSILON ) const; // \ru Является ли кривая плоской \en Whether a curve is planar + virtual bool IsPlanar () const; // \ru Является ли кривая плоской \en Whether a curve is planar - virtual bool GetPlacement( MbPlacement3D & place, PlanarCheckParams params = PlanarCheckParams() ) const; // \ru Заполнить плейсемент, ести кривая плоская \en Fill the placement if curve is planar + virtual bool GetPlacement( MbPlacement3D & place, VERSION version = Math::DefaultMathVersion() ) const; // \ru Заполнить плейсемент, ести кривая плоская \en Fill the placement if curve is planar - virtual bool IsContinuousDerivative( bool & contLength, bool & contDirect, c3d::DoubleVector * params = c3d_null, double epsilon = EPSILON ) const; // \ru Непрерывна ли первая производная? \en Have the first derivative the continuous? + virtual bool IsContinuousDerivative( bool & contLength, bool & contDirect, c3d::DoubleVector * params = NULL, double epsilon = EPSILON ) const; // \ru Непрерывна ли первая производная? \en Have the first derivative the continuous? // \ru Устранить разрывы первых производных по длине. \en Eliminate the discontinuities of the first derivative at length. virtual bool SetContinuousDerivativeLength( VERSION version, double epsilon = EPSILON ); diff --git a/C3d/Include/cur_plane_curve.h b/C3d/Include/cur_plane_curve.h index c5b1632..fef1f09 100644 --- a/C3d/Include/cur_plane_curve.h +++ b/C3d/Include/cur_plane_curve.h @@ -36,7 +36,7 @@ class MATH_CLASS MbContour; class MATH_CLASS MbPlaneCurve : public MbCurve3D { protected : MbPlacement3D position; ///< \ru Локальная система координат, в плоскости XY которой расположена кривая. \en The local coordinate system in XY plane of which the curve is located. - MbCurve * curve; ///< \ru Двумерная кривая (не может быть c3d_null). \en A two-dimensional uv-curve (can not be c3d_null). + MbCurve * curve; ///< \ru Двумерная кривая (не может быть NULL). \en A two-dimensional uv-curve (can not be NULL). public : /// \ru same = false - копировать кривую init. \en Same = false - copy the curve "init". @@ -55,13 +55,13 @@ public : // \ru Общие функции математического объекта \en Common functions of the mathematical object virtual MbeSpaceType IsA() const; // \ru Тип элемента \en Type of element - virtual MbSpaceItem & Duplicate( MbRegDuplicate * = c3d_null ) const ; // \ru Сделать копию элемента \en Create a copy of the element + virtual MbSpaceItem & Duplicate( MbRegDuplicate * = NULL ) const ; // \ru Сделать копию элемента \en Create a copy of the element virtual bool IsSame ( const MbSpaceItem & other, double accuracy = LENGTH_EPSILON ) const; // \ru Является ли объект копией \en Whether the object is a copy virtual bool SetEqual ( const MbSpaceItem & ); // \ru Сделать равным \en Make equal virtual bool IsSimilar( const MbSpaceItem & ) const; // \ru Являются ли объекты подобными \en Whether the objects are similar - virtual void Transform( const MbMatrix3D &, MbRegTransform * = c3d_null ); // \ru Преобразовать \en Transform. - virtual void Move ( const MbVector3D &, MbRegTransform * = c3d_null ); // \ru Сдвиг \en Translation - virtual void Rotate ( const MbAxis3D &, double angle, MbRegTransform * = c3d_null ); // \ru Повернуть вокруг оси \en Rotate about an axis + virtual void Transform( const MbMatrix3D &, MbRegTransform * = NULL ); // \ru Преобразовать \en Transform. + virtual void Move ( const MbVector3D &, MbRegTransform * = NULL ); // \ru Сдвиг \en Translation + virtual void Rotate ( const MbAxis3D &, double angle, MbRegTransform * = NULL ); // \ru Повернуть вокруг оси \en Rotate about an axis virtual double DistanceToPoint( const MbCartPoint3D & ) const; // \ru Расстояние до точки \en Distance to a point virtual void PrepareIntegralData( const bool forced ) const; // \ru Рассчитать временные (mutable) данные объекта. \en Calculate temporary (mutable) data of an object. @@ -101,8 +101,8 @@ public : virtual MbCurve3D * Trimmed( double t1, double t2, int sense ) const; // \ru Создание усеченной кривой \en Creation of a trimmed curve - virtual void Inverse( MbRegTransform * iReg = c3d_null ); // \ru Изменить направление \en Change direction - virtual bool NearPointProjection( const MbCartPoint3D &, double & t, bool ext, MbRect1D * tRange = c3d_null ) const; // \ru Ближайшая проекция точки на кривую \en The nearest point projection to the curve + virtual void Inverse( MbRegTransform * iReg = NULL ); // \ru Изменить направление \en Change direction + virtual bool NearPointProjection( const MbCartPoint3D &, double & t, bool ext, MbRect1D * tRange = NULL ) const; // \ru Ближайшая проекция точки на кривую \en The nearest point projection to the curve virtual double Curvature( double ) const; // \ru Кривизна кривой \en Curvature of the curve virtual double Step ( double t, double sag ) const; // \ru Вычисление шага по стрелке прогиба. \en Calculation of parameter step by the sag. virtual double DeviationStep( double t, double angle ) const; // \ru Вычисление шага по углу отклонения нормали. \en Calculation of parameter step by the deviation angle. @@ -119,15 +119,15 @@ public : /// \en Get the boundaries of the curve sections that are described by one analytical function. \~ virtual void GetAnalyticalFunctionsBounds( std::vector & params ) const; - virtual bool IsPlanar( double accuracy = METRIC_EPSILON ) const; // \ru Является ли кривая плоской \en Whether a curve is planar + virtual bool IsPlanar() const; // \ru Является ли кривая плоской \en Whether a curve is planar virtual bool IsSmoothConnected( double angleEps ) const; // \ru Являются ли стыки контура\кривой гладкими? \en Whether the joints of contour\curve are smooth. // \ru Ближайшая точка кривой к плейсменту \en The nearest point of a curve by the placement virtual double DistanceToPlace( const MbPlacement3D & place, double & t0, double & angle ) const; - virtual MbCurve * GetMap( const MbMatrix3D &, MbRect1D * pRgn = c3d_null, - VERSION version = Math::DefaultMathVersion(), bool * coincParams = c3d_null ) const; // \ru Дать плоскую проекцию кривой \en Get a planar projection of curve + virtual MbCurve * GetMap( const MbMatrix3D &, MbRect1D * pRgn = NULL, + VERSION version = Math::DefaultMathVersion(), bool * coincParams = NULL ) const; // \ru Дать плоскую проекцию кривой \en Get a planar projection of curve virtual MbCurve * GetMapPsp( const MbMatrix3D &, double zNear, - MbRect1D * pRgn = c3d_null ) const; + MbRect1D * pRgn = NULL ) const; virtual double GetRadius() const; // \ru Дать физический радиус объекта или ноль, если это невозможно. \en Get the physical radius of the object or null if it impossible. virtual bool GetCircleAxis ( MbAxis3D & ) const; // \ru Дать ось кривой \en Get the curve axis @@ -141,11 +141,11 @@ public : virtual void CalculateLocalGabarit( const MbMatrix3D &, MbCube & ) const; // \ru Рассчитать габарит относительно л.с.к. \en Calculate bounding box relative to the local coordinate system. // \ru Дать плоскую кривую и плейсмент, если пространственная кривая плоская (после использования вызывать DeleteItem на двумерную кривую) \en Give a planar curve and placement, if the spatial curve is planar (after using the DeleteItem must be called for a two-dimensional curve) - virtual bool GetPlaneCurve( MbCurve *& curve2d, MbPlacement3D & place, bool saveParams, PlanarCheckParams params = PlanarCheckParams() ) const; + virtual bool GetPlaneCurve( MbCurve *& curve2d, MbPlacement3D & place, bool saveParams, VERSION version = Math::DefaultMathVersion() ) const; // \ru Дать поверхностную кривую, если пространственная кривая поверхностная (после использования вызывать DeleteItem на аргументы) \en Get a surface curve if spatial curve is lying on the surface (after the using call DeleteItem for arguments) virtual bool GetSurfaceCurve( MbCurve *& curve2d, MbSurface *& surface, VERSION version = Math::DefaultMathVersion() ) const; // \ru Заполнить плейсемент, если кривая плоская \en Fill the placement if curve is planar - virtual bool GetPlacement( MbPlacement3D & place, PlanarCheckParams params = PlanarCheckParams() ) const; + virtual bool GetPlacement( MbPlacement3D & place, VERSION version = Math::DefaultMathVersion() ) const; MbCurve * GetCurve ( const MbPlacement3D & , MbMatrix & ) const; // \ru Дать плоскую кривую \en Get the plane curve MbCurve * MakeCurve( const MbPlacement3D & ) const; @@ -163,7 +163,7 @@ public : virtual bool IsShift( const MbSpaceItem &, MbVector3D &, bool & isSame, double accuracy = LENGTH_EPSILON ) const; virtual bool IsSimilarToCurve( const MbCurve3D & curve, double precision = METRIC_PRECISION ) const; // \ru Подобные ли кривые для объединения (слива) \en Whether the curves are similar for merge (joining) - virtual bool IsContinuousDerivative( bool & contLength, bool & contDirect, c3d::DoubleVector * params = c3d_null, double epsilon = EPSILON ) const; // \ru Непрерывна ли первая производная? \en Have the first derivative the continuous? + virtual bool IsContinuousDerivative( bool & contLength, bool & contDirect, c3d::DoubleVector * params = NULL, double epsilon = EPSILON ) const; // \ru Непрерывна ли первая производная? \en Have the first derivative the continuous? // \ru Устранить разрывы первых производных по длине. \en Eliminate the discontinuities of the first derivative at length. virtual bool SetContinuousDerivativeLength( VERSION version, double epsilon = EPSILON ); diff --git a/C3d/Include/cur_point_curve.h b/C3d/Include/cur_point_curve.h index 44908b9..3488e36 100644 --- a/C3d/Include/cur_point_curve.h +++ b/C3d/Include/cur_point_curve.h @@ -65,10 +65,10 @@ public : virtual MbePlaneType IsA() const; // \ru Тип элемента \en Type of element virtual bool SetEqual( const MbPlaneItem & ); // \ru Сделать элементы равными \en Make equal elements - virtual MbPlaneItem & Duplicate( MbRegDuplicate * = c3d_null ) const; - virtual void Move ( const MbVector &, MbRegTransform * = c3d_null, const MbSurface * newSurface = c3d_null ); - virtual void Rotate( const MbCartPoint & pnt, const MbDirection & angle, MbRegTransform * = c3d_null, const MbSurface * newSurface = c3d_null ); // \ru Поворот \en Rotation - virtual void Transform( const MbMatrix &, MbRegTransform * ireg = c3d_null, const MbSurface * newSurface = c3d_null ); + virtual MbPlaneItem & Duplicate( MbRegDuplicate * = NULL ) const; + virtual void Move ( const MbVector &, MbRegTransform * = NULL, const MbSurface * newSurface = NULL ); + virtual void Rotate( const MbCartPoint & pnt, const MbDirection & angle, MbRegTransform * = NULL, const MbSurface * newSurface = NULL ); // \ru Поворот \en Rotation + virtual void Transform( const MbMatrix &, MbRegTransform * ireg = NULL, const MbSurface * newSurface = NULL ); virtual void AddYourGabaritTo ( MbRect & ) const; // \ru Добавь свой габарит в прямой прям-к \en Add bounding box into a straight box virtual void CalculateLocalGabarit( const MbMatrix & into, MbRect & local ) const; // \ru Добавь в прям-к свой габарит с учетом матрицы \en Add bounding box into a box with consideration of the matrix virtual double DistanceToPoint( const MbCartPoint & to ) const; // \ru Расстояние до точки \en Distance to a point @@ -131,7 +131,7 @@ public : \en \name Common function of curve \{ */ virtual double Curvature( double t ) const; // \ru Кривизна усеченной кривой \en Curvature of a trimmed curve - virtual void Inverse( MbRegTransform * iReg = c3d_null ); // \ru Изменить направление кривой \en Change direction of a curve + virtual void Inverse( MbRegTransform * iReg = NULL ); // \ru Изменить направление кривой \en Change direction of a curve virtual bool IsDegenerate( double eps = Math::LengthEps ) const; // \ru Проверка вырожденности \en Check for degeneracy virtual bool HasLength( double & length ) const; @@ -154,7 +154,7 @@ public : virtual MbeItemLocation PointRelative( const MbCartPoint & pnt, double eps = Math::LengthEps ) const; virtual double PointProjection( const MbCartPoint & pnt ) const; // \ru Проекция точки на отрезок \en Point projection on the line segment virtual bool NearPointProjection( const MbCartPoint & pnt, double xEpsilon, double yEpsilon, - double & t, bool ext, MbRect1D * tRange = c3d_null ) const; // \ru Проекция точки на кривую или её продолжение в области поиска проекции \en Point projection on the curve or its extension in the projection search area + double & t, bool ext, MbRect1D * tRange = NULL ) const; // \ru Проекция точки на кривую или её продолжение в области поиска проекции \en Point projection on the curve or its extension in the projection search area virtual void IntersectHorizontal( double y, SArray & cross ) const; // \ru Пересечение с горизонтальной прямой \en Intersection with the horizontal line virtual void IntersectVertical ( double x, SArray & cross ) const; // \ru Пересечение с вертикальной прямой \en Intersection with the vertical line diff --git a/C3d/Include/cur_polycurve.h b/C3d/Include/cur_polycurve.h index c456e39..b0e9227 100644 --- a/C3d/Include/cur_polycurve.h +++ b/C3d/Include/cur_polycurve.h @@ -54,10 +54,10 @@ public : virtual MbePlaneType Type() const; // \ru Тип элемента \en Type of element virtual bool SetEqual( const MbPlaneItem & ) = 0; // \ru Сделать элементы равными \en Make the elements equal virtual bool IsSame( const MbPlaneItem & other, double accuracy = LENGTH_EPSILON ) const = 0; // \ru Является ли кривая curve копией данной кривой ? \en Whether curve 'curve' is a duplicate of the current curve. - virtual void Transform( const MbMatrix & matr, MbRegTransform * ireg = c3d_null, const MbSurface * newSurface = c3d_null ) = 0; // \ru Преобразовать элемент согласно матрице \en Transform element according to the matrix - virtual void Move( const MbVector & to, MbRegTransform * = c3d_null, const MbSurface * newSurface = c3d_null ) = 0; // \ru Сдвиг \en Translation - virtual void Rotate( const MbCartPoint & pnt, const MbDirection & angle, MbRegTransform * = c3d_null, const MbSurface * newSurface = c3d_null ) = 0; // \ru Поворот \en Rotation - virtual MbPlaneItem & Duplicate( MbRegDuplicate * = c3d_null ) const = 0; // \ru Сделать копию элемента \en Create a copy of the element + virtual void Transform( const MbMatrix & matr, MbRegTransform * ireg = NULL, const MbSurface * newSurface = NULL ) = 0; // \ru Преобразовать элемент согласно матрице \en Transform element according to the matrix + virtual void Move( const MbVector & to, MbRegTransform * = NULL, const MbSurface * newSurface = NULL ) = 0; // \ru Сдвиг \en Translation + virtual void Rotate( const MbCartPoint & pnt, const MbDirection & angle, MbRegTransform * = NULL, const MbSurface * newSurface = NULL ) = 0; // \ru Поворот \en Rotation + virtual MbPlaneItem & Duplicate( MbRegDuplicate * = NULL ) const = 0; // \ru Сделать копию элемента \en Create a copy of the element virtual void AddYourGabaritTo( MbRect & r ) const; // \ru Добавь свой габарит в прямой прям-к \en Add your own gabarit into the given bounding rectangle virtual void Refresh(); // \ru Сбросить все временные данные \en Reset all temporary data virtual void PrepareIntegralData( const bool forced ) const; // \ru Рассчитать временные (mutable) данные объекта. \en Calculate temporary (mutable) data of an object. @@ -94,7 +94,7 @@ public : virtual bool IsStraight( bool ignoreParams = false ) const; // \ru Признак прямолинейности кривой \en An attribute of curve straightness. virtual bool HasLength( double & length ) const; - virtual void Inverse( MbRegTransform * iReg = c3d_null ) = 0; // \ru Изменение направления кривой на противоположное \en Change curve direction to the opposite one + virtual void Inverse( MbRegTransform * iReg = NULL ) = 0; // \ru Изменение направления кривой на противоположное \en Change curve direction to the opposite one virtual MbeState Deformation( const MbRect &, const MbMatrix & ); // \ru Деформация \en Deformation virtual bool IsInRectForDeform( const MbRect & r ) const; // \ru Виден ли объект в заданном прямоугольнике для деформации \en Whether the object is visible in the given rectangle for deformation diff --git a/C3d/Include/cur_polycurve3d.h b/C3d/Include/cur_polycurve3d.h index d4a85d0..a5bdf62 100644 --- a/C3d/Include/cur_polycurve3d.h +++ b/C3d/Include/cur_polycurve3d.h @@ -47,12 +47,12 @@ public : virtual MbeSpaceType IsA() const = 0; // \ru Тип элемента \en Type of element virtual MbeSpaceType Type() const; // \ru Тип элемента \en Type of element - virtual MbSpaceItem & Duplicate( MbRegDuplicate * = c3d_null ) const = 0; // \ru Сделать копию элемента \en Create a copy of the element + virtual MbSpaceItem & Duplicate( MbRegDuplicate * = NULL ) const = 0; // \ru Сделать копию элемента \en Create a copy of the element virtual bool IsSame ( const MbSpaceItem & other, double accuracy = LENGTH_EPSILON ) const = 0; virtual bool SetEqual ( const MbSpaceItem & ) = 0; // \ru Сделать равным \en Make equal - virtual void Transform( const MbMatrix3D &, MbRegTransform * = c3d_null ) = 0; // \ru Преобразовать элемент согласно матрице \en Transform element according to the matrix - virtual void Move ( const MbVector3D &, MbRegTransform * = c3d_null ) = 0; // \ru Сдвиг \en Translation - virtual void Rotate ( const MbAxis3D &, double angle, MbRegTransform * = c3d_null ) = 0; // \ru Повернуть вокруг оси \en Rotate about an axis + virtual void Transform( const MbMatrix3D &, MbRegTransform * = NULL ) = 0; // \ru Преобразовать элемент согласно матрице \en Transform element according to the matrix + virtual void Move ( const MbVector3D &, MbRegTransform * = NULL ) = 0; // \ru Сдвиг \en Translation + virtual void Rotate ( const MbAxis3D &, double angle, MbRegTransform * = NULL ) = 0; // \ru Повернуть вокруг оси \en Rotate about an axis virtual void AddYourGabaritTo( MbCube & ) const; // \ru Добавь свой габарит в куб \en Add your own bounding box into the cube virtual void PrepareIntegralData( const bool forced ) const; // \ru Рассчитать временные (mutable) данные объекта. \en Calculate temporary (mutable) data of an object. @@ -82,15 +82,15 @@ public : virtual double GetTMax() const = 0; // \ru Вернуть максимальное значение параметра \en Get the maximum value of parameter virtual double GetTMin() const = 0; // \ru Вернуть минимальное значение параметра \en Get the minimum value of parameter virtual bool IsClosed() const; // \ru Замкнутость кривой \en A curve closedness - virtual void Inverse( MbRegTransform * iReg = c3d_null ) = 0; // \ru Изменить направление \en Change direction + virtual void Inverse( MbRegTransform * iReg = NULL ) = 0; // \ru Изменить направление \en Change direction virtual double GetMetricLength() const; // \ru Выдать метрическую длину ограниченной кривой \en Get metric length of bounded curve virtual double GetLengthEvaluation() const; // \ru Оценка метрической длины кривой \en Estimation of metric length of the curve - virtual bool IsPlanar ( double accuracy = METRIC_EPSILON ) const; // \ru Является ли кривая плоской \en Whether the curve is planar - virtual bool GetPlacement( MbPlacement3D & place, PlanarCheckParams params = PlanarCheckParams() ) const; // \ru Заполнить плейсемент, ести кривая плоская \en Fill the placement if the curve is planar + virtual bool IsPlanar () const; // \ru Является ли кривая плоской \en Whether the curve is planar + virtual bool GetPlacement( MbPlacement3D & place, VERSION version = Math::DefaultMathVersion() ) const; // \ru Заполнить плейсемент, ести кривая плоская \en Fill the placement if the curve is planar // \ru Дать плоскую кривую и плейсмент, если пространственная кривая плоская (после использования вызывать DeleteItem на двумерную кривую) \en Get the planar curve and placement if the spatial curve is planar (call DeleteItem for two-dimensional curve after using) - virtual bool GetPlaneCurve( MbCurve *& curve2d, MbPlacement3D & place, bool saveParams, PlanarCheckParams params = PlanarCheckParams() ) const = 0; + virtual bool GetPlaneCurve( MbCurve *& curve2d, MbPlacement3D & place, bool saveParams, VERSION version = Math::DefaultMathVersion() ) const = 0; // \ru Общие функции полигональной кривой \en Common functions of polygonal curve diff --git a/C3d/Include/cur_polyline.h b/C3d/Include/cur_polyline.h index 9087c8c..616db77 100644 --- a/C3d/Include/cur_polyline.h +++ b/C3d/Include/cur_polyline.h @@ -51,7 +51,7 @@ public : MbPolyline( const MbCartPoint & p1, const MbCartPoint & p2 ) : MbPolyCurve() , segmentsCount( 1 ) - , searchTree( c3d_null ) + , searchTree( NULL ) { pointList.reserve( 2 ); pointList.push_back( p1 ); @@ -64,7 +64,7 @@ public : MbPolyline( const Points & initList, bool cls ) : MbPolyCurve() , segmentsCount( UNDEFINED_INT_T ) - , searchTree( c3d_null ) + , searchTree( NULL ) { Init( initList, cls ); } @@ -87,10 +87,10 @@ public : virtual MbePlaneType IsA() const; // \ru Тип элемента \en Type of element virtual bool SetEqual( const MbPlaneItem & ); // \ru Сделать элементы равными \en Make the elements equal virtual bool IsSame( const MbPlaneItem & other, double accuracy = LENGTH_EPSILON ) const; // \ru Является ли кривая curve копией данной кривой ? \en Whether curve 'curve' is a duplicate of the current curve. - virtual void Transform( const MbMatrix & matr, MbRegTransform * ireg = c3d_null, const MbSurface * newSurface = c3d_null ); // \ru Преобразовать элемент согласно матрице \en Transform element according to the matrix - virtual void Move( const MbVector & to, MbRegTransform * = c3d_null, const MbSurface * newSurface = c3d_null ); // \ru Сдвиг \en Translation - virtual void Rotate( const MbCartPoint & pnt, const MbDirection & angle, MbRegTransform * = c3d_null, const MbSurface * newSurface = c3d_null ); // \ru Поворот \en Rotation - virtual MbPlaneItem & Duplicate( MbRegDuplicate * = c3d_null ) const; // \ru Сделать копию элемента \en Create a copy of the element + virtual void Transform( const MbMatrix & matr, MbRegTransform * ireg = NULL, const MbSurface * newSurface = NULL ); // \ru Преобразовать элемент согласно матрице \en Transform element according to the matrix + virtual void Move( const MbVector & to, MbRegTransform * = NULL, const MbSurface * newSurface = NULL ); // \ru Сдвиг \en Translation + virtual void Rotate( const MbCartPoint & pnt, const MbDirection & angle, MbRegTransform * = NULL, const MbSurface * newSurface = NULL ); // \ru Поворот \en Rotation + virtual MbPlaneItem & Duplicate( MbRegDuplicate * = NULL ) const; // \ru Сделать копию элемента \en Create a copy of the element virtual void Refresh(); // \ru Сбросить все временные данные \en Reset all temporary data /** \} */ @@ -189,7 +189,7 @@ public : virtual bool IsStraight( bool ignoreParams = false ) const; // \ru Признак прямолинейности кривой \en An attribute of curve straightness. - virtual void Inverse( MbRegTransform * iReg = c3d_null ); // \ru Изменение направления кривой на противоположное \en Change curve direction to the opposite one + virtual void Inverse( MbRegTransform * iReg = NULL ); // \ru Изменение направления кривой на противоположное \en Change curve direction to the opposite one virtual double CalculateMetricLength() const; // \ru Посчитать метрическую длину \en Calculate the metric length virtual double GetLengthEvaluation() const; // \ru Оценка метрической длины кривой \en Estimation of metric length of the curve @@ -253,7 +253,7 @@ public : virtual bool IsDegenerate( double eps = Math::LengthEps ) const; // \ru Проверка вырожденности кривой \en Check for curve degeneracy virtual bool IsSmoothConnected( double angleEps ) const; // \ru Являются ли стыки контура\кривой гладкими? \en Whether the joints of a contour\curve are smooth. - virtual bool IsContinuousDerivative( bool & contLength, bool & contDirect, c3d::DoubleVector * params = c3d_null, double epsilon = EPSILON ) const; // \ru Непрерывна ли первая производная? \en Have the first derivative the continuous? + virtual bool IsContinuousDerivative( bool & contLength, bool & contDirect, c3d::DoubleVector * params = NULL, double epsilon = EPSILON ) const; // \ru Непрерывна ли первая производная? \en Have the first derivative the continuous? // \ru Устранить разрывы первых производных по длине. \en Eliminate the discontinuities of the first derivative at length. virtual bool SetContinuousDerivativeLength( VERSION version, double epsilon = EPSILON ); diff --git a/C3d/Include/cur_polyline3d.h b/C3d/Include/cur_polyline3d.h index a9168e2..25dfea8 100644 --- a/C3d/Include/cur_polyline3d.h +++ b/C3d/Include/cur_polyline3d.h @@ -99,12 +99,12 @@ public : // \ru Общие функции математического объекта \en Common functions of the mathematical object virtual MbeSpaceType IsA() const; // \ru Тип элемента \en Type of element - virtual MbSpaceItem & Duplicate( MbRegDuplicate * = c3d_null ) const ; // \ru Сделать копию элемента \en Create a copy of the element + virtual MbSpaceItem & Duplicate( MbRegDuplicate * = NULL ) const ; // \ru Сделать копию элемента \en Create a copy of the element virtual bool IsSame ( const MbSpaceItem & other, double accuracy = LENGTH_EPSILON ) const; virtual bool SetEqual ( const MbSpaceItem & ); // \ru Сделать равным \en Make equal - virtual void Transform( const MbMatrix3D &, MbRegTransform * = c3d_null ); // \ru Преобразовать \en Transform - virtual void Move ( const MbVector3D &, MbRegTransform * = c3d_null ); // \ru Сдвиг \en Translation - virtual void Rotate ( const MbAxis3D &, double angle, MbRegTransform * = c3d_null ); // \ru Повернуть вокруг оси \en Rotate about an axis + virtual void Transform( const MbMatrix3D &, MbRegTransform * = NULL ); // \ru Преобразовать \en Transform + virtual void Move ( const MbVector3D &, MbRegTransform * = NULL ); // \ru Сдвиг \en Translation + virtual void Rotate ( const MbAxis3D &, double angle, MbRegTransform * = NULL ); // \ru Повернуть вокруг оси \en Rotate about an axis virtual double DistanceToPoint( const MbCartPoint3D & ) const;// \ru Расстояние до точки \en Distance to a point virtual void GetProperties( MbProperties & ); // \ru Выдать свойства объекта \en Get properties of the object @@ -130,7 +130,7 @@ public : virtual double GetTMin() const; // \ru Вернуть минимальное значение параметра \en Get the minimum value of the parameter virtual double GetTMax() const; // \ru Вернуть максимальное значение параметра \en Get the maximum value of parameter - virtual void Inverse( MbRegTransform * iReg = c3d_null ); // \ru Изменить направление \en Change direction + virtual void Inverse( MbRegTransform * iReg = NULL ); // \ru Изменить направление \en Change direction virtual double Step ( double t, double sag ) const; // \ru Шаг параметра с учетом радиуса кривизны \en Step of parameter with consideration of curvature virtual double DeviationStep( double t, double angle ) const; // \ru Шаг параметра по заданному углу отклонения касательной \en Step of parameter by a given angle of deviation of tangent @@ -144,7 +144,7 @@ public : virtual void GetCentre ( MbCartPoint3D & wc ) const; // \ru Посчитать центр кривой \en Calculate the center of a curve virtual void GetWeightCentre( MbCartPoint3D & wc ) const; // \ru Посчитать центр тяжести кривой \en Calculate the gravity center of the curve // \ru Дать плоскую кривую и плейсмент, если пространственная кривая плоская (после использования вызывать DeleteItem на двумерную кривую) \en Get the planar curve and placement if the spatial curve is planar (call DeleteItem for two-dimensional curve after using) - virtual bool GetPlaneCurve( MbCurve *& curve2d, MbPlacement3D & place, bool saveParams, PlanarCheckParams params = PlanarCheckParams() ) const; + virtual bool GetPlaneCurve( MbCurve *& curve2d, MbPlacement3D & place, bool saveParams, VERSION version = Math::DefaultMathVersion() ) const; // \ru Общие функции полигональной кривой \en Common functions of polygonal curve @@ -152,7 +152,7 @@ public : virtual void GetRuleInterval( ptrdiff_t index, double & t1, double & t2 ) const; // \ru Выдать интервал влияния точки кривой \en Get the interval of point influence // \ru Функции только 3D кривой \en Functions of 3D curve only - virtual bool NearPointProjection( const MbCartPoint3D &, double & t, bool ext, MbRect1D * tRange = c3d_null ) const; // \ru Ближайшая проекция точки на кривую \en The nearest point projection to the curve + virtual bool NearPointProjection( const MbCartPoint3D &, double & t, bool ext, MbRect1D * tRange = NULL ) const; // \ru Ближайшая проекция точки на кривую \en The nearest point projection to the curve virtual void InsertPoint( ptrdiff_t index, const MbCartPoint3D & ); // \ru Добавить точку \en Add a point virtual void InsertPoint( double t, const MbCartPoint3D &, double ); // \ru Добавить точку \en Add a point virtual bool CheckParam ( double & t, ptrdiff_t & i0, ptrdiff_t & i1, double & t0, double & t1 ) const; // \ru Установить параметр \en Set parameter @@ -162,14 +162,14 @@ public : //virtual bool GoThroughPoint( double t, MbCartPoint3D & p ); // \ru Пройти через точку \en Pass through point - virtual MbCurve * GetMap( const MbMatrix3D &, MbRect1D * pRgn = c3d_null, - VERSION version = Math::DefaultMathVersion(), bool * coincParams = c3d_null ) const; // \ru Дать плоскую проекцию кривой. \en Get a planar projection of a curve. - virtual MbCurve * GetMapPsp( const MbMatrix3D &, double zNear, MbRect1D * pRgn = c3d_null ) const; // \ru Дать перспективную плоскую проекцию кривой. \en Get a planar geometric projection of a curve. + virtual MbCurve * GetMap( const MbMatrix3D &, MbRect1D * pRgn = NULL, + VERSION version = Math::DefaultMathVersion(), bool * coincParams = NULL ) const; // \ru Дать плоскую проекцию кривой. \en Get a planar projection of a curve. + virtual MbCurve * GetMapPsp( const MbMatrix3D &, double zNear, MbRect1D * pRgn = NULL ) const; // \ru Дать перспективную плоскую проекцию кривой. \en Get a planar geometric projection of a curve. virtual size_t GetCount() const; virtual bool IsSmoothConnected( double angleEps ) const; // \ru Являются ли стыки контура\кривой гладкими? \en Whether the joints of a contour\curve are smooth. - virtual bool IsContinuousDerivative( bool & contLength, bool & contDirect, c3d::DoubleVector * params = c3d_null, double epsilon = EPSILON ) const; // \ru Непрерывна ли первая производная? \en Have the first derivative the continuous? + virtual bool IsContinuousDerivative( bool & contLength, bool & contDirect, c3d::DoubleVector * params = NULL, double epsilon = EPSILON ) const; // \ru Непрерывна ли первая производная? \en Have the first derivative the continuous? // \ru Устранить разрывы первых производных по длине. \en Eliminate the discontinuities of the first derivative at length. virtual bool SetContinuousDerivativeLength( VERSION version, double epsilon = EPSILON ); diff --git a/C3d/Include/cur_projection_curve.h b/C3d/Include/cur_projection_curve.h index a4d679a..a49155c 100644 --- a/C3d/Include/cur_projection_curve.h +++ b/C3d/Include/cur_projection_curve.h @@ -43,9 +43,9 @@ class MbCurveIntoNurbsInfo; // --- class MATH_CLASS MbProjCurve : public MbCurve { private : - MbCurve3D * spaceCurve; ///< \ru Пространственная кривая (всегда не c3d_null). \en Spatial curve (always not c3d_null). - MbSurface * surface; ///< \ru Поверхность (всегда не c3d_null). \en Surface (always not c3d_null). - MbCurve * curve; ///< \ru Проекция пространственной кривой на поверхность (служит начальным приближением), всегда не c3d_null. \en Projection of a spatial curve onto a surface (is used as initial approximation), always not c3d_null. + MbCurve3D * spaceCurve; ///< \ru Пространственная кривая (всегда не NULL). \en Spatial curve (always not NULL). + MbSurface * surface; ///< \ru Поверхность (всегда не NULL). \en Surface (always not NULL). + MbCurve * curve; ///< \ru Проекция пространственной кривой на поверхность (служит начальным приближением), всегда не NULL. \en Projection of a spatial curve onto a surface (is used as initial approximation), always not NULL. MbMatrix3D * into; ///< \ru Матрица пересчета в систему координат плоскости. Для случая плоской поверхности surface. Вычисляется заново при изменении поверхности. \en A matrix of transformation to the plane coordinate system. In case of planar surface 'surface'. Recalculated at surface change. bool belong; ///< \ru Проецируемая кривая лежит на поверхности. \en Projecting curve lies on the surface. @@ -117,7 +117,7 @@ public : MbProjCurve( const MbCurve3D & sCurve, bool sameSpaceCurve, const MbSurface & surface, const MbCurve & pCurve, bool samePlaneCurve, - MbRegDuplicate * iReg = c3d_null ); + MbRegDuplicate * iReg = NULL ); private: MbProjCurve( const MbProjCurve &, MbRegDuplicate * ireg ); @@ -136,13 +136,13 @@ public : virtual bool IsSimilar ( const MbPlaneItem & ) const; // \ru Являются ли элементы подобными \en Whether the elements are similar virtual bool SetEqual ( const MbPlaneItem & ); // \ru Сделать элементы равными \en Make the elements equal virtual bool IsSame( const MbPlaneItem & other, double accuracy = LENGTH_EPSILON ) const; // \ru Является ли кривая curve копией данной кривой ? \en Whether curve 'curve' is a duplicate of the current curve. - virtual void Transform( const MbMatrix &, MbRegTransform * ireg = c3d_null, const MbSurface * newSurface = c3d_null ); // \ru Преобразовать элемент согласно матрице \en Transform element according to the matrix - virtual void Transform( const MbMatrix3D &, MbRegTransform * ireg = c3d_null ); // \ru Преобразовать элемент согласно матрице \en Transform element according to the matrix - virtual void Move ( const MbVector3D & to, MbRegTransform * = c3d_null ); // \ru Сдвиг \en Translation - virtual void Rotate ( const MbAxis3D & axis, double angle, MbRegTransform * = c3d_null ); // \ru Повернуть вокруг оси \en Rotate about an axis - virtual void Move ( const MbVector &, MbRegTransform * = c3d_null, const MbSurface * newSurface = c3d_null ); // \ru Сдвиг \en Translation - virtual void Rotate( const MbCartPoint & pnt, const MbDirection & angle, MbRegTransform * = c3d_null, const MbSurface * newSurface = c3d_null ); // \ru Поворот \en Rotation - virtual MbPlaneItem & Duplicate( MbRegDuplicate * = c3d_null ) const; // \ru Сделать копию элемента \en Create a copy of the element + virtual void Transform( const MbMatrix &, MbRegTransform * ireg = NULL, const MbSurface * newSurface = NULL ); // \ru Преобразовать элемент согласно матрице \en Transform element according to the matrix + virtual void Transform( const MbMatrix3D &, MbRegTransform * ireg = NULL ); // \ru Преобразовать элемент согласно матрице \en Transform element according to the matrix + virtual void Move ( const MbVector3D & to, MbRegTransform * = NULL ); // \ru Сдвиг \en Translation + virtual void Rotate ( const MbAxis3D & axis, double angle, MbRegTransform * = NULL ); // \ru Повернуть вокруг оси \en Rotate about an axis + virtual void Move ( const MbVector &, MbRegTransform * = NULL, const MbSurface * newSurface = NULL ); // \ru Сдвиг \en Translation + virtual void Rotate( const MbCartPoint & pnt, const MbDirection & angle, MbRegTransform * = NULL, const MbSurface * newSurface = NULL ); // \ru Поворот \en Rotation + virtual MbPlaneItem & Duplicate( MbRegDuplicate * = NULL ) const; // \ru Сделать копию элемента \en Create a copy of the element virtual void Refresh(); // \ru Сбросить все временные данные \en Reset all temporary data virtual void PrepareIntegralData( const bool forced ) const; // \ru Рассчитать временные (mutable) данные объекта. \en Calculate temporary (mutable) data of an object. @@ -204,7 +204,7 @@ public : \{ */ virtual double PointProjection( const MbCartPoint & pnt ) const; // \ru Проекция точки на кривую. \en Point projection on the curve. virtual bool NearPointProjection( const MbCartPoint & pnt, double xEpsilon, double yEpsilon, - double & t, bool ext, MbRect1D * tRange = c3d_null ) const; // \ru Проекция точки на кривую или её продолжение в области поиска проекции. \en Projection of a point onto the curve or its extension in the projection region. + double & t, bool ext, MbRect1D * tRange = NULL ) const; // \ru Проекция точки на кривую или её продолжение в области поиска проекции. \en Projection of a point onto the curve or its extension in the projection region. virtual bool HasLength( double & ) const; // \ru Метрическая длина кривой. \en Metric length of a curve. virtual double GetMetricLength() const; // \ru Метрическая длина кривой. \en Metric length of a curve. @@ -216,7 +216,7 @@ public : virtual bool GetMiddlePoint( MbCartPoint & ) const; // \ru Вычислить среднюю точку кривой. \en Calculate mid-point of curve. - virtual void Inverse( MbRegTransform * iReg = c3d_null ); // \ru Изменение направления кривой на противоположное \en Change curve direction to the opposite one + virtual void Inverse( MbRegTransform * iReg = NULL ); // \ru Изменение направления кривой на противоположное \en Change curve direction to the opposite one virtual MbNurbs * NurbsCurve( const MbCurveIntoNurbsInfo & ) const; @@ -238,12 +238,12 @@ public : bool IsBelong() const { return belong; } ///< \ru Лежит ли проецируемая кривая на поверхности. \en Whether the projecting curve lies on the surface. - bool InvertNormal( MbRegTransform * = c3d_null ); ///< \ru Инвертировать нормаль, если поверхность - плоскость. \en Invert normal if the surface is a plane. + bool InvertNormal( MbRegTransform * = NULL ); ///< \ru Инвертировать нормаль, если поверхность - плоскость. \en Invert normal if the surface is a plane. bool ChangeCarrierBorne( const MbSurface & item, MbSurface & init, const MbMatrix & matr ); ///< \ru Изменение носителя. \en Change a carrier. /// \ru Получить 2d сплайн с данной относительной точностью аппроксимирующий данную кривую. \en Get 2d spline which approximates given curve with a given relative tolerance. - MbCurve * CreateSpline( double relEps, MbRect1D * pRgn = c3d_null ) const; + MbCurve * CreateSpline( double relEps, MbRect1D * pRgn = NULL ) const; /// \ru Создать кривую путём сращивания части данной кривой с частью другой кривой. \en Create a curve by joining a part of this curve with a part of other curve. MbProjCurve * AddCurve( const MbProjCurve &, double accuracy, VERSION version = Math::DefaultMathVersion() ) const; diff --git a/C3d/Include/cur_reparam_curve.h b/C3d/Include/cur_reparam_curve.h index 33c4cf7..5a28df2 100644 --- a/C3d/Include/cur_reparam_curve.h +++ b/C3d/Include/cur_reparam_curve.h @@ -80,12 +80,12 @@ public : virtual MbePlaneType IsA() const; // \ru Тип элемента \en Type of element virtual bool IsSimilar( const MbPlaneItem & ) const; // \ru Являются ли элементы подобными \en Whether the elements are similar virtual bool SetEqual ( const MbPlaneItem & ); // \ru Сделать элементы равными \en Make the elements equal - virtual void Transform( const MbMatrix &, MbRegTransform * = c3d_null, const MbSurface * newSurface = c3d_null ); // \ru Преобразовать элемент согласно матрице \en Transform element according to the matrix - virtual void Move( const MbVector &, MbRegTransform * = c3d_null, const MbSurface * newSurface = c3d_null ); // \ru Сдвиг \en Translation - virtual void Rotate( const MbCartPoint &, const MbDirection & angle, MbRegTransform * = c3d_null, const MbSurface * newSurface = c3d_null ); // \ru Поворот \en Rotation + virtual void Transform( const MbMatrix &, MbRegTransform * = NULL, const MbSurface * newSurface = NULL ); // \ru Преобразовать элемент согласно матрице \en Transform element according to the matrix + virtual void Move( const MbVector &, MbRegTransform * = NULL, const MbSurface * newSurface = NULL ); // \ru Сдвиг \en Translation + virtual void Rotate( const MbCartPoint &, const MbDirection & angle, MbRegTransform * = NULL, const MbSurface * newSurface = NULL ); // \ru Поворот \en Rotation virtual bool IsSame( const MbPlaneItem &, double accuracy = LENGTH_EPSILON ) const; virtual MbCurve * Offset( double rad ) const; // \ru Смещение усеченной кривой \en Shift of a trimmed curve - virtual MbPlaneItem & Duplicate( MbRegDuplicate * = c3d_null ) const; + virtual MbPlaneItem & Duplicate( MbRegDuplicate * = NULL ) const; virtual MbCurve * Trimmed( double t1, double t2, int sense ) const; virtual MbContour * NurbsContour() const; // \ru Построить контур \en Create a contour virtual void AddYourGabaritTo( MbRect & ) const; // \ru Добавь свой габарит в прямой прям-к \en Add your own gabarit into the given bounding rectangle @@ -153,7 +153,7 @@ public : /** \ru \name Общие функции кривой \en \name Common functions of curve \{ */ - virtual void Inverse( MbRegTransform * iReg = c3d_null ); // \ru Изменение направления кривой на противоположное \en Change curve direction to the opposite one + virtual void Inverse( MbRegTransform * iReg = NULL ); // \ru Изменение направления кривой на противоположное \en Change curve direction to the opposite one virtual double DistanceToPoint( const MbCartPoint & toP ) const; // \ru Расстояние до точки \en Distance to a point virtual bool DistanceToPointIfLess( const MbCartPoint & toP, double & d ) const; // \ru Расстояние до точки, если оно меньше d \en Distance to a point if it is less than 'd' virtual MbeState Deformation( const MbRect &, const MbMatrix & ); // \ru Деформация \en Deformation @@ -188,7 +188,7 @@ public : virtual double PointProjection( const MbCartPoint & ) const; // \ru Проекция точки на кривую \en Point projection on the curve virtual bool NearPointProjection( const MbCartPoint & pnt, double xEpsilon, double yEpsilon, - double & t, bool ext, MbRect1D * tRange = c3d_null ) const; // \ru Проекция точки на кривую или её продолжение в области поиска проекции \en Projection of a point onto the curve or its extension in the projection region + double & t, bool ext, MbRect1D * tRange = NULL ) const; // \ru Проекция точки на кривую или её продолжение в области поиска проекции \en Projection of a point onto the curve or its extension in the projection region // \ru Вычисление всех перпендикуляров к кривой из данной точки \en Calculation of all the perpendiculars to the curve from a given point virtual void PerpendicularPoint( const MbCartPoint & pnt, SArray & tFind ) const; virtual bool SmallestPerpendicular( const MbCartPoint & pnt, double & tProj ) const; // \ru Нахождение ближайшего перпендикуляра к кривой из данной точки \en Calculation of the closest perpendicular to the curve from the given point @@ -202,7 +202,7 @@ public : virtual bool GetMiddlePoint( MbCartPoint & ) const; // \ru Выдать среднюю точку кривой \en Get mid-point of a curve virtual bool GoThroughPoint( MbCartPoint & p0 ); // \ru Вычисление минимальной длины кривой между двумя точками на ней \en Calculate the minimal curve length between two points on it - virtual double LengthBetween2Points( MbCartPoint & p1, MbCartPoint & p2, MbCartPoint * pc = c3d_null ) const; + virtual double LengthBetween2Points( MbCartPoint & p1, MbCartPoint & p2, MbCartPoint * pc = NULL ) const; virtual bool GetSpecificPoint( const MbCartPoint & from, double & dmax, MbCartPoint & pnt ) const; // \ru Выдать характерную точку кривой если она ближе чем dmax \en Get control point of curve if it is closer than 'dmax' virtual bool GetWeightCentre( MbCartPoint & c ) const; // \ru Выдать центр тяжести кривой \en Get the center of gravity of the curve virtual bool GetCentre( MbCartPoint & c ) const; // \ru Выдать центр кривой \en Get center of curve @@ -227,7 +227,7 @@ public : virtual const MbCurve & GetBasisCurve() const; virtual MbCurve & SetBasisCurve(); - bool SetBasisCurve( const MbCurve &, const MbRect1D * tRange = c3d_null ); ///< \ru Заменить плоскую кривую \en Replace the planar curve + bool SetBasisCurve( const MbCurve &, const MbRect1D * tRange = NULL ); ///< \ru Заменить плоскую кривую \en Replace the planar curve double Tmin() const; ///< \ru Начальный параметр. \en Start parameter. double Tmax() const; ///< \ru Конечный параметр. \en End parameter. double Dt() const; ///< \ru Производная параметра кривой basisCurve по параметру. \en Derivative of parameter of 'basisCurve' curve by parameter. @@ -249,7 +249,7 @@ public : virtual void GetBasisPoints( MbControlData & ) const; // \ru Выдать контрольные точки объекта. \en Get control points of object. virtual void SetBasisPoints( const MbControlData & ); // \ru Изменить объект по контрольным точкам. \en Change the object by control points. - virtual bool IsContinuousDerivative( bool & contLength, bool & contDirect, c3d::DoubleVector * params = c3d_null, double epsilon = EPSILON ) const; // \ru Непрерывна ли первая производная? \en Have the first derivative the continuous? + virtual bool IsContinuousDerivative( bool & contLength, bool & contDirect, c3d::DoubleVector * params = NULL, double epsilon = EPSILON ) const; // \ru Непрерывна ли первая производная? \en Have the first derivative the continuous? // \ru Устранить разрывы первых производных по длине. \en Eliminate the discontinuities of the first derivative at length. virtual bool SetContinuousDerivativeLength( VERSION version, double epsilon = EPSILON ); diff --git a/C3d/Include/cur_reparam_curve3d.h b/C3d/Include/cur_reparam_curve3d.h index 042a5d0..412260d 100644 --- a/C3d/Include/cur_reparam_curve3d.h +++ b/C3d/Include/cur_reparam_curve3d.h @@ -75,13 +75,13 @@ public : // \ru Общие функции математического объекта \en Common functions of the mathematical object virtual MbeSpaceType IsA() const; // \ru Тип элемента \en Type of element - virtual MbSpaceItem & Duplicate( MbRegDuplicate * = c3d_null ) const; // \ru Сделать копию элемента \en Create a copy of the element + virtual MbSpaceItem & Duplicate( MbRegDuplicate * = NULL ) const; // \ru Сделать копию элемента \en Create a copy of the element virtual bool IsSame ( const MbSpaceItem & other, double accuracy = LENGTH_EPSILON ) const; // \ru Является ли объект копией \en Whether the object is a copy virtual bool SetEqual ( const MbSpaceItem & ); // \ru Сделать равным \en Make equal virtual bool IsSimilar( const MbSpaceItem & ) const; // \ru Являются ли объекты подобными \en Whether the objects are similar - virtual void Transform( const MbMatrix3D &, MbRegTransform * = c3d_null ); // \ru Преобразовать элемент согласно матрице \en Transform element according to the matrix - virtual void Move ( const MbVector3D &, MbRegTransform * = c3d_null ); // \ru Сдвиг \en Translation - virtual void Rotate ( const MbAxis3D &, double angle, MbRegTransform * = c3d_null ); // \ru Повернуть вокруг оси \en Rotate about an axis + virtual void Transform( const MbMatrix3D &, MbRegTransform * = NULL ); // \ru Преобразовать элемент согласно матрице \en Transform element according to the matrix + virtual void Move ( const MbVector3D &, MbRegTransform * = NULL ); // \ru Сдвиг \en Translation + virtual void Rotate ( const MbAxis3D &, double angle, MbRegTransform * = NULL ); // \ru Повернуть вокруг оси \en Rotate about an axis virtual double DistanceToPoint( const MbCartPoint3D & ) const; // \ru Расстояние до точки \en Distance to a point virtual void PrepareIntegralData( const bool forced ) const; // \ru Рассчитать временные (mutable) данные объекта. \en Calculate temporary (mutable) data of an object. @@ -122,7 +122,7 @@ public : virtual MbCurve3D & SetBasisCurve(); virtual MbCurve3D * Trimmed( double t1, double t2, int sense ) const; // \ru Создание усеченной кривой \en Create a trimmed curve - virtual void Inverse( MbRegTransform * iReg = c3d_null ); // \ru Изменить направление \en Change direction + virtual void Inverse( MbRegTransform * iReg = NULL ); // \ru Изменить направление \en Change direction virtual double GetMetricLength() const; // \ru Метрическая длина кривой \en Metric length of a curve virtual double CalculateMetricLength() const; // \ru Метрическая длина кривой \en Metric length of a curve @@ -148,7 +148,7 @@ public : virtual void GetPointsByEvenLengthDelta( size_t n, std::vector & pnts ) const; // \ru Выдать n точек кривой с равными интервалами по длине дуги \en Get n points of curve equally spaced by the arc length // \ru Ближайшая проекция точки на кривую \en The nearest projection of a point onto the curve - virtual bool NearPointProjection( const MbCartPoint3D &, double & t, bool ext, MbRect1D * tRange = c3d_null ) const; + virtual bool NearPointProjection( const MbCartPoint3D &, double & t, bool ext, MbRect1D * tRange = NULL ) const; // \ru Определение точек касания изоклины \en Determination of tangent points of isocline virtual void GetIsoclinal( const MbVector3D & nor, SArray & tIso ) const; /// \ru Найти все особые точки функции кривизны кривой. @@ -160,12 +160,12 @@ public : // \ru Касание кривой через точку с заданной производной \en Tangent of curve through point with the given derivative //virtual bool GoThroughPointWithDerive( double t, MbCartPoint3D & p0, MbVector3D & v0 ); - virtual MbCurve * GetMap( const MbMatrix3D &, MbRect1D * pRgn = c3d_null, - VERSION version = Math::DefaultMathVersion(), bool * coincParams = c3d_null ) const; // \ru Дать плоскую проекцию кривой \en Get a planar projection of a curve + virtual MbCurve * GetMap( const MbMatrix3D &, MbRect1D * pRgn = NULL, + VERSION version = Math::DefaultMathVersion(), bool * coincParams = NULL ) const; // \ru Дать плоскую проекцию кривой \en Get a planar projection of a curve virtual size_t GetCount() const; virtual void ChangeCarrier( const MbSpaceItem & item, MbSpaceItem & init ); // \ru Изменение носителя \en Change a carrier - virtual bool IsPlanar ( double accuracy = METRIC_EPSILON ) const; // \ru Является ли кривая плоской \en Whether the curve is planar + virtual bool IsPlanar () const; // \ru Является ли кривая плоской \en Whether the curve is planar virtual bool IsStraight( bool ignoreParams = false ) const; // \ru Является ли линия прямолинейной \en Whether the line is straight virtual double GetRadius() const; // \ru Дать физический радиус объекта или ноль, если это невозможно. \en Get the physical radius of the object or null if it impossible. virtual bool GetCircleAxis ( MbAxis3D & ) const; // \ru Дать ось кривой \en Get axis of curve @@ -188,9 +188,9 @@ public : virtual void SubstrateToCurve( double & ) const; // \ru Преобразовать параметр подложки в параметр кривой \en Transform a substrate parameter to the curve parameter virtual void CurveToSubstrate( double & ) const; // \ru Преобразовать параметр кривой в параметр подложки \en Transform a curve parameter to the substrate parameter // \ru Заполнить плейсемент, ести кривая плоская \en Fill the placement if the curve is planar - virtual bool GetPlacement( MbPlacement3D & place, PlanarCheckParams params = PlanarCheckParams() ) const; + virtual bool GetPlacement( MbPlacement3D & place, VERSION version = Math::DefaultMathVersion() ) const; // \ru Дать плоскую кривую и плейсмент, если пространственная кривая плоская (после использования вызывать DeleteItem на двумерную кривую) \en Get the planar curve and placement if the spatial curve is planar (call DeleteItem for two-dimensional curve after using) - virtual bool GetPlaneCurve( MbCurve *& curve2d, MbPlacement3D & place, bool saveParams, PlanarCheckParams params = PlanarCheckParams() ) const; + virtual bool GetPlaneCurve( MbCurve *& curve2d, MbPlacement3D & place, bool saveParams, VERSION version = Math::DefaultMathVersion() ) const; // \ru Дать поверхностную кривую, если пространственная кривая поверхностная (после использования вызывать DeleteItem на аргументы) \en Get a surface curve if a spatial curve is on a surface (call DeleteItem for arguments after using ) virtual bool GetSurfaceCurve( MbCurve *& curve2d, MbSurface *& surface, VERSION version = Math::DefaultMathVersion() ) const; @@ -198,7 +198,7 @@ public : virtual bool IsShift( const MbSpaceItem &, MbVector3D &, bool & isSame, double accuracy = LENGTH_EPSILON ) const; virtual bool IsSimilarToCurve( const MbCurve3D & curve, double precision = METRIC_PRECISION ) const; // \ru Подобные ли кривые для объединения (слива) \en Whether the curves for union (joining) are similar - virtual bool IsContinuousDerivative( bool & contLength, bool & contDirect, c3d::DoubleVector * params = c3d_null, double epsilon = EPSILON ) const; // \ru Непрерывна ли первая производная? \en Have the first derivative the continuous? + virtual bool IsContinuousDerivative( bool & contLength, bool & contDirect, c3d::DoubleVector * params = NULL, double epsilon = EPSILON ) const; // \ru Непрерывна ли первая производная? \en Have the first derivative the continuous? // \ru Устранить разрывы первых производных по длине. \en Eliminate the discontinuities of the first derivative at length. virtual bool SetContinuousDerivativeLength( VERSION version, double epsilon = EPSILON ); diff --git a/C3d/Include/cur_silhouette_curve.h b/C3d/Include/cur_silhouette_curve.h index ee87c17..fff5ad0 100644 --- a/C3d/Include/cur_silhouette_curve.h +++ b/C3d/Include/cur_silhouette_curve.h @@ -77,7 +77,7 @@ public : const MbMatrix3D & m, bool p ); /// \ru Конструктор по поверхности, двумерной кривой, типу кривой, вектору взгляда и флагу перспективы. \en Constructor by surface, two-dimensional curve, type of curve, vector of view and flag of perspective. MbSilhouetteCurve( const MbSurface & surf, const MbCurve & crv, MbeCurveBuildType _species, - const MbVector3D & e, bool p, const MbAxis3D * axis = c3d_null ); + const MbVector3D & e, bool p, const MbAxis3D * axis = NULL ); protected: /// \ru Конструктор копирования. \en Copy-constructor. MbSilhouetteCurve( const MbSilhouetteCurve &, MbRegDuplicate * ); @@ -92,13 +92,13 @@ public: // \ru Общие функции геометрического объекта. \en Common functions of a geometric object. virtual MbeSpaceType IsA() const; // \ru Дать тип элемента. \en Get element type. - virtual MbSpaceItem & Duplicate( MbRegDuplicate * = c3d_null ) const; // \ru Сделать копию элемента. \en Create a copy of the element. + virtual MbSpaceItem & Duplicate( MbRegDuplicate * = NULL ) const; // \ru Сделать копию элемента. \en Create a copy of the element. virtual bool IsSame ( const MbSpaceItem & other, double accuracy = LENGTH_EPSILON ) const; // \ru Определить, являются ли объекты одинаковыми. \en Determine whether objects are equal. virtual bool SetEqual ( const MbSpaceItem & ); // \ru Сделать равным. \en Make equal. virtual bool IsSimilar( const MbSpaceItem & ) const; // \ru Определить, являются ли объекты подобными. \en Determine whether the objects are similar. - virtual void Transform( const MbMatrix3D &, MbRegTransform * = c3d_null ); // \ru Преобразовать элемент согласно матрице. \en Transform element according to the matrix. - virtual void Move ( const MbVector3D &, MbRegTransform * = c3d_null ); // \ru Сдвинуть вдоль вектора. \en Move along a vector. - virtual void Rotate ( const MbAxis3D &, double angle, MbRegTransform * = c3d_null ); // \ru Повернуть вокруг оси. \en Rotate about an axis. + virtual void Transform( const MbMatrix3D &, MbRegTransform * = NULL ); // \ru Преобразовать элемент согласно матрице. \en Transform element according to the matrix. + virtual void Move ( const MbVector3D &, MbRegTransform * = NULL ); // \ru Сдвинуть вдоль вектора. \en Move along a vector. + virtual void Rotate ( const MbAxis3D &, double angle, MbRegTransform * = NULL ); // \ru Повернуть вокруг оси. \en Rotate about an axis. virtual void Refresh(); // \ru Сбросить все временные данные. \en Reset all temporary data. virtual void GetProperties( MbProperties & ); // \ru Выдать свойства объекта. \en Get properties of the object. virtual void SetProperties( const MbProperties & ); // \ru Записать свойства объекта. \en Set properties of the object. @@ -125,19 +125,19 @@ public: // \ru Вычислить габарит кривой. \en Calculate bounding box of a curve. virtual void CalculateGabarit( MbCube & ) const; // \ru Определить, является ли кривая плоской. \en Determine whether the curve is planar. - virtual bool IsPlanar( double accuracy = METRIC_EPSILON ) const; + virtual bool IsPlanar() const; // \ru Заполнить плейсмент, если кривая плоская. \en Fill the placement if the curve is planar. - virtual bool GetPlacement( MbPlacement3D & place, PlanarCheckParams params = PlanarCheckParams() ) const; + virtual bool GetPlacement( MbPlacement3D & place, VERSION version = Math::DefaultMathVersion() ) const; // \ru Дать плоскую кривую и плейсмент, если пространственная кривая плоская (после использования вызывать DeleteItem на двумерную кривую). \en Get the planar curve and placement if the spatial curve is planar (call DeleteItem for two-dimensional curve after using ). - virtual bool GetPlaneCurve( MbCurve *& curve2d, MbPlacement3D & place3d, bool saveParams, PlanarCheckParams params = PlanarCheckParams() ) const; + virtual bool GetPlaneCurve( MbCurve *& curve2d, MbPlacement3D & place3d, bool saveParams, VERSION version = Math::DefaultMathVersion() ) const; // \ru Дать поверхностную кривую, если пространственная кривая поверхностная (после использования вызывать DeleteItem на аргументы). \en Get a surface curve if a spatial curve is on a surface (call DeleteItem for arguments after use). virtual bool GetSurfaceCurve( MbCurve *& curve2d, MbSurface *& surface, VERSION version = Math::DefaultMathVersion() ) const; // \ru Создать усеченную кривую. \en Create a trimmed curve virtual MbCurve3D * Trimmed( double t1, double t2, int sense ) const; // \ru Дать плоскую проекцию кривой(локальная система координат, шаг, параметрическая область). \en Get the planar projection of a curve (local coordinate system, step, parametric region). - virtual MbCurve * GetMap( const MbMatrix3D &, MbRect1D * pRgn = c3d_null, - VERSION version = Math::DefaultMathVersion(), bool * coincParams = c3d_null ) const; + virtual MbCurve * GetMap( const MbMatrix3D &, MbRect1D * pRgn = NULL, + VERSION version = Math::DefaultMathVersion(), bool * coincParams = NULL ) const; virtual double GetMetricLength() const; // \ru Метрическая длина кривой \en Metric length of a curve virtual double GetLengthEvaluation() const; // \ru Оценить метрическую длину кривой. \en Estimate the metric length of a curve. @@ -145,16 +145,16 @@ public: virtual double GetParamToUnit() const; // \ru Дать приращение параметра, осреднённо соответствующее единичной длине в пространстве. \en Get parameter increment which averagingly corresponds to the unit length in space. virtual double GetParamToUnit( double t ) const; // \ru Дать приращение параметра, соответствующее единичной длине в пространстве. \en Get parameter increment which corresponds to the unit length in space. - virtual void Inverse( MbRegTransform * iReg = c3d_null ); // \ru Изменить направление. \en Change the direction. + virtual void Inverse( MbRegTransform * iReg = NULL ); // \ru Изменить направление. \en Change the direction. virtual MbeCurveBuildType GetBuildType() const; // \ru Дать тип кривой. \en Get type of curve. virtual bool InsertPoint( double & t ); // \ru Вставить точку и выдать её параметр. \en Insert point and get its parameter. virtual bool IsSimilarToCurve( const MbCurve3D & curve, double precision = METRIC_PRECISION ) const; // \ru Определить, подобные ли кривые для объединения (слива). \en Determine whether the curves for union (joining) are similar. /// \ru Определить, существует ли точное пространственное представление линии очерка. \en Determine whether the exact spatial representation of isocline curve exists. - bool IsExactSpaceCurve() const { return (approxExact && approxCurve != c3d_null); } + bool IsExactSpaceCurve() const { return (approxExact && approxCurve != NULL); } /// \ru Получить указатель на кривую точного пространственное представление линии очерка. (Может и не быть). \en Get a pointer to the curve of exact spatial representation of isocline curve. (Can be absent). - const MbCurve3D * GetExactSpaceCurve() const { return approxExact ? approxCurve : c3d_null; } + const MbCurve3D * GetExactSpaceCurve() const { return approxExact ? approxCurve : NULL; } /// \ru Дать пространственную копию линии очерка. \en Construct a new spatial copy of isocline curve. const MbCurve3D * GetApproxCurve() const { return approxCurve; } diff --git a/C3d/Include/cur_spiral.h b/C3d/Include/cur_spiral.h index e605fa4..bca6c0d 100644 --- a/C3d/Include/cur_spiral.h +++ b/C3d/Include/cur_spiral.h @@ -95,12 +95,12 @@ public : virtual MbeSpaceType IsA() const = 0; // \ru Тип элемента \en Type of element virtual MbeSpaceType Type() const; // \ru Тип элемента \en Type of element - virtual MbSpaceItem & Duplicate( MbRegDuplicate * = c3d_null ) const = 0; // \ru Сделать копию элемента \en Create a copy of the element + virtual MbSpaceItem & Duplicate( MbRegDuplicate * = NULL ) const = 0; // \ru Сделать копию элемента \en Create a copy of the element virtual bool IsSame( const MbSpaceItem &, double accuracy = LENGTH_EPSILON ) const; virtual bool SetEqual( const MbSpaceItem & ); // \ru Сделать равным \en Make equal - virtual void Transform( const MbMatrix3D &, MbRegTransform * = c3d_null ); // \ru Преобразовать элемент согласно матрице \en Transform element according to the matrix - virtual void Move( const MbVector3D &, MbRegTransform * = c3d_null ); // \ru Сдвиг \en Translation - virtual void Rotate( const MbAxis3D &, double angle, MbRegTransform * = c3d_null ); // \ru Повернуть вокруг оси \en Rotate about an axis + virtual void Transform( const MbMatrix3D &, MbRegTransform * = NULL ); // \ru Преобразовать элемент согласно матрице \en Transform element according to the matrix + virtual void Move( const MbVector3D &, MbRegTransform * = NULL ); // \ru Сдвиг \en Translation + virtual void Rotate( const MbAxis3D &, double angle, MbRegTransform * = NULL ); // \ru Повернуть вокруг оси \en Rotate about an axis virtual void AddYourGabaritTo( MbCube & ) const; // \ru Добавь свой габарит в куб \en Add your own bounding box into the cube virtual void PrepareIntegralData( const bool forced ) const; // \ru Рассчитать временные (mutable) данные объекта. \en Calculate temporary (mutable) data of an object. @@ -125,7 +125,7 @@ public : virtual void Explore( double & t, bool ext, MbCartPoint3D & pnt, MbVector3D & fir, MbVector3D * sec, MbVector3D * thir ) const = 0; - virtual void Inverse( MbRegTransform * iReg = c3d_null ) = 0; // \ru Изменить направление \en Change direction + virtual void Inverse( MbRegTransform * iReg = NULL ) = 0; // \ru Изменить направление \en Change direction virtual double GetMetricLength() const; // \ru Выдать метрическую длину ограниченной кривой \en Get metric length of bounded curve virtual double GetLengthEvaluation() const; // \ru Оценка метрической длины кривой \en Estimation of metric length of the curve @@ -140,7 +140,7 @@ public : double GetSpiralPeriod() const; // \ru Вернуть период \en Get period // \ru Заполнить плейсемент, если кривая плоская \en Fill the placement if the curve is planar - virtual bool GetPlacement( MbPlacement3D & place, PlanarCheckParams params = PlanarCheckParams() ) const; + virtual bool GetPlacement( MbPlacement3D & place, VERSION version = Math::DefaultMathVersion() ) const; /// \ru Является ли объект смещением \en Whether the object is a shift virtual bool IsShift( const MbSpaceItem &, MbVector3D &, bool & isSame, double accuracy = LENGTH_EPSILON ) const; diff --git a/C3d/Include/cur_surface_curve.h b/C3d/Include/cur_surface_curve.h index 7256023..6c3fba6 100644 --- a/C3d/Include/cur_surface_curve.h +++ b/C3d/Include/cur_surface_curve.h @@ -61,8 +61,8 @@ class MbCurveIntoNurbsInfo; // --- class MATH_CLASS MbSurfaceCurve : public MbCurve3D { protected : - MbCurve * curve; ///< \ru Плоская кривая в uv-пространстве (всегда не c3d_null). \en Planar curve in uv-space (always not c3d_null). - MbSurface * surface; ///< \ru Указатель на поверхность (всегда не c3d_null). \en Pointer to the surface (always not c3d_null). + MbCurve * curve; ///< \ru Плоская кривая в uv-пространстве (всегда не NULL). \en Planar curve in uv-space (always not NULL). + MbSurface * surface; ///< \ru Указатель на поверхность (всегда не NULL). \en Pointer to the surface (always not NULL). bool closed; ///< \ru Флаг замкнутости поверхностной кривой. \en An attribute of closedness of surface of curve. /** \brief \ru Вспомогательные данные. @@ -105,7 +105,7 @@ protected : public : /// \ru Конструктор кривой на поверхности. \en Constructor of curve on surface. - MbSurfaceCurve( const MbSurface &, const MbCurve &, bool sameCurve, MbRegDuplicate * iReg = c3d_null ); + MbSurfaceCurve( const MbSurface &, const MbCurve &, bool sameCurve, MbRegDuplicate * iReg = NULL ); /// \ru Конструктор отрезка прямой на поверхности. \en Constructor of a line segment on surface. MbSurfaceCurve( const MbSurface &, const MbCartPoint & p0, const MbCartPoint & p1, MbePlaneType type = pt_Curve ); /// \ru Конструктор граничной кривой поверхности. \en Constructor of boundary curve of surface. @@ -131,15 +131,15 @@ public: virtual MbeSpaceType IsA() const; // \ru Дать тип элемента. \en Get element type. virtual MbeSpaceType Type() const; // \ru Дать тип элемента. \en Get element type. - virtual MbSpaceItem & Duplicate( MbRegDuplicate * = c3d_null ) const; // \ru Сделать копию элемента. \en Create a copy of the element. + virtual MbSpaceItem & Duplicate( MbRegDuplicate * = NULL ) const; // \ru Сделать копию элемента. \en Create a copy of the element. /// \ru Копия кривой с той же поверхностью. \en Copy of curve with the same surface. MbSurfaceCurve & CurvesDuplicate() const; virtual bool IsSame ( const MbSpaceItem & other, double accuracy = LENGTH_EPSILON ) const; // \ru Определить, являются ли объекты одинаковыми. \en Determine whether objects are equal. virtual bool SetEqual ( const MbSpaceItem & ); // \ru Сделать равным. \en Make equal. virtual bool IsSimilar( const MbSpaceItem & ) const; // \ru Определить, являются ли объекты подобными. \en Determine whether the objects are similar. - virtual void Transform( const MbMatrix3D &, MbRegTransform * = c3d_null ); // \ru Преобразовать элемент согласно матрице. \en Transform element according to the matrix. - virtual void Move ( const MbVector3D &, MbRegTransform * = c3d_null ); // \ru Сдвинуть вдоль вектора. \en Move along a vector. - virtual void Rotate ( const MbAxis3D &, double angle, MbRegTransform * = c3d_null ); // \ru Повернуть вокруг оси. \en Rotate about an axis. + virtual void Transform( const MbMatrix3D &, MbRegTransform * = NULL ); // \ru Преобразовать элемент согласно матрице. \en Transform element according to the matrix. + virtual void Move ( const MbVector3D &, MbRegTransform * = NULL ); // \ru Сдвинуть вдоль вектора. \en Move along a vector. + virtual void Rotate ( const MbAxis3D &, double angle, MbRegTransform * = NULL ); // \ru Повернуть вокруг оси. \en Rotate about an axis. virtual void AddYourGabaritTo( MbCube & r ) const; // \ru Добавить свой габарит в куб. \en Add your own bounding box into a cube. virtual void Refresh(); // \ru Сбросить все временные данные. \en Reset all temporary data. virtual void PrepareIntegralData( const bool forced ) const; // \ru Рассчитать временные (mutable) данные объекта. \en Calculate temporary (mutable) data of an object. @@ -180,16 +180,16 @@ public: virtual MbCurve3D * Trimmed( double t1, double t2, int sense ) const; // \ru Создать усеченную кривую. \en Create a trimmed curve // \ru Вычислить ближайшую проекцию точки на кривую. \en Calculate the nearest projection of a point onto the curve. - virtual bool NearPointProjection( const MbCartPoint3D &, double & t, bool ext, MbRect1D * tRange = c3d_null ) const; - virtual void Inverse( MbRegTransform * iReg = c3d_null ); // \ru Изменить направление. \en Change the direction. + virtual bool NearPointProjection( const MbCartPoint3D &, double & t, bool ext, MbRect1D * tRange = NULL ) const; + virtual void Inverse( MbRegTransform * iReg = NULL ); // \ru Изменить направление. \en Change the direction. virtual double Step ( double t, double sag ) const; // \ru Вычисление шага по стрелке прогиба. \en Calculation of parameter step by the sag. virtual double DeviationStep( double t, double angle ) const; // \ru Вычисление шага по углу отклонения нормали. \en Calculation of parameter step by the deviation angle. void SetTesselation( const MbContourOnSurface & contour, size_t indSegment ); // \ru Установить разбиение из контура. \en Set tessellation from contour. virtual double MetricStep ( double t, double length ) const; // \ru Вычисление шага параметра по длине. \en Calculation of parameter step by the given length. - virtual MbCurve * GetMap( const MbMatrix3D &, MbRect1D * pRgn = c3d_null, - VERSION version = Math::DefaultMathVersion(), bool * coincParams = c3d_null ) const; // \ru Дать плоскую проекцию кривой. \en Get a planar projection of a curve. + virtual MbCurve * GetMap( const MbMatrix3D &, MbRect1D * pRgn = NULL, + VERSION version = Math::DefaultMathVersion(), bool * coincParams = NULL ) const; // \ru Дать плоскую проекцию кривой. \en Get a planar projection of a curve. /// \ru Вычислить плоскую проекцию кривой в частных случаях. \en Calculate planar projection of a curve in special cases. MbCurve * GetParticularMap( const MbMatrix3D & into, MbRect1D * pRgn, VERSION version ) const; @@ -197,7 +197,7 @@ public: virtual bool IsStraight( bool ignoreParams = false ) const; // \ru Определить, является ли линия прямолинейной. \en Determine whether the line is straight. virtual void ChangeCarrier ( const MbSpaceItem & item, MbSpaceItem & init ); // \ru Изменить носитель. \en Change the carrier. virtual bool ChangeCarrierBorne( const MbSpaceItem &, MbSpaceItem &, const MbMatrix & matr ); // \ru Изменить носимые элементы. \en Change a carrier elements. - virtual bool IsPlanar( double accuracy = METRIC_EPSILON ) const; // \ru Определить, является ли кривая плоской. Прямолинейные кривые являются плоскими, но без определённой ЛСК. \en Determine whether the curve is planar. Straight lines is planar but without certain placement. + virtual bool IsPlanar() const; // \ru Определить, является ли кривая плоской. Прямолинейные кривые являются плоскими, но без определённой ЛСК. \en Determine whether the curve is planar. Straight lines is planar but without certain placement. virtual bool IsSmoothConnected( double angleEps ) const; // \ru Определить, являются ли стыки контура\кривой гладкими. \en Determine whether the joints of contour\curve are smooth. virtual void CalculateGabarit( MbCube & ) const; // \ru Вычислить габарит кривой. \en Calculate bounding box of a curve. virtual double GetMetricLength() const; // \ru Вычислить метрическую длину кривой. \en Calculate the metric length of a curve. @@ -210,11 +210,11 @@ public: // \ru Вычислить ближайшую точку кривой к плейсменту. \en Calculate the curve point nearest to a placement. virtual double DistanceToPlace( const MbPlacement3D & place, double & t0, double & angle ) const; // \ru Дать плоскую кривую и плейсмент, если пространственная кривая плоская (после использования вызывать DeleteItem на двумерную кривую). \en Get the planar curve and placement if the spatial curve is planar (call DeleteItem for two-dimensional curve after using ). - virtual bool GetPlaneCurve( MbCurve *& curve2d, MbPlacement3D & place3d, bool saveParams, PlanarCheckParams params = PlanarCheckParams() ) const; + virtual bool GetPlaneCurve( MbCurve *& curve2d, MbPlacement3D & place3d, bool saveParams, VERSION version = Math::DefaultMathVersion() ) const; // \ru Дать поверхностную кривую, если пространственная кривая поверхностная (после использования вызывать DeleteItem на аргументы). \en Get a surface curve if a spatial curve is on a surface (call DeleteItem for arguments after use). virtual bool GetSurfaceCurve( MbCurve *& curve2d, MbSurface *& surface, VERSION version = Math::DefaultMathVersion() ) const; // \ru Заполнить плейсмент, если кривая плоская. \en Fill the placement if the curve is planar. - virtual bool GetPlacement( MbPlacement3D & place, PlanarCheckParams params = PlanarCheckParams() ) const; + virtual bool GetPlacement( MbPlacement3D & place, VERSION version = Math::DefaultMathVersion() ) const; /// \ru Дать тип кривой. \en Get type of curve. virtual MbeCurveBuildType GetBuildType() const; @@ -242,7 +242,7 @@ public: /// \en Get the boundaries of the curve sections that are described by one analytical function. \~ virtual void GetAnalyticalFunctionsBounds( std::vector & params ) const; - virtual bool IsContinuousDerivative( bool & contLength, bool & contDirect, c3d::DoubleVector * params = c3d_null, double epsilon = EPSILON ) const; // \ru Непрерывна ли первая производная? \en Have the first derivative the continuous? + virtual bool IsContinuousDerivative( bool & contLength, bool & contDirect, c3d::DoubleVector * params = NULL, double epsilon = EPSILON ) const; // \ru Непрерывна ли первая производная? \en Have the first derivative the continuous? // \ru Устранить разрывы первых производных по длине. \en Eliminate the discontinuities of the first derivative at length. virtual bool SetContinuousDerivativeLength( VERSION version, double epsilon = EPSILON ); diff --git a/C3d/Include/cur_surface_intersection.h b/C3d/Include/cur_surface_intersection.h index 5bf1e05..0899832 100644 --- a/C3d/Include/cur_surface_intersection.h +++ b/C3d/Include/cur_surface_intersection.h @@ -180,7 +180,7 @@ public : MbSurfaceIntersectionCurve( const MbSurface & surf1, const MbCurve & curve1, const MbSurface & surf2, const MbCurve & curve2, MbeCurveBuildType buildType, bool sameOne, bool sameTwo, - MbRegDuplicate * iReg = c3d_null ); + MbRegDuplicate * iReg = NULL ); /** \brief \ru Конструктор по поверхностям и двумерным точкам. \en Constructor by surfaces and two-dimensional points. \~ \details \ru Конструктор кривой пересечения по поверхностям и двумерным точкам. \n @@ -284,15 +284,15 @@ public: \{ */ virtual MbeSpaceType IsA() const; // \ru Дать тип элемента. \en Get element type. - virtual MbSpaceItem & Duplicate( MbRegDuplicate * = c3d_null ) const; // \ru Сделать копию элемента. \en Create a copy of the element. + virtual MbSpaceItem & Duplicate( MbRegDuplicate * = NULL ) const; // \ru Сделать копию элемента. \en Create a copy of the element. /// \ru Сделать копию кривой на тех же поверхностях. \en Create a copy of a curve on the same surfaces. MbSurfaceIntersectionCurve & CurvesDuplicate() const; virtual bool IsSame ( const MbSpaceItem & other, double accuracy = LENGTH_EPSILON ) const; // \ru Определить, равны ли объекты. \en Determine whether the objects are equal. virtual bool SetEqual ( const MbSpaceItem & ); // \ru Сделать равным. \en Make equal. virtual bool IsSimilar( const MbSpaceItem & ) const; // \ru Определить, являются ли объекты подобными. \en Determine whether the objects are similar. - virtual void Transform( const MbMatrix3D &, MbRegTransform * = c3d_null ); // \ru Преобразовать элемент согласно матрице \en Transform element according to the matrix - virtual void Move ( const MbVector3D &, MbRegTransform * = c3d_null ); // \ru Сдвинуть вдоль вектора. \en Move along a vector. - virtual void Rotate ( const MbAxis3D &, double angle, MbRegTransform * = c3d_null ); // \ru Повернуть вокруг оси. \en Rotate about an axis. + virtual void Transform( const MbMatrix3D &, MbRegTransform * = NULL ); // \ru Преобразовать элемент согласно матрице \en Transform element according to the matrix + virtual void Move ( const MbVector3D &, MbRegTransform * = NULL ); // \ru Сдвинуть вдоль вектора. \en Move along a vector. + virtual void Rotate ( const MbAxis3D &, double angle, MbRegTransform * = NULL ); // \ru Повернуть вокруг оси. \en Rotate about an axis. virtual void AddYourGabaritTo( MbCube & r ) const; // \ru Добавить свой габарит в куб. \en Add your own bounding box into a cube. virtual void CalculateMesh( const MbStepData & stepData, const MbFormNote & note, MbMesh & mesh ) const; // \ru Построить полигональную копию mesh. \en Build polygonal copy mesh. virtual void Refresh(); // \ru Сбросить все временные данные. \en Reset all temporary data. @@ -330,7 +330,7 @@ public: // \ru Функции приближённого быстрого вычисления точки и производных на кривой. \en Functions of approximate fast calculation of point and derivatives on the curve. virtual void FastApproxExplore( double & t, MbCartPoint3D & pnt, MbVector3D & fir, MbVector3D * sec ) const; - virtual void Inverse( MbRegTransform * iReg = c3d_null ); // \ru Изменить направление. \en Change the direction. + virtual void Inverse( MbRegTransform * iReg = NULL ); // \ru Изменить направление. \en Change the direction. // \ru Функции движения по кривой. \en Functions of moving along the curve. // \ru Вычислить шаг параметра по величине прогиба кривой. \en Calculate step of parameter by value of sag of curve. @@ -377,8 +377,8 @@ public: virtual void CalculatePolygon( const MbStepData & stepData, MbPolygon3D &polygon ) const; // \ru Рассчитать полигон. \en Calculate a polygon. // \ru Построить плоскую проекцию некоторой части пространственной кривой. \en Construct a planar projection of a piece of a space curve. - virtual MbCurve * GetMap( const MbMatrix3D & into, MbRect1D * pRegion = c3d_null, - VERSION version = Math::DefaultMathVersion(), bool * coincParams = c3d_null ) const; + virtual MbCurve * GetMap( const MbMatrix3D & into, MbRect1D * pRegion = NULL, + VERSION version = Math::DefaultMathVersion(), bool * coincParams = NULL ) const; // \ru Дать проекцию ребра на плоскость. \en Get the edge projection onto plane. virtual MbCurve * GetProjection( const MbPlacement3D & place, VERSION version ) const; @@ -388,14 +388,14 @@ public: virtual bool IsStraight( bool ignoreParams = false ) const; // \ru Определить, является ли линия прямолинейной. \en Determine whether the line is straight. virtual void ChangeCarrier ( const MbSpaceItem & item, MbSpaceItem & init ); // \ru Изменить носитель. \en Change the carrier. virtual bool ChangeCarrierBorne( const MbSpaceItem & item, MbSpaceItem & init, const MbMatrix & matr ); // \ru Изменение носимые элементы. \en Change a carrier elements. - virtual bool IsPlanar( double accuracy = METRIC_EPSILON ) const; // \ru Определить, является ли кривая плоской. \en Determine whether the curve is planar. + virtual bool IsPlanar() const; // \ru Определить, является ли кривая плоской. \en Determine whether the curve is planar. virtual bool IsSmoothConnected( double angleEps ) const; // \ru Определить, являются ли стыки контура\кривой гладкими. \en Determine whether the joints of contour\curve are smooth. virtual double DistanceToPlace( const MbPlacement3D & place, double & t0, double & angle ) const; // \ru Вычислить ближайшую точку кривой к плейсменту. \en Calculate the curve point nearest to a placement. // \ru Дать плоскую кривую и плейсмент, если пространственная кривая плоская (после использования вызывать DeleteItem на двумерную кривую). \en Get the planar curve and placement if the spatial curve is planar (call DeleteItem for two-dimensional curve after using ). - virtual bool GetPlaneCurve( MbCurve *& curve2d, MbPlacement3D & place3d, bool saveParams, PlanarCheckParams params = PlanarCheckParams() ) const; + virtual bool GetPlaneCurve( MbCurve *& curve2d, MbPlacement3D & place3d, bool saveParams, VERSION version = Math::DefaultMathVersion() ) const; // \ru Заполнить плейсмент, если кривая плоская. \en Fill the placement if the curve is planar. - virtual bool GetPlacement( MbPlacement3D & place, PlanarCheckParams params = PlanarCheckParams() ) const; + virtual bool GetPlacement( MbPlacement3D & place, VERSION version = Math::DefaultMathVersion() ) const; // \ru Дать поверхностную кривую, если пространственная кривая поверхностная (после использования вызывать DeleteItem на аргументы). \en Get a surface curve if a spatial curve is on a surface (call DeleteItem for arguments after use). virtual bool GetSurfaceCurve( MbCurve *& curve2d, MbSurface *& surface, VERSION version = Math::DefaultMathVersion() ) const; @@ -742,7 +742,7 @@ inline bool MbSurfaceIntersectionCurve::CopyReadyMutable( const MbSurfaceInterse cube = s.cube; changed = true; } - if ( spaceCurve == c3d_null && s.spaceCurve != c3d_null ) { + if ( spaceCurve == NULL && s.spaceCurve != NULL ) { spaceCurve = (MbCurve3D *)&s.spaceCurve->Duplicate(); spaceCurve->AddRef(); changed = true; diff --git a/C3d/Include/cur_trimmed_curve.h b/C3d/Include/cur_trimmed_curve.h index c9921b2..e981bf8 100644 --- a/C3d/Include/cur_trimmed_curve.h +++ b/C3d/Include/cur_trimmed_curve.h @@ -42,7 +42,7 @@ class MbRegTransform; class MATH_CLASS MbTrimmedCurve : public MbCurve { // \ru Усечение может быть на продолжении кривой (внесенные изменения помечены как E13865) \en Trimming can be on curve extension (made changes are marked as E13865) protected : - MbCurve * basisCurve; ///< \ru Базовая кривая (не может быть c3d_null). \en Base curve (can't be c3d_null). + MbCurve * basisCurve; ///< \ru Базовая кривая (не может быть NULL). \en Base curve (can't be NULL). double trim1; ///< \ru Параметры начальной точки \en Parameters of start point double trim2; ///< \ru Параметры конечной точки \en Parameters of end point int sense; ///< \ru Флаг совпадения направления с направлением базовой кривой (sense==0 не допускается) \en Flag of coincidence of the direction with the direction of the base curve (sense==0 isn't allowed) @@ -75,10 +75,10 @@ public : virtual bool IsSimilar( const MbPlaneItem & ) const; // \ru Являются ли элементы подобными \en Whether the elements are similar virtual bool SetEqual ( const MbPlaneItem & ); // \ru Сделать элементы равными \en Make the elements equal virtual bool IsSame ( const MbPlaneItem & other, double accuracy = LENGTH_EPSILON ) const; // \ru Является ли кривая curve копией данной кривой ? \en Whether curve 'curve' is a duplicate of the current curve. - virtual void Transform( const MbMatrix &, MbRegTransform * ireg = c3d_null, const MbSurface * newSurface = c3d_null ); // \ru Преобразовать элемент согласно матрице \en Transform element according to the matrix - virtual void Move ( const MbVector &, MbRegTransform * = c3d_null, const MbSurface * newSurface = c3d_null ); // \ru Сдвиг \en Translation - virtual void Rotate ( const MbCartPoint & pnt, const MbDirection & angle, MbRegTransform * = c3d_null, const MbSurface * newSurface = c3d_null ); // \ru Поворот \en Rotation - virtual MbPlaneItem & Duplicate( MbRegDuplicate * = c3d_null ) const; // \ru Сделать копию элемента \en Create a copy of the element + virtual void Transform( const MbMatrix &, MbRegTransform * ireg = NULL, const MbSurface * newSurface = NULL ); // \ru Преобразовать элемент согласно матрице \en Transform element according to the matrix + virtual void Move ( const MbVector &, MbRegTransform * = NULL, const MbSurface * newSurface = NULL ); // \ru Сдвиг \en Translation + virtual void Rotate ( const MbCartPoint & pnt, const MbDirection & angle, MbRegTransform * = NULL, const MbSurface * newSurface = NULL ); // \ru Поворот \en Rotation + virtual MbPlaneItem & Duplicate( MbRegDuplicate * = NULL ) const; // \ru Сделать копию элемента \en Create a copy of the element virtual void AddYourGabaritTo( MbRect & ) const; // \ru Добавь свой габарит в прямой прям-к \en Add your own gabarit into the given bounding rectangle virtual void CalculateGabarit( MbRect & ) const; // \ru Определить габаритный прямоугольник кривой. \en Detect the bounding box of a curve. virtual bool IsInRectForDeform( const MbRect & r ) const; // \ru Виден ли объект в заданном прямоугольнике для деформации \en Whether the object is visible in the given rectangle for deformation @@ -189,7 +189,7 @@ public : void SetTrim1( double t ) { trim1 = t; InitParam( trim1, trim2, sense ); } void SetTrim2( double t ) { trim2 = t; InitParam( trim1, trim2, sense ); } - virtual void Inverse( MbRegTransform * iReg = c3d_null ); // \ru Изменить направление кривой \en Change direction of a curve + virtual void Inverse( MbRegTransform * iReg = NULL ); // \ru Изменить направление кривой \en Change direction of a curve virtual bool GetAxisPoint( MbCartPoint & p ) const; // \ru Точка для построения оси \en Point for the axis construction virtual bool IsSimilarToCurve( const MbCurve & curve, double precision = PARAM_PRECISION ) const; // \ru Подобные ли кривые для объединения (слива) \en Whether the curves for union (joining) are similar virtual double GetRadius() const; // \ru Дать физический радиус объекта или ноль, если это невозможно. \en Get the physical radius of the object or null if it impossible. diff --git a/C3d/Include/cur_trimmed_curve3d.h b/C3d/Include/cur_trimmed_curve3d.h index 651c99a..a8dcdfd 100644 --- a/C3d/Include/cur_trimmed_curve3d.h +++ b/C3d/Include/cur_trimmed_curve3d.h @@ -59,13 +59,13 @@ public : // \ru Общие функции математического объекта \en Common functions of the mathematical object virtual MbeSpaceType IsA() const; // \ru Тип элемента \en Type of element - virtual MbSpaceItem & Duplicate( MbRegDuplicate * = c3d_null ) const; // \ru Сделать копию элемента \en Create a copy of the element + virtual MbSpaceItem & Duplicate( MbRegDuplicate * = NULL ) const; // \ru Сделать копию элемента \en Create a copy of the element virtual bool IsSame ( const MbSpaceItem & other, double accuracy = LENGTH_EPSILON ) const; // \ru Является ли объект копией \en Whether the object is a copy virtual bool SetEqual ( const MbSpaceItem & ); // \ru Сделать равным \en Make equal virtual bool IsSimilar( const MbSpaceItem & ) const; // \ru Являются ли объекты подобными \en Whether the objects are similar - virtual void Transform( const MbMatrix3D &, MbRegTransform * = c3d_null ); // \ru Преобразовать элемент согласно матрице \en Transform element according to the matrix - virtual void Move ( const MbVector3D &, MbRegTransform * = c3d_null ); // \ru Сдвиг \en Translation - virtual void Rotate ( const MbAxis3D &, double angle, MbRegTransform * = c3d_null ); // \ru Повернуть вокруг оси \en Rotate about an axis + virtual void Transform( const MbMatrix3D &, MbRegTransform * = NULL ); // \ru Преобразовать элемент согласно матрице \en Transform element according to the matrix + virtual void Move ( const MbVector3D &, MbRegTransform * = NULL ); // \ru Сдвиг \en Translation + virtual void Rotate ( const MbAxis3D &, double angle, MbRegTransform * = NULL ); // \ru Повернуть вокруг оси \en Rotate about an axis virtual void Refresh(); // \ru Сбросить все временные данные \en Reset all temporary data virtual void PrepareIntegralData( const bool forced ) const; // \ru Рассчитать временные (mutable) данные объекта. \en Calculate temporary (mutable) data of an object. @@ -104,18 +104,18 @@ public : virtual MbCurve3D & SetBasisCurve(); virtual MbCurve3D * Trimmed( double t1, double t2, int sense ) const; // \ru Создание усеченной кривой \en Create a trimmed curve - virtual void Inverse( MbRegTransform * iReg = c3d_null ); // \ru Изменить направление \en Change direction + virtual void Inverse( MbRegTransform * iReg = NULL ); // \ru Изменить направление \en Change direction virtual double Curvature ( double ) const; // \ru Кривизна усеченной кривой \en Curvature of a trimmed curve virtual double Step ( double t, double sag ) const; // \ru Вычисление шага по стрелке прогиба. \en Calculation of parameter step by the sag. virtual double DeviationStep( double t, double angle ) const; // \ru Вычисление шага по углу отклонения нормали. \en Calculation of parameter step by the deviation angle. virtual double MetricStep ( double t, double length ) const; // \ru Вычисление шага параметра по длине. \en Calculation of parameter step by the given length. virtual bool IsDegenerate( double eps = METRIC_PRECISION ) const; // \ru Проверка вырожденности кривой \en Check for curve degeneracy - virtual MbCurve * GetMap( const MbMatrix3D &, MbRect1D * pRgn = c3d_null, - VERSION version = Math::DefaultMathVersion(), bool * coincParams = c3d_null ) const; // \ru Дать плоскую проекцию кривой \en Get a planar projection of a curve + virtual MbCurve * GetMap( const MbMatrix3D &, MbRect1D * pRgn = NULL, + VERSION version = Math::DefaultMathVersion(), bool * coincParams = NULL ) const; // \ru Дать плоскую проекцию кривой \en Get a planar projection of a curve virtual size_t GetCount() const; virtual void ChangeCarrier( const MbSpaceItem & item, MbSpaceItem & init ); // \ru Изменение носителя \en Change a carrier - virtual bool IsPlanar ( double accuracy = METRIC_EPSILON ) const; // \ru Является ли кривая плоской \en Whether the curve is planar + virtual bool IsPlanar () const; // \ru Является ли кривая плоской \en Whether the curve is planar virtual bool IsStraight( bool ignoreParams = false ) const; // \ru Является ли линия прямолинейной \en Whether the line is straight virtual double GetRadius() const; // \ru Дать физический радиус объекта или ноль, если это невозможно. \en Get the physical radius of the object or null if it impossible. virtual bool GetCircleAxis ( MbAxis3D & ) const; // \ru Дать ось кривой \en Get axis of curve @@ -137,7 +137,7 @@ public : bool IsBaseParamOn( double t ) const; // \ru Находится ли параметр базовой кривой в диапазоне усеченной кривой \en Whether the parameter of base curve is in range of a trimmed curve // \ru Ближайшая проекция точки на кривую. \en The nearest projection of a point onto the curve. - virtual bool NearPointProjection( const MbCartPoint3D &, double & t, bool ext, MbRect1D * tRange = c3d_null ) const; // \ru Ближайшая проекция точки на кривую \en The nearest projection of a point onto the curve + virtual bool NearPointProjection( const MbCartPoint3D &, double & t, bool ext, MbRect1D * tRange = NULL ) const; // \ru Ближайшая проекция точки на кривую \en The nearest projection of a point onto the curve /// \ru Найти все особые точки функции кривизны кривой. /// \en Find all the special points of the curvature function of the curve. virtual void GetCurvatureSpecialPoints( std::vector & points ) const; @@ -153,9 +153,9 @@ public : virtual void CurveToSubstrate( double & ) const; // \ru Преобразовать параметр кривой в параметр подложки \en Transform a curve parameter to the substrate parameter // \ru Заполнить плейсемент, ести кривая плоская \en Fill the placement if the curve is planar - virtual bool GetPlacement( MbPlacement3D & place, PlanarCheckParams params = PlanarCheckParams() ) const; + virtual bool GetPlacement( MbPlacement3D & place, VERSION version = Math::DefaultMathVersion() ) const; // \ru Дать плоскую кривую и плейсмент, если пространственная кривая плоская (после использования вызывать DeleteItem на двумерную кривую) \en Get the planar curve and placement if the spatial curve is planar (call DeleteItem for two-dimensional curve after using) - virtual bool GetPlaneCurve( MbCurve *& curve2d, MbPlacement3D & place, bool saveParams, PlanarCheckParams params = PlanarCheckParams() ) const; + virtual bool GetPlaneCurve( MbCurve *& curve2d, MbPlacement3D & place, bool saveParams, VERSION version = Math::DefaultMathVersion() ) const; // \ru Дать поверхностную кривую, если пространственная кривая поверхностная (после использования вызывать DeleteItem на аргументы) \en Get a surface curve if a spatial curve is on a surface (call DeleteItem for arguments after using ) virtual bool GetSurfaceCurve( MbCurve *& curve2d, MbSurface *& surface, VERSION version = Math::DefaultMathVersion() ) const; diff --git a/C3d/Include/curve.h b/C3d/Include/curve.h index 9203c64..7c6659f 100644 --- a/C3d/Include/curve.h +++ b/C3d/Include/curve.h @@ -61,19 +61,15 @@ typedef std::vector ConstPlaneCurvesSPtrVector; для плоского моделирования,\n для описания области определения параметров поверхности,\n для построения кривых на поверхностях,\n - для построения кривых пересечения поверхностей.\n - Нормаль к кривой - это перпендикуляр к касательной. \n - Для вычисления направления нормали с учётом кривизны нужно умножить нормаль на знак кривизны. + для построения кривых пересечения поверхностей. \en A curve in two-dimensional space is a vector function of a scalar parameter, given on a finite one-dimensional space. A curve is continuous mapping of some piece of numeric axis to two-dimensional space.\n - Two-dimensional curve is used: \n - for planar modeling, \n - for description of surface parameters domain, \n - for construction of curves on surfaces, \n - for constructing of surfaces intersection curves. \n - Normal vector to a curve is perpendicular to tangent. \n - To calculate the direction of normal according curvature, multiply this normal vector by the curvature sign. \~ + Two-dimensional curve is used:\n + for planar modeling,\n + for description of surface parameters domain,\n + for construction of curves on surfaces,\n + for constructing of surfaces intersection curves. \~ \ingroup Curves_2D */ // --- @@ -98,10 +94,10 @@ public : virtual MbePlaneType IsA() const = 0; // \ru Тип элемента. \en A type of element. virtual MbePlaneType Type() const; // \ru Групповой тип элемента. \en Group element type. virtual MbePlaneType Family() const; // \ru Семейство объекта. \en Family of object. - virtual MbPlaneItem & Duplicate( MbRegDuplicate * = c3d_null ) const = 0; // \ru Создать копию. \en Create a copy. - virtual void Transform( const MbMatrix &, MbRegTransform * ireg = c3d_null, const MbSurface * newSurface = c3d_null ) = 0; // \ru Преобразовать согласно матрице. \en Transform according to the matrix. - virtual void Move ( const MbVector &, MbRegTransform * = c3d_null, const MbSurface * newSurface = c3d_null ) = 0; // \ru Сдвинуть вдоль вектора. \en Move along a vector. - virtual void Rotate( const MbCartPoint & pnt, const MbDirection & angle, MbRegTransform * = c3d_null, const MbSurface * newSurface = c3d_null ) = 0; // \ru Поворот вокруг точки на угол. \en Rotation at angle around a point. + virtual MbPlaneItem & Duplicate( MbRegDuplicate * = NULL ) const = 0; // \ru Создать копию. \en Create a copy. + virtual void Transform( const MbMatrix &, MbRegTransform * ireg = NULL, const MbSurface * newSurface = NULL ) = 0; // \ru Преобразовать согласно матрице. \en Transform according to the matrix. + virtual void Move ( const MbVector &, MbRegTransform * = NULL, const MbSurface * newSurface = NULL ) = 0; // \ru Сдвинуть вдоль вектора. \en Move along a vector. + virtual void Rotate( const MbCartPoint & pnt, const MbDirection & angle, MbRegTransform * = NULL, const MbSurface * newSurface = NULL ) = 0; // \ru Поворот вокруг точки на угол. \en Rotation at angle around a point. virtual bool SetEqual( const MbPlaneItem & ) = 0; // \ru Сделать объект равным данному. \en Make an object equal to a given one. virtual bool IsSame( const MbPlaneItem & other, double accuracy = LENGTH_EPSILON ) const = 0; // \ru Является ли кривая curve копией данной кривой? \en Is a curve a copy of a given curve? virtual void Refresh(); // \ru Сбросить все временные данные. \en Reset all temporary data. @@ -335,9 +331,9 @@ public : \param[out] fir - \ru Производная. \en Derivative with respect to t. \~ \param[out] sec - \ru Вторая производная по t, если не ноль. - \en Second derivative with respect to t, if not c3d_null. \~ + \en Second derivative with respect to t, if not NULL. \~ \param[out] thir - \ru Третья производная по t, если не ноль. - \en Third derivative with respect to t, if not c3d_null. \~ + \en Third derivative with respect to t, if not NULL. \~ \ingroup Curves_3D */ virtual void Explore( double & t, bool ext, @@ -476,7 +472,7 @@ public : /// \ru Сбросить текущее значение параметра. \en Reset the current value of parameter. virtual void ResetTCalc() const; /// \ru Изменить направления кривой на противоположное. \en Set the opposite direction of curve. - virtual void Inverse( MbRegTransform * iReg = c3d_null ) = 0; + virtual void Inverse( MbRegTransform * iReg = NULL ) = 0; /// \ru Построить эквидистантную кривую, смещённую на заданное расстояние. \en Construct the equidistant curve which is shifted by the given value. virtual MbCurve * Offset( double rad ) const; @@ -549,10 +545,10 @@ public : \en A constructed NURBS-curve. \~ \param[in] nInfo - \ru Параметры преобразования кривой в NURBS. \en Parameters of conversion of a curve to NURBS. \~ - \result \ru Построенная NURBS кривая или c3d_null при неуспешном построении. - \en The constructed NURBS curve or c3d_null in a case of failure. \~ + \result \ru Построенная NURBS кривая или NULL при неуспешном построении. + \en The constructed NURBS curve or NULL in a case of failure. \~ */ - MbNurbs * NurbsCurve( const MbCurveIntoNurbsInfo * nInfo = c3d_null ) const; + MbNurbs * NurbsCurve( const MbCurveIntoNurbsInfo * nInfo = NULL ) const; /** \brief \ru Построить NURBS копию кривой. \en Construct a NURBS copy of a curve. \~ @@ -574,8 +570,8 @@ public : 'sense' > 0 - direction coincide. \~ \param[in] nInfo - \ru Параметры преобразования кривой в NURBS. \en Parameters of conversion of a curve to NURBS. \~ - \result \ru Построенная NURBS кривая или c3d_null при неуспешном построении. - \en The constructed NURBS curve or c3d_null in a case of failure. \~ + \result \ru Построенная NURBS кривая или NULL при неуспешном построении. + \en The constructed NURBS curve or NULL in a case of failure. \~ */ virtual MbNurbs * NurbsCurve( const MbCurveIntoNurbsInfo & nInfo ) const = 0; @@ -589,8 +585,8 @@ public : If the flag of accurate approximation is not set in parameters then NURBS without multiple knots is constructed. \~ \param[in] tParameters - \ru Параметры построения NURBS копии кривой. \en Parameters for the construction of a NURBS copy of the curve. \~ - \result \ru Построенная NURBS кривая или c3d_null при неуспешном построении. - \en The constructed NURBS curve or c3d_null in a case of failure. \~ + \result \ru Построенная NURBS кривая или NULL при неуспешном построении. + \en The constructed NURBS curve or NULL in a case of failure. \~ */ virtual MbCurve * NurbsCurve( const MbNurbsParameters & tParameters ) const; @@ -707,10 +703,10 @@ public : \en End parameter of trimming. \~ \param[in, out] part2 - \ru Может заполниться результатом усечения, если не смогли изменить саму кривую. В этом случае возвращаемый результат dp_Degenerated. - Иначе = c3d_null. + Иначе = NULL. \en This may be filled by a result of trimming if the curve was not changed. In this case the returned value is dp_Degenerated. - Otherwise c3d_null is returned. \~ + Otherwise NULL is returned. \~ \result \ru Состояние кривой после модификации:\n dp_Degenerated - кривая выродилась, может быть три варианта: кривая не была изменена, так как в результате преобразования она бы выродилась, @@ -802,7 +798,7 @@ public : \en True - if there is found a projection which satisfies to all input conditions. \~ */ virtual bool NearPointProjection( const MbCartPoint & pnt, double xEpsilon, double yEpsilon, - double & t, bool ext, MbRect1D * tRange = c3d_null ) const; + double & t, bool ext, MbRect1D * tRange = NULL ) const; /** \brief \ru Вычислить проекцию точки на кривую. \en Calculate the point projection to the curve. \~ @@ -1050,7 +1046,7 @@ public : \en A length of a curve between points. \~ */ virtual double LengthBetween2Points( MbCartPoint & p1, MbCartPoint & p2, - MbCartPoint * pc = c3d_null ) const; + MbCartPoint * pc = NULL ) const; /// \ru Вычислить центр тяжести кривой. \en Calculate the center of gravity of a curve. virtual bool GetWeightCentre ( MbCartPoint & ) const; @@ -1267,7 +1263,7 @@ public : \param[in] epsilon - \ru Погрешность вычисления. \en The accuracy of the calculation. \~ */ - virtual bool IsContinuousDerivative( bool & contLength, bool & contDirect, c3d::DoubleVector * params = c3d_null, double epsilon = EPSILON ) const; + virtual bool IsContinuousDerivative( bool & contLength, bool & contDirect, c3d::DoubleVector * params = NULL, double epsilon = EPSILON ) const; /** \brief \ru Устранить разрывы первых производных по длине. \en Eliminate the discontinuities of the first derivative at length. @@ -1435,7 +1431,7 @@ inline void MbCurve::Normal( double & t, MbVector & v ) const //------------------------------------------------------------------------------ // \ru Вычислить нормальный вектор. \en Calculate the normal vector. // --- -inline void MbCurve::Normal( double & t, MbDirection & norm ) const { +inline void MbCurve::Normal( double &t, MbDirection &norm ) const { Tangent( t, norm ); norm.Perpendicular(); } diff --git a/C3d/Include/curve3d.h b/C3d/Include/curve3d.h index e4266a0..60f3190 100644 --- a/C3d/Include/curve3d.h +++ b/C3d/Include/curve3d.h @@ -69,18 +69,12 @@ typedef std::pair ConstSpaceCurvesSetRet; принимающего значения на конечной одномерной области. Координаты точки кривой являются однозначными непрерывными функциями параметра кривой. Кривая представляет собой непрерывное отображение некоторого участка числовой оси в трёхмерное пространство.\n - Кривые используются для построения поверхностей. \n - Нормаль к кривой вычисляется с учетом кривизны (второй производной). \n - Для прямолинейных кривых это вектор нулевой за исключением плоских прямолинейных кривых, - где он перпендикулярен нормали плоскости этой кривой. + Кривые используются для построения поверхностей. \en A curve in space is a vector function of a scalar parameter, which is set on a finite one-dimensional space. Coordinates of the point are single-valued continuous functions of curve parameter. A curve is continuous mapping from a piece of numeric axis to the three-dimensional space.\n - Curves are used to construct surfaces. \n - Normal to a curve is calculated taking into account curvature (second derivative). \n - For rectilinear curves it's a zero vector except for flat rectilinear curves, - where it's perpendicular to a normal of curve plane. \~ + Curves are used to construct surfaces. \~ \ingroup Curves_3D */ // --- @@ -107,14 +101,14 @@ public : virtual MbeSpaceType IsA() const = 0; // \ru Тип элемента. \en A type of element. virtual MbeSpaceType Type() const; // \ru Групповой тип элемента. \en Group element type. virtual MbeSpaceType Family() const; // \ru Семейство объекта. \en Family of object. - virtual MbSpaceItem & Duplicate( MbRegDuplicate * = c3d_null ) const = 0; // \ru Сделать копию элемента. \en Create a copy of the element. + virtual MbSpaceItem & Duplicate( MbRegDuplicate * = NULL ) const = 0; // \ru Сделать копию элемента. \en Create a copy of the element. /// \ru Сделать копию с измененным направлением. \en Create a copy with changed direction. virtual MbCurve3D & InverseDuplicate() const; virtual bool IsSame ( const MbSpaceItem & other, double accuracy = LENGTH_EPSILON ) const = 0; // \ru Являются ли объекты равными. \en Determine whether objects are equal. virtual bool SetEqual ( const MbSpaceItem & ) = 0; // \ru Сделать равным. \en Make equal. - virtual void Transform( const MbMatrix3D &, MbRegTransform * = c3d_null ) = 0; // \ru Преобразовать объект согласно матрице. \en Transform an object according to the matrix. - virtual void Move ( const MbVector3D &, MbRegTransform * = c3d_null ) = 0; // \ru Сдвинуть объект вдоль вектора. \en Move an object along a vector. - virtual void Rotate ( const MbAxis3D &, double angle, MbRegTransform * = c3d_null ) = 0; // \ru Повернуть вокруг оси. \en Rotate around an axis. + virtual void Transform( const MbMatrix3D &, MbRegTransform * = NULL ) = 0; // \ru Преобразовать объект согласно матрице. \en Transform an object according to the matrix. + virtual void Move ( const MbVector3D &, MbRegTransform * = NULL ) = 0; // \ru Сдвинуть объект вдоль вектора. \en Move an object along a vector. + virtual void Rotate ( const MbAxis3D &, double angle, MbRegTransform * = NULL ) = 0; // \ru Повернуть вокруг оси. \en Rotate around an axis. virtual double DistanceToPoint( const MbCartPoint3D & ) const; // \ru Вычислить расстояние до точки. \en Calculate the distance to a point. virtual void AddYourGabaritTo( MbCube & ) const; // \ru Добавить габарит кривой в куб. \en Add a bounding box of a curve to a cube. /// \ru Перевести все временные (mutable) данные объекта в неопределённое (исходное) состояние. \en Translate all the time (mutable) data objects in an inconsistent (initial) state. @@ -262,9 +256,9 @@ public : \param[out] fir - \ru Производная. \en Derivative with respect to t. \~ \param[out] sec - \ru Вторая производная по t, если не ноль. - \en Second derivative with respect to t, if not c3d_null. \~ + \en Second derivative with respect to t, if not NULL. \~ \param[out] thir - \ru Третья производная по t, если не ноль. - \en Third derivative with respect to t, if not c3d_null. \~ + \en Third derivative with respect to t, if not NULL. \~ \ingroup Curves_3D */ virtual void Explore( double & t, bool ext, @@ -273,9 +267,9 @@ public : /** \brief \ru Вычислить точку и производные на кривой. \en Calculate point and derivatives on the curve. \~ \details \ru Функция перегружена у MbSurfaceIntersectionCurve и MbSilhouetteCurve для приближённого быстрого вычисления точки и производных. - В остальных поверхностях эквивалентна функции Explore(t,false,pnt,fir,sec,c3d_null). + В остальных поверхностях эквивалентна функции Explore(t,false,pnt,fir,sec,NULL). \en The function is overloaded in MbSurfaceIntersectionCurve and MbSilhouetteCurve for the fast approximated calculation of a point and derivatives. - In other surfaces it is equivalent to the function Explore(t,false,pnt,fir,sec,c3d_null). \~ + In other surfaces it is equivalent to the function Explore(t,false,pnt,fir,sec,NULL). \~ \param[in] t - \ru Параметр. \en Parameter. \~ \param[out] pnt - \ru Вычисленная точка. @@ -283,7 +277,7 @@ public : \param[out] fir - \ru Производная. \en Derivative with respect to t. \~ \param[out] sec - \ru Вторая производная по t, если не ноль. - \en Second derivative with respect to t, if not c3d_null. \~ + \en Second derivative with respect to t, if not NULL. \~ \ingroup Curves_3D */ virtual void FastApproxExplore( double & t, MbCartPoint3D & pnt, MbVector3D & fir, MbVector3D * sec ) const; @@ -368,7 +362,7 @@ public : /// \ru Сбросить текущее значение параметра. \en Reset the current value of parameter. virtual void ResetTCalc() const; /// \ru Изменить направление кривой. \en Change direction of a curve. - virtual void Inverse( MbRegTransform * iReg = c3d_null ) = 0; + virtual void Inverse( MbRegTransform * iReg = NULL ) = 0; /// \ru Вернуть базовую кривую, если есть, или себя \en Returns the base curve if exists or itself virtual const MbCurve3D & GetBasisCurve() const; /// \ru Вернуть базовую кривую, если есть, или себя \en Returns the base curve if exists or itself @@ -388,10 +382,10 @@ public : The number of knots for NURBS is defined depending on the curve. \~ \param[in] nInfo - \ru Параметры преобразования кривой в NURBS. \en Parameters of conversion of a curve to NURBS. \~ - \result \ru Построенная NURBS кривая или c3d_null при неуспешном построении. - \en The constructed NURBS curve or c3d_null in a case of failure. \~ + \result \ru Построенная NURBS кривая или NULL при неуспешном построении. + \en The constructed NURBS curve or NULL in a case of failure. \~ */ - MbNurbs3D * NurbsCurve( const MbCurveIntoNurbsInfo * nInfo = c3d_null ) const; + MbNurbs3D * NurbsCurve( const MbCurveIntoNurbsInfo * nInfo = NULL ) const; /** \brief \ru Построить NURBS копию кривой. \en Construct a NURBS copy of a curve. \~ @@ -411,8 +405,8 @@ public : 'sense' > 0 - direction coincide. \~ \param[in] nInfo - \ru Параметры преобразования кривой в NURBS. \en Parameters of conversion of a curve to NURBS. \~ - \result \ru Построенная NURBS кривая или c3d_null при неуспешном построении. - \en The constructed NURBS curve or c3d_null in a case of failure. \~ + \result \ru Построенная NURBS кривая или NULL при неуспешном построении. + \en The constructed NURBS curve or NULL in a case of failure. \~ */ virtual MbNurbs3D * NurbsCurve( const MbCurveIntoNurbsInfo & nInfo ) const; @@ -426,8 +420,8 @@ public : If the flag of accurate approximation is not set in parameters then NURBS without multiple knots is constructed. \~ \param[in] tParameters - \ru Параметры построения NURBS копии кривой. \en Parameters for the construction of a NURBS copy of the curve. \~ - \result \ru Построенная NURBS кривая или c3d_null при неуспешном построении. - \en The constructed NURBS curve or c3d_null in a case of failure. \~ + \result \ru Построенная NURBS кривая или NULL при неуспешном построении. + \en The constructed NURBS curve or NULL in a case of failure. \~ \ingroup Curves_3D */ virtual MbCurve3D * NurbsCurve( const MbNurbsParameters & tParameters ) const; @@ -440,8 +434,8 @@ public : \en Parameters for the construction of a NURBS copy of the curve. \~ \param[in] epsilon - \ru Точность аппроксимации. \en The tolerance of approximation. \~ - \result \ru Построенная NURBS кривая или c3d_null при неуспешном построении. - \en The constructed NURBS curve or c3d_null in a case of failure. \~ + \result \ru Построенная NURBS кривая или NULL при неуспешном построении. + \en The constructed NURBS curve or NULL in a case of failure. \~ */ virtual size_t NurbsCurveMinPoints( const MbNurbsParameters & tParameters, double epsilon = c3d::METRIC_DELTA ) const; @@ -558,7 +552,7 @@ public : /// \ru Является ли линия прямолинейной? \en Whether the line is straight? virtual bool IsStraight( bool ignoreParams = false ) const; /// \ru Является ли кривая плоской? \en Is a curve planar? - virtual bool IsPlanar ( double accuracy = METRIC_EPSILON ) const; + virtual bool IsPlanar () const; /// \ru Являются ли стыки контура/кривой гладкими? \en Are joints of contour/curve smooth? virtual bool IsSmoothConnected( double angleEps ) const; /// \ru Изменить носитель. Для поверхностных кривых. \en Change the carrier. For surface curves. @@ -594,20 +588,19 @@ public : Если кривая представляет собой контур, то узловые точки контура дублируются. \en Get an array of drawn points with a given sag. If the cure is a contour then knots of a contour are duplicated. \~ - \param[in] stepData - \ru Данные для вычисления шага. - \en Data for step calculation. \~ - \param[in, out] polygon - \ru Полигон рассчитанных точек на кривой. + \param[in] sag - \ru Максимальная величина прогиба. + \en Maximal value of sag. \~ + \param[in, out] poligon - \ru Полигон рассчитанных точек на кривой. \en A polygon of calculated points on a curve. \~ \ingroup Curves_3D */ - virtual void CalculatePolygon( const MbStepData & stepData, MbPolygon3D & polygon ) const; // \ru Рассчитать полигон. \en Calculate a polygon. - - DEPRECATE_DECLARE void CalculatePolygon( double, MbPolygon3D & ) const; // The method deprecated. It will be removed at 2018. Use CalculatePolygon( MbStepData(ist_SpaceStep,sag), poligon ); \~ + virtual void CalculatePolygon( const MbStepData & stepData, MbPolygon3D & poligon ) const; // \ru Рассчитать полигон. \en Calculate a polygon. + void CalculatePolygon( double sag, MbPolygon3D & poligon ) const; // The method deprecated. It will be removed at 2018. Use CalculatePolygon( MbStepData(ist_SpaceStep,sag), poligon ); \~ /// \ru Выдать центр кривой. \en Give the curve center. - virtual void GetCentre ( MbCartPoint3D & ) const; + virtual void GetCentre ( MbCartPoint3D & c ) const; /// \ru Выдать центр тяжести кривой. \en Give the gravity center of a curve. - virtual void GetWeightCentre( MbCartPoint3D & ) const; + virtual void GetWeightCentre( MbCartPoint3D & wc ) const; // \ru Проекция точки на кривую (метод Ньютона). \en Point projection on a curve (the Newton method). /** \brief \ru Найти проекцию точки на кривую. @@ -651,7 +644,7 @@ public : \en True - if there is found a projection which satisfies to all input conditions. \~ \ingroup Curves_3D */ - virtual bool NearPointProjection ( const MbCartPoint3D &pnt, double & t, bool ext, MbRect1D * tRange = c3d_null ) const; + virtual bool NearPointProjection ( const MbCartPoint3D &pnt, double & t, bool ext, MbRect1D * tRange = NULL ) const; // \ru Изоклины кривой (метод Ньютона). \en Isoclines of a curve (Newton method). /** \brief \ru Найти изоклины кривой. @@ -723,17 +716,17 @@ public : \param[in] version - \ru Версия, по умолчанию - последняя. \en Version, last by default. \~ \param[in, out] coincParams - \ru Флаг совпадения параметризации исходной кривой и ее проекции \n - если coincParams != c3d_null, функция попытается сделать проекцию с совпадающей параметризацией \n + если coincParams != NULL, функция попытается сделать проекцию с совпадающей параметризацией \n если в результате *coincParams = true, у проекции параметризация совпадает с параметрицацией исходной кривой. \en A flag of coincidence between parameterization of initial curve and its projection \n - if coincParams != c3d_null then the function tries to create a projection with coincident parameterization \n + if coincParams != NULL then the function tries to create a projection with coincident parameterization \n if *coincParams = true then parameterization of projection coincides with parameterization of initial curve. \~ \return \ru Двумерная проекция кривой. \en Two-dimensional projection of a curve \~ \ingroup Curves_3D */ - virtual MbCurve * GetMap( const MbMatrix3D & into, MbRect1D * pRegion = c3d_null, - VERSION version = Math::DefaultMathVersion(), bool * coincParams = c3d_null ) const; + virtual MbCurve * GetMap( const MbMatrix3D & into, MbRect1D * pRegion = NULL, + VERSION version = Math::DefaultMathVersion(), bool * coincParams = NULL ) const; /** \brief \ru Построить плоскую проекцию некоторой части пространственной кривой. \en Construct a planar projection of a piece of a space curve. \~ @@ -750,7 +743,7 @@ public : \ingroup Curves_3D */ virtual MbCurve * GetMapPsp( const MbMatrix3D & into, double zNear, - MbRect1D * pRegion = c3d_null ) const; + MbRect1D * pRegion = NULL ) const; /** \brief \ru Построить плоскую проекцию пространственной кривой на плоскость. \en Construct a planar projection of a space curve to a plane. \~ @@ -790,7 +783,7 @@ public : \param[in] epsilon - \ru Погрешность вычисления. \en The accuracy of the calculation. \~ */ - virtual bool IsContinuousDerivative( bool & contLength, bool & contDirect, c3d::DoubleVector * params = c3d_null, double epsilon = EPSILON ) const; + virtual bool IsContinuousDerivative( bool & contLength, bool & contDirect, c3d::DoubleVector * params = NULL, double epsilon = EPSILON ) const; /** \brief \ru Устранить разрывы первых производных по длине. \en Eliminate the discontinuities of the first derivative at length. @@ -982,11 +975,11 @@ public : virtual void CurveToSubstrate( double & ) const; /// \ru Дать плоскую кривую и плейсмент, если пространственная кривая плоская (после использования вызывать DeleteItem на двумерную кривую). \en Get planar curve and placement if the space curve is planar (after the using call DeleteItem for two-dimensional curves) - virtual bool GetPlaneCurve( MbCurve *& curve2d, MbPlacement3D & place, bool saveParams, PlanarCheckParams params = PlanarCheckParams() ) const; + virtual bool GetPlaneCurve( MbCurve *& curve2d, MbPlacement3D & place, bool saveParams, VERSION version = Math::DefaultMathVersion() ) const; /// \ru Дать плоскую кривую и плейсмент, если пространственная кривая плоская (после использования вызывать DeleteItem на двумерную кривую). \en Get planar curve and placement if the space curve is planar (after the using call DeleteItem for two-dimensional curves) - bool GetPlaneCurve( SPtr & curve2d, MbPlacement3D & place, bool saveParams, PlanarCheckParams params = PlanarCheckParams() ) const; + bool GetPlaneCurve( SPtr & curve2d, MbPlacement3D & place, bool saveParams, VERSION version = Math::DefaultMathVersion() ) const; /// \ru Дать плоскую кривую и плейсмент, если пространственная кривая плоская (после использования вызывать DeleteItem на двумерную кривую). \en Get planar curve and placement if the space curve is planar (after the using call DeleteItem for two-dimensional curves) - bool GetPlaneCurve( SPtr & curve2d, MbPlacement3D & place, bool saveParams, PlanarCheckParams params = PlanarCheckParams() ) const; + bool GetPlaneCurve( SPtr & curve2d, MbPlacement3D & place, bool saveParams, VERSION version = Math::DefaultMathVersion() ) const; /// \ru Дать поверхностную кривую, если пространственная кривая поверхностная (после использования вызывать DeleteItem на аргументы). \en Get surface curve if the space curve is surface (after the using call DeleteItem for arguments) virtual bool GetSurfaceCurve( MbCurve *& curve2d, MbSurface *& surface, VERSION version = Math::DefaultMathVersion() ) const; /// \ru Дать поверхностную кривую, если пространственная кривая поверхностная (после использования вызывать DeleteItem на аргументы). \en Get surface curve if the space curve is surface (after the using call DeleteItem for arguments) @@ -994,7 +987,7 @@ public : /// \ru Дать поверхностную кривую, если пространственная кривая поверхностная (после использования вызывать DeleteItem на аргументы). \en Get surface curve if the space curve is surface (after the using call DeleteItem for arguments) bool GetSurfaceCurve( SPtr & curve2d, SPtr & surface, VERSION version = Math::DefaultMathVersion() ) const; /// \ru Заполнить плейсемент, если кривая плоская. \en Fill the placement if a curve is planar. - virtual bool GetPlacement( MbPlacement3D & place, PlanarCheckParams params = PlanarCheckParams() ) const; + virtual bool GetPlacement( MbPlacement3D & place, VERSION version = Math::DefaultMathVersion() ) const; /// \ru Является ли объект смещением. \en Is the object is a shift? virtual bool IsShift( const MbSpaceItem &, MbVector3D &, bool & isSame, double accuracy = LENGTH_EPSILON ) const; /// \ru Подобные ли кривые для объединения (слива). \en Whether the curves to union (joining) are similar. @@ -1124,16 +1117,15 @@ MATH_FUNC (MbeNewtonResult) CurveCrossNewton( const MbCurve3D & curve1, bool ext \en Calculate polygon points of curve. \n \~ \param[in] curve - \ru Кривая. \en Curve. \~ - \param[in] stepData - \ru Данные для вычисления шага. - \en Data for step calculation. \~ + \param[in] sag - \ru Максимальная величина прогиба. + \en Maximal value of sag. \~ \param[out] paramPoints - \ru Массив параметров и точек. \en Array of parameters and points. \~ \ingroup Curves_3D */ // --- MATH_FUNC (void) CalculatePolygon( const MbCurve3D & curve, const MbStepData & stepData, std::vector< std::pair > & paramPoints ); - -DEPRECATE_DECLARE MATH_FUNC (void) CalculatePolygon( const MbCurve3D &, double, std::vector< std::pair > & ); // The method deprecated. It will be removed at 2018. Use ::CalculatePolygon( curve, MbStepData(ist_SpaceStep,sag), paramPoints ); \~ +DEPRECATE_DECLARE MATH_FUNC (void) CalculatePolygon( const MbCurve3D & curve, double sag, std::vector< std::pair > & paramPoints ); // The method deprecated. It will be removed at 2018. Use ::CalculatePolygon( curve, MbStepData(ist_SpaceStep,sag), paramPoints ); \~ #endif // __CURVE3D_H diff --git a/C3d/Include/dxf_converter.h b/C3d/Include/dxf_converter.h index 239ff52..7f16a81 100644 --- a/C3d/Include/dxf_converter.h +++ b/C3d/Include/dxf_converter.h @@ -267,8 +267,8 @@ public: const std::vector< SPtr > & m_faces ); size_t GetSolidBodiesCount() const { return solid_bodies.Count(); } - const DXFSolidBody * GetSolidBody( size_t k ) const { return ((k < solid_bodies.Count()) ? solid_bodies[k] : c3d_null); } - DXFSolidBody * SetSolidBody( size_t k ) { return ((k < solid_bodies.Count()) ? solid_bodies[k] : c3d_null); } + const DXFSolidBody * GetSolidBody( size_t k ) const { return ((k < solid_bodies.Count()) ? solid_bodies[k] : NULL); } + DXFSolidBody * SetSolidBody( size_t k ) { return ((k < solid_bodies.Count()) ? solid_bodies[k] : NULL); } const DXFCompositeData & GetData() const { return data;} @@ -406,7 +406,7 @@ public: \en Complete the document creation. \~ */ void CompleteDocument ( ItModelDocument & model_document, - IProgressIndicator * indicator = c3d_null ); + IProgressIndicator * indicator = NULL ); /// \ru Отобразить текующее состояние хода операции. \en Show the current state of operation progress. void ConvertLastComposite( uint32 defaultColor ); diff --git a/C3d/Include/func_analytical_function.h b/C3d/Include/func_analytical_function.h index c946b99..8b19060 100644 --- a/C3d/Include/func_analytical_function.h +++ b/C3d/Include/func_analytical_function.h @@ -77,7 +77,7 @@ public : virtual void Explore( double & t, bool ext, double & val, double & fir, double * sec, double * thr ) const; - virtual void Inverse ( MbRegTransform * iReg = c3d_null ); // \ru Изменить направление \en Change direction + virtual void Inverse ( MbRegTransform * iReg = NULL ); // \ru Изменить направление \en Change direction virtual double Step ( double t, double sag ) const; virtual double DeviationStep( double t, double angle ) const; @@ -162,7 +162,7 @@ public : virtual double SecondDer ( double & t ) const; // \ru Вторая производная по t \en The second derivative with respect to t virtual double ThirdDer ( double & t ) const; // \ru Третья производная по t \en The third derivative with respect to t - virtual void Inverse ( MbRegTransform * iReg = c3d_null ); // \ru Изменить направление \en Change direction + virtual void Inverse ( MbRegTransform * iReg = NULL ); // \ru Изменить направление \en Change direction virtual double Step ( double t, double sag ) const; virtual double DeviationStep ( double t, double angle ) const; diff --git a/C3d/Include/func_const_function.h b/C3d/Include/func_const_function.h index 9fcb2ba..559a468 100644 --- a/C3d/Include/func_const_function.h +++ b/C3d/Include/func_const_function.h @@ -61,7 +61,7 @@ public: virtual void Explore( double & t, bool ext, double & val, double & fir, double * sec, double * thr ) const; - virtual void Inverse ( MbRegTransform * iReg = c3d_null ); // \ru Изменить направление \en Change direction + virtual void Inverse ( MbRegTransform * iReg = NULL ); // \ru Изменить направление \en Change direction virtual double Step( double t, double sag ) const; virtual double DeviationStep( double t, double angle ) const; diff --git a/C3d/Include/func_cubic_function.h b/C3d/Include/func_cubic_function.h index 4aa43c3..73a3667 100644 --- a/C3d/Include/func_cubic_function.h +++ b/C3d/Include/func_cubic_function.h @@ -83,7 +83,7 @@ public: // \ru Вычислить аргумент t по значению функции. \en Calculate the argument t by the function value. virtual double Argument( double & val ) const; - virtual void Inverse( MbRegTransform * iReg = c3d_null ); // \ru Изменить направление \en Change direction + virtual void Inverse( MbRegTransform * iReg = NULL ); // \ru Изменить направление \en Change direction virtual double Step( double t, double sag ) const; virtual double DeviationStep( double t, double angle ) const; diff --git a/C3d/Include/func_cubic_spline_function.h b/C3d/Include/func_cubic_spline_function.h index 5294a29..efd89b7 100644 --- a/C3d/Include/func_cubic_spline_function.h +++ b/C3d/Include/func_cubic_spline_function.h @@ -72,7 +72,7 @@ public: virtual void Explore( double & t, bool ext, double & val, double & fir, double * sec, double * thr ) const; - virtual void Inverse( MbRegTransform * iReg = c3d_null ); // \ru Изменить направление \en Change direction + virtual void Inverse( MbRegTransform * iReg = NULL ); // \ru Изменить направление \en Change direction virtual double Step( double t, double sag ) const; virtual double DeviationStep( double t, double angle ) const; diff --git a/C3d/Include/func_line_function.h b/C3d/Include/func_line_function.h index 17897c2..137012d 100644 --- a/C3d/Include/func_line_function.h +++ b/C3d/Include/func_line_function.h @@ -67,7 +67,7 @@ public: // \ru Вычислить аргумент t по значению функции. \en Calculate the argument t by the function value. virtual double Argument( double & val ) const; - virtual void Inverse( MbRegTransform * iReg = c3d_null ); // \ru Изменить направление \en Change direction + virtual void Inverse( MbRegTransform * iReg = NULL ); // \ru Изменить направление \en Change direction virtual double Step( double t, double sag ) const; virtual double DeviationStep( double t, double angle ) const; diff --git a/C3d/Include/func_power_function.h b/C3d/Include/func_power_function.h index 3018514..c00ee31 100644 --- a/C3d/Include/func_power_function.h +++ b/C3d/Include/func_power_function.h @@ -67,7 +67,7 @@ public: virtual void Explore( double & t, bool ext, double & val, double & fir, double * sec, double * thr ) const; - virtual void Inverse( MbRegTransform * iReg = c3d_null ); // \ru Изменить направление \en Change direction + virtual void Inverse( MbRegTransform * iReg = NULL ); // \ru Изменить направление \en Change direction virtual double Step( double t, double sag ) const; virtual double DeviationStep( double t, double angle ) const; diff --git a/C3d/Include/func_serve_function.h b/C3d/Include/func_serve_function.h index c199777..3c4072d 100644 --- a/C3d/Include/func_serve_function.h +++ b/C3d/Include/func_serve_function.h @@ -32,10 +32,10 @@ public : public : ///< \ru Конструктор по умолчанию. \en Default constructor. - MbServeFunction(); + MbServeFunction(); private: ///< \ru Конструктор по параметрам. \en Constructor by parameters. - MbServeFunction( double ka, double kb, double kc, double t1, double t2 ); + MbServeFunction( double ka, double kb, double kc, double t1, double t2 ); ///< \ru Конструктор копировния. \en Copy constructor. MbServeFunction( const MbServeFunction & ); public : @@ -48,7 +48,7 @@ public: \param[in] t1, t2 - \ru Область определения репараметризованной кривой \en Parametric region of the reparameterized curve. \~ */ - void InitLinear( double basisTMin, double basisTMax, double t1, double t2 ); + void InitLinear( double basisTMin, double basisTMax, double t1, double t2 ); /** \brief \ru Инициализация переменных для репараметризации с заданной производной в начале. \en Initialization of variables for reparameterization with a given derivative at the beginning. \~ @@ -60,11 +60,11 @@ public: \en The derivative of the base curve parameter at the beginning of the curve. \~ \return - \ru true - если репараметризация выполнена успешно, false - если репараметризация оказалась вырожденной и была сведена к линейной. - \en true - if reparameterization is successful, + \en true - if reparameterization is successful, false - if the reparametrization is degenerate and reduced to linear. \~ */ - bool InitQuadratic( double basisTMin, double basisTMax, double t1, double t2, double begDer ); - + bool InitQuadratic( double basisTMin, double basisTMax, double t1, double t2, double begDer ); + /** \brief \ru Репараметризация, обеспечивающая на концах новой кривой указаные производные параметра. \en Reparametrization providing the indicated derivatives of the parameter at the ends of the new curve. \~ \details \ru Параметрическая ширина будет подобрана автоматически, исходя из значений производных. @@ -75,10 +75,10 @@ public: \en Derivatives of the base curve parameter at the beginning and end of the curve. \~ \return - \ru true - репараметризация выполнена успешно, false - репараметризация оказалась вырожденной и была сведена к линейной. - \en true - reparameterization is successful, + \en true - reparameterization is successful, false - reparametrization is degenerate and reduced to linear. \~ */ - bool InitScaledEnds( double basisTMin, double basisTMax, double dt1, double dt2); + bool InitScaledEnds( double basisTMin, double basisTMax, double dt1, double dt2); public: // \ru Общие функции математического объекта \en Common functions of mathematical object virtual MbeFunctionType IsA() const; // \ru Тип элемента \en A type of element @@ -108,7 +108,7 @@ public: // \ru Вычислить аргумент t по значению функции. \en Calculate the argument t by the function value. virtual double Argument( double & val ) const; - virtual void Inverse( MbRegTransform * iReg = c3d_null ); // \ru Изменить направление \en Change direction + virtual void Inverse( MbRegTransform * iReg = NULL ); // \ru Изменить направление \en Change direction virtual double Step( double t, double sag ) const; virtual double DeviationStep( double t, double angle ) const; diff --git a/C3d/Include/func_sinus_function.h b/C3d/Include/func_sinus_function.h index 0bb33ef..2a93ef0 100644 --- a/C3d/Include/func_sinus_function.h +++ b/C3d/Include/func_sinus_function.h @@ -67,7 +67,7 @@ public: virtual void Explore( double & t, bool ext, double & val, double & fir, double * sec, double * thr ) const; - virtual void Inverse( MbRegTransform * iReg = c3d_null ); // \ru Изменить направление \en Change direction + virtual void Inverse( MbRegTransform * iReg = NULL ); // \ru Изменить направление \en Change direction virtual double Step( double t, double sag ) const; virtual double DeviationStep( double t, double angle ) const; diff --git a/C3d/Include/function.h b/C3d/Include/function.h index 64ffbb3..59e88eb 100644 --- a/C3d/Include/function.h +++ b/C3d/Include/function.h @@ -130,9 +130,9 @@ public: \param[out] fir - \ru Производная. \en Derivative with respect to t. \~ \param[out] sec - \ru Вторая производная по t, если не ноль. - \en Second derivative with respect to t, if not c3d_null. \~ + \en Second derivative with respect to t, if not NULL. \~ \param[out] thr - \ru Третья производная по t, если не ноль. - \en Third derivative with respect to t, if not c3d_null. \~ + \en Third derivative with respect to t, if not NULL. \~ \ingroup Curves_3D */ virtual void Explore( double & t, bool ext, @@ -144,7 +144,7 @@ public: virtual double Argument( double & val ) const; /// \ru Изменить направление. \en Change direction. - virtual void Inverse( MbRegTransform * iReg = c3d_null ) = 0; + virtual void Inverse( MbRegTransform * iReg = NULL ) = 0; /// \ru Вычислить шаг по прогибу для заданного параметра t. \en Calculate a step by the sag for a given parameter t. virtual double Step( double t, double sag ) const = 0; /// \ru Вычислить шаг по угловому отклонению для заданного параметра t. \en Calculate a step by the angular deviation for a given parameter t. diff --git a/C3d/Include/gce_api.h b/C3d/Include/gce_api.h index ac878b3..7231e8d 100644 --- a/C3d/Include/gce_api.h +++ b/C3d/Include/gce_api.h @@ -1291,17 +1291,17 @@ GCE_FUNC(constraint_item) GCE_FixRadius( GCE_system gSys, geom_item circ, coord_ \details \ru Точка фиксации задается через значение параметра, соответствующего ей. \n Порядок фиксируемой производной может равняться 0 (фиксация точки), 1, 2 или 3. \n - Если fixVal равен c3d_null, будет зафиксировано текущее значение производной, + Если fixVal равен NULL, будет зафиксировано текущее значение производной, иначе фиксируемой производной будет присвоено значение fixVal. \en Fixation point is specified via the parameter value corresponding to it. \n The order of a fixed derivative can be equal 0 (point fixing), 1, 2 or 3. \n - If fixVal is c3d_null current value of the derivative vector will be fixed. + If fixVal is NULL current value of the derivative vector will be fixed. Otherwise the derivative vector will be fixed at fixVal value. \~ */ //--- GCE_FUNC(constraint_item) GCE_FixSplineDerivative( GCE_system gSys, geom_item spline - , double par, uint derOrder, GCE_vec2d * fixVal = c3d_null ); + , double par, uint derOrder, GCE_vec2d * fixVal = NULL ); //---------------------------------------------------------------------------------------- /** \brief \ru Задать ограничение "Средняя точка". diff --git a/C3d/Include/gce_geom.h b/C3d/Include/gce_geom.h index 0549a29..6665a79 100644 --- a/C3d/Include/gce_geom.h +++ b/C3d/Include/gce_geom.h @@ -52,7 +52,7 @@ enum GcGeomType // --- #define CAST_PTR(T) IfGeom2dPtr // \ru Указатель с функцией приведения типов \en Pointer with function of type conversion #define GEOM_PTR(T) IfGeom2dPtr // \ru Указатель с функцией приведения типов \en Pointer with function of type conversion -#define CAST2PTR(T,arg) (arg) != c3d_null ? (T*)((arg)->GetInterfacingGeom(iidr_ ## T)) : c3d_null // \ru Привести к другому типу \en Convert to another type +#define CAST2PTR(T,arg) (arg) != NULL ? (T*)((arg)->GetInterfacingGeom(iidr_ ## T)) : NULL // \ru Привести к другому типу \en Convert to another type ////////////////////////////////////////////////////////////////////////////////////////// // \ru Координата геометрического объекта или переменной \en Coordinate of a geometric object or a variable @@ -261,18 +261,18 @@ class IfGeom2dPtr T * m_pI; public: - IfGeom2dPtr() : m_pI(c3d_null) {} + IfGeom2dPtr() : m_pI(0) {} IfGeom2dPtr( T * pI ): m_pI(pI) {} - IfGeom2dPtr( IfSomethingGeom2d * pI ) : m_pI(c3d_null) { if ( pI != c3d_null ) m_pI = (T*)pI->GetInterfacingGeom(iid); } + IfGeom2dPtr( IfSomethingGeom2d * pI ) : m_pI(0) { if ( pI != 0 ) m_pI = (T*)pI->GetInterfacingGeom(iid); } IfGeom2dPtr( const IfGeom2dPtr & o ) : m_pI( o.m_pI ) {} public: unsigned int GetIid() const { return iid; } operator T*() const { return m_pI; } - T& operator *() { C3D_ASSERT(m_pI != c3d_null); return *m_pI; } - T** operator &() { C3D_ASSERT(m_pI == c3d_null); return &m_pI; } - T* operator->() { C3D_ASSERT(m_pI != c3d_null); return m_pI; } - T* operator->() const { C3D_ASSERT(m_pI != c3d_null); return m_pI; } + T& operator *() { C3D_ASSERT(m_pI != 0); return *m_pI; } + T** operator &() { C3D_ASSERT(m_pI == 0); return &m_pI; } + T* operator->() { C3D_ASSERT(m_pI != 0); return m_pI; } + T* operator->() const { C3D_ASSERT(m_pI != 0); return m_pI; } T* Get() const { return m_pI; } T* operator= ( T* pI ) { m_pI = pI; } T* operator= ( const IfGeom2dPtr & o ) { return operator=(o.m_pI); } @@ -285,8 +285,8 @@ public: template inline T* IfGeom2dPtr::operator = ( IfSomethingGeom2d * pI ) { T * pOld = m_pI; - m_pI = c3d_null; - if ( pI != c3d_null ) + m_pI = 0; + if ( pI != 0 ) m_pI = (T*)pI->GetInterfacingGeom( iid ); return m_pI; diff --git a/C3d/Include/gcm_constraint.h b/C3d/Include/gcm_constraint.h index e25a5bb..703cdd7 100644 --- a/C3d/Include/gcm_constraint.h +++ b/C3d/Include/gcm_constraint.h @@ -30,7 +30,7 @@ struct GCM_geom_axis ItGeomPtr geomPtr; ///< \ru Тело, которому принадлежит ось планарного угла. \en solid the axis of a planar angle belongs to. GCM_geom_axis() : axis( MbVector3D::zero ) - , geomPtr( c3d_null ) {} + , geomPtr( NULL ) {} }; //---------------------------------------------------------------------------------------- @@ -131,7 +131,7 @@ public: /* \en Callback function which defines a law of positioning of the first geometric object which is dependent on positions of other objects. */ - virtual GCM_dependent_func Function() const { return c3d_null; } + virtual GCM_dependent_func Function() const { return NULL; } virtual GCM_extra_param ExtraParam() const { return GCM_extra_param(); } public: /* @@ -309,7 +309,7 @@ inline void ItConstraintItem::GetParams( GCM_c_params & pars ) const //--- inline ItGeomPtr ItConstraintItem::DependentGeom() const { - return (ConstraintType() == GCM_DEPENDENT) ? GeomItem(1) : c3d_null; + return (ConstraintType() == GCM_DEPENDENT) ? GeomItem(1) : NULL; } //---------------------------------------------------------------------------------------- @@ -474,7 +474,7 @@ GCM_FUNC(void) PrevSolution( GCM_alignment & ); //--- inline ItGeomPtr ItConstraintItem::_GArg( int geomN ) const { - return size_t(geomN-1) < m_args.size() ? m_args[geomN-1] : ItGeomPtr( c3d_null ); + return size_t(geomN-1) < m_args.size() ? m_args[geomN-1] : ItGeomPtr( NULL ); } //---------------------------------------------------------------------------------------- diff --git a/C3d/Include/gcm_geom.h b/C3d/Include/gcm_geom.h index 7c70d77..646c62b 100644 --- a/C3d/Include/gcm_geom.h +++ b/C3d/Include/gcm_geom.h @@ -130,12 +130,12 @@ class MtParGeom; class GCM_CLASS MtGeomVariant { public: - MtGeomVariant() : m_value( c3d_null ) {} + MtGeomVariant() : m_value( NULL ) {} MtGeomVariant( const MbCartPoint3D & ); MtGeomVariant( const MtGeomVariant & ); - MtGeomVariant( const MtParGeom & g ) : m_value( c3d_null ) { Assign(g); } + MtGeomVariant( const MtParGeom & g ) : m_value( NULL ) { Assign(g); } MtGeomVariant( const GCM_g_type ); - MtGeomVariant( MtParGeom & g ) : m_value( c3d_null ) { Share(g); } + MtGeomVariant( MtParGeom & g ) : m_value( NULL ) { Share(g); } MtGeomVariant & operator = ( const MtGeomVariant & gVar ) { return Assign( gVar ); } ~MtGeomVariant(); @@ -230,9 +230,9 @@ private: public: MtMatingGeometry() - : myGeom( c3d_null ) + : myGeom( NULL ) , myOrientation( Unoriented ) - , myLCSMatrix( c3d_null ) + , myLCSMatrix( NULL ) {} ~MtMatingGeometry() { @@ -244,7 +244,7 @@ public: MtGeomType GetGeomType() const { return myGeomType; } /// \ru Выдать ориентацию; \en Get orientation; Orient GetOrientation() const { return myOrientation; } - /// \ru Выдать геометрический объект сопряжения. Если =c3d_null, то это точка, заданная MtMatingGeometry::myMatingPoint; \en Get geometric object of the mating. If =c3d_null, then this is a point specified by MtMatingGeometry::myMatingPoint; + /// \ru Выдать геометрический объект сопряжения. Если =NULL, то это точка, заданная MtMatingGeometry::myMatingPoint; \en Get geometric object of the mating. If =NULL, then this is a point specified by MtMatingGeometry::myMatingPoint; const MbSpaceItem * GetMatingGeom() const { return myGeom; } /// \ru Выдать матрицу ЛСК, в которой задан геометрический объект сопряжения \en Get matrix of LCS in which the geometric object of the mating is specified const MbMatrix3D & LCSMatrix() const; @@ -314,7 +314,7 @@ private: // \ru Реализовать при необходимости \en Imp //--- inline const MbMatrix3D & MtMatingGeometry::LCSMatrix() const { - if ( myLCSMatrix != c3d_null ) + if ( myLCSMatrix != NULL ) return *myLCSMatrix; return MbMatrix3D::identity; } @@ -371,7 +371,7 @@ inline void MtMatingGeometry::SetAsMarker( const MbCartPoint3D & org, const MbVe inline void MtMatingGeometry::SetAsLCS( const MbPlacement3D & lcs ) { myGeomType = GCM_LCS; - myGeom = c3d_null; // new MbMarker( MbCartPoint::origin, MbVector3D::zAxis, MbVector3D::xAxis ); + myGeom = NULL; // new MbMarker( MbCartPoint::origin, MbVector3D::zAxis, MbVector3D::xAxis ); myOrientation = Unoriented; _SetLCSMatrix( lcs.GetMatrixFrom() ); } @@ -397,11 +397,11 @@ inline void MtMatingGeometry::SetAsMatingGeomItem( SPtr gIte //--- inline void MtMatingGeometry::_ClearMatrix() { - if ( myLCSMatrix != c3d_null ) + if ( myLCSMatrix != NULL ) { delete myLCSMatrix; } - myLCSMatrix = c3d_null; + myLCSMatrix = NULL; } //---------------------------------------------------------------------------------------- @@ -415,7 +415,7 @@ inline void MtMatingGeometry::_SetLCSMatrix( const MbMatrix3D & gSpan ) } else { - if ( myLCSMatrix == c3d_null ) + if ( myLCSMatrix == NULL ) myLCSMatrix = new MbMatrix3D( gSpan ); else *myLCSMatrix = gSpan; @@ -428,7 +428,7 @@ inline void MtMatingGeometry::_SetLCSMatrix( const MbMatrix3D & gSpan ) inline void MtMatingGeometry::SetNull() { myGeomType = GCM_NULL_GTYPE; - myGeom = c3d_null; + myGeom = NULL; myOrientation = Unoriented; _ClearMatrix(); } diff --git a/C3d/Include/graph_algorithms.h b/C3d/Include/graph_algorithms.h index 007edee..58dcccb 100644 --- a/C3d/Include/graph_algorithms.h +++ b/C3d/Include/graph_algorithms.h @@ -112,7 +112,7 @@ public: static const typename Graph::vertex_index NO_VERTEX = (size_t)-1; BicompDFSVisitor( BicompVisitor & vis ) - : m_graph( c3d_null ) + : m_graph( NULL ) , m_bicompVis( vis ) , m_dfsCounter( 1 ) , num() diff --git a/C3d/Include/iges_write.h b/C3d/Include/iges_write.h index 87a7277..5c4b9ad 100644 --- a/C3d/Include/iges_write.h +++ b/C3d/Include/iges_write.h @@ -110,7 +110,6 @@ public : const std::string & author, const std::string & organization, const std::string & productComments, - const std::string & writingCADId, // Идентификация экспортирующей САПР double lenUnits ); // Запись завершения в файл IGES void Terminate(); diff --git a/C3d/Include/instance.h b/C3d/Include/instance.h index 4534f19..4f883dd 100644 --- a/C3d/Include/instance.h +++ b/C3d/Include/instance.h @@ -68,10 +68,10 @@ public : // \ru Общие функции геометрического объекта. \en Common functions of a geometric object. virtual MbeSpaceType IsA() const; // \ru Тип объекта. \en An object type. - virtual MbSpaceItem & Duplicate( MbRegDuplicate * iReg = c3d_null ) const; // \ru Создать копию. \en Create a copy. - virtual void Transform( const MbMatrix3D &, MbRegTransform * iReg = c3d_null ); // \ru Преобразовать согласно матрице. \en Transform according to the matrix. - virtual void Move ( const MbVector3D &, MbRegTransform * iReg = c3d_null ); // \ru Сдвинуть вдоль вектора. \en Move along a vector. - virtual void Rotate ( const MbAxis3D &, double angle, MbRegTransform * iReg = c3d_null ); // \ru Повернуть вокруг оси. \en Rotate about an axis. + virtual MbSpaceItem & Duplicate( MbRegDuplicate * iReg = NULL ) const; // \ru Создать копию. \en Create a copy. + virtual void Transform( const MbMatrix3D &, MbRegTransform * iReg = NULL ); // \ru Преобразовать согласно матрице. \en Transform according to the matrix. + virtual void Move ( const MbVector3D &, MbRegTransform * iReg = NULL ); // \ru Сдвинуть вдоль вектора. \en Move along a vector. + virtual void Rotate ( const MbAxis3D &, double angle, MbRegTransform * iReg = NULL ); // \ru Повернуть вокруг оси. \en Rotate about an axis. virtual bool IsSame ( const MbSpaceItem & other, double accuracy = LENGTH_EPSILON ) const; // \ru Являются ли объекты равными? \en Whether the objects are equal? virtual bool IsSimilar( const MbSpaceItem & init ) const; // \ru Являются ли объекты подобными? \en Whether the objects are similar? virtual bool SetEqual ( const MbSpaceItem & init ); // \ru Сделать объекты равными. \en Make the objects equal. @@ -124,11 +124,11 @@ public : virtual const MbItem * GetItemByName( SimpleName n, MbPath & path, MbMatrix3D & from ) const; // \ru Преобразовать согласно матрице c использованием регистратора содержимый объект, если он селектирован. \en Transform the contained object according to the matrix using the registrator if the object selected. - virtual void TransformSelected( const MbMatrix3D & matr, MbRegTransform * iReg = c3d_null ); + virtual void TransformSelected( const MbMatrix3D & matr, MbRegTransform * iReg = NULL ); // \ru Сдвинуть вдоль вектора с использованием регистратора содержимый объект, если он селектирован. \en Translate the contained object along the vector according to the matrix using the registrator if the object selected. - virtual void MoveSelected( const MbVector3D & to, MbRegTransform * iReg = c3d_null ); + virtual void MoveSelected( const MbVector3D & to, MbRegTransform * iReg = NULL ); // \ru Повернуть вокруг оси на заданный угол с использованием регистратора содержимый объект, если он селектирован. \en Translate the contained object about the axis according to the matrix using the registrator if the object selected. - virtual void RotateSelected( const MbAxis3D & axis, double angle, MbRegTransform * iReg = c3d_null ); + virtual void RotateSelected( const MbAxis3D & axis, double angle, MbRegTransform * iReg = NULL ); /// \ru Дать матрицу преобразования из локальной системы объекта. \en Get transform matrix from local coordinate system of object. virtual bool GetMatrixFrom( MbMatrix3D & from ) const; diff --git a/C3d/Include/io_buffer.h b/C3d/Include/io_buffer.h index 119654c..9157aa8 100644 --- a/C3d/Include/io_buffer.h +++ b/C3d/Include/io_buffer.h @@ -135,8 +135,6 @@ namespace io readAborted = 0x04000000L, /// \ru Файл в расширенном формате прочитан частично (неизвестные объекты пропущены). \en Partial read of file in extended format (unknown objects skipped). skippedUnknAttr = 0x08000000L, - /// \ru Файл нулевой длины. \en Zero-length file. - emptyFile = 0x10000000L, /// \ru Все ошибки. \en All errors. //AR all = 0xffffffe0L allMask = 0xffffffffL @@ -597,22 +595,22 @@ public: /// \ru Установить для записи FileSpace с заданным индексом (при необходимости создать новый). ///\en Set FileSpace with given index for writing (create if necessary). - virtual FileSpace * enterFileSpace ( uint8 ) { return c3d_null; } // не реализовано; not implemeneted + virtual FileSpace * enterFileSpace ( uint8 ) { return NULL; } // не реализовано; not implemeneted /// \ru Установить позицию для записи/чтения по заданному ClusterReference. /// Сохранить предыдущую позицию, если saveCurr = true. /// \en Set position for for writing/reading by given ClusterReference. /// If saveCurr = true, save previous position. - virtual FileSpace * enterFileSpace ( const ClusterReference & , bool ) { return c3d_null; } // не реализовано; not implemeneted + virtual FileSpace * enterFileSpace ( const ClusterReference & , bool ) { return NULL; } // не реализовано; not implemeneted /// \ru Установить позицию для записи/чтения по заданным FileSpace и ClusterReference. /// Внимание, здесь ClusterReference.clusterIndex должен содержать индекс в массиве индексов кластеров в FileSpace! /// Сохранить предыдущую позицию, если saveCurr = true. /// \en Set position for writing/reading by given FileSpace and ClusterReference. /// Warning: in this function, ClusterReference.clusterIndex should contain an index in array of cluster indices in FileSpace! /// If saveCurr = true, save previous position. - virtual FileSpace * enterFileSpace ( const ClusterReference &, FileSpace *, bool ) { return c3d_null; } // не реализовано; not implemeneted + virtual FileSpace * enterFileSpace ( const ClusterReference &, FileSpace *, bool ) { return NULL; } // не реализовано; not implemeneted /// \ru Установить предыдущий FileSpace для записи/чтения. ///\en Set previous FileSpace for writing/reading. - virtual FileSpace * returnToPreviousFileSpace() { return c3d_null; } // не реализовано; not implemeneted + virtual FileSpace * returnToPreviousFileSpace() { return NULL; } // не реализовано; not implemeneted /// \ru Получить текущую позицию в буфере. \en Get current position in the buffer. ClusterReference getCurrentClusterPos(); diff --git a/C3d/Include/io_memory_buffer.h b/C3d/Include/io_memory_buffer.h index 2f3af0a..5a19467 100644 --- a/C3d/Include/io_memory_buffer.h +++ b/C3d/Include/io_memory_buffer.h @@ -61,7 +61,7 @@ protected: ClusterReference _ref; FileSpace * _file; - FileStackEntry() : _file(c3d_null) {} + FileStackEntry() : _file(NULL) {} FileStackEntry ( ClusterReference r, FileSpace * f ) : _ref(r), _file(f) {} }; std::stack filesStack; @@ -84,18 +84,18 @@ public: bool isEmpty() const; /// \ru Записать в непрерывную память. /// Функция подразумевает вполне определенное толкование значений входных данных, поэтому она не должна вызываться с неинициализированными аргументами. - /// \param[in,out] memory - память, куда писать. Если memory == c3d_null, то память выделяется. + /// \param[in,out] memory - память, куда писать. Если memory == NULL, то память выделяется. /// \param[in] addSize - размер памяти, которую надо дополнительно выделить при выделении памяти. /// Смысл addSize зависит от начального значения параметра memory: - /// если memory != c3d_null (т.е.память уже распределена), то addSize должен быть равен размеру памяти (addSize >= getMemLen() !!!). - /// если memory == c3d_null, то addSize определяет, столько байт дополнительно добавить (обнулив) в начале при выделении памяти. + /// если memory != 0 (т.е.память уже распределена), то addSize должен быть равен размеру памяти (addSize >= getMemLen() !!!). + /// если memory == 0, то addSize определяет, столько байт дополнительно добавить (обнулив) в начале при выделении памяти. /// \en Write to contiguous memory. /// The function implies a well-defined interpretation of the input values, so it should not be called with uninitialized arguments. - /// \param[in,out] memory - memory to write to. If memory == c3d_null, then memory is allocated. + /// \param[in,out] memory - memory to write to. If memory == NULL, then memory is allocated. /// \param[in] addSize - size of memory, which should be allocated additionally when allocating memory. /// The meaning of addSize depends on the initial value of the parameter 'memory': - /// if memory != c3d_null (i.e. the memory is already allocated), then addSize should be equal to memory size (addSize >= getMemLen() !!!). - /// if memory == c3d_null, then addSize defines a number of bytes to be added (and zeroed) at the beginning when allocating memory. + /// if memory != 0 (i.e. the memory is already allocated), then addSize should be equal to memory size (addSize >= getMemLen() !!!). + /// if memory == 0, then addSize defines a number of bytes to be added (and zeroed) at the beginning when allocating memory. size_t toMemory( const char *& memory, size_t addSize = 0 ) const; /// \ru Прочитать из непрерывной памяти. \en Read from the contiguous memory. bool fromMemory( const char * memory ); diff --git a/C3d/Include/io_tape.h b/C3d/Include/io_tape.h index 14e32f3..2bb5079 100644 --- a/C3d/Include/io_tape.h +++ b/C3d/Include/io_tape.h @@ -466,7 +466,7 @@ public: size_t Add( const TapeBase * e ); /// \ru Выдать указатель на зарегистрированный объект по заданной позиции в кластере. \en Get the pointer of the registered object by the position in the cluster. - virtual TapeBase * Get( const ClusterReference & ) const { return c3d_null; } // unsupported + virtual TapeBase * Get( const ClusterReference & ) const { return NULL; } // unsupported /// \ru Выдать позицию в кластере по заданному индексу. \en Get position in the cluster by given index. virtual ClusterReference GetClusterRef( size_t ) const { return ClusterReference(); } // unsupported /// \ru Добавить позицию объекта в кластере. \en Add the object position in the cluster. @@ -732,7 +732,7 @@ public: /// \ru Читать каталог объектов. \en Read the object catalog. virtual void ReadObjectCatalog(); /// \ru Читать объект по позиции в кластере. \en Read an object by position in cluster. - virtual TapeBase * ReadObjectByPosition ( const ClusterReference & ) { return c3d_null; } + virtual TapeBase * ReadObjectByPosition ( const ClusterReference & ) { return NULL; } /// \ru Установить позицию чтения. \en Set reading position. virtual bool SetReadPosition ( ClusterReference & ) { return false; } // not supported @@ -750,7 +750,7 @@ public: virtual bool readBytes( void * bf, size_t len ); /// \ru Получить указатель на дерево модели. \en Get pointer to the model tree. - virtual const c3d::IModelTree * GetModelTree() const { return c3d_null; } // not supported + virtual const c3d::IModelTree * GetModelTree() const { return NULL; } // not supported /// \ru Получить признак полного чтения текущего объекта. \en Get indicator of full reading of the current object. /// \ru Установить признак полного чтения текущего объекта. \en Set indicator of full reading of the current object. @@ -942,7 +942,7 @@ public: size_t __lenWchar( const TCHAR * s ); /// \ru Получить указатель на дерево модели. \en Get pointer to the model tree. - virtual const c3d::IModelTree * GetModelTree() const { return c3d_null; } // not supported + virtual const c3d::IModelTree * GetModelTree() const { return NULL; } // not supported protected: /// \ru Записать объект и тип. \en Write the object and type. @@ -1120,7 +1120,7 @@ struct TapeClassContainer static bool Add( TapeClass & tapeClass ) { if ( !StaticTapeClassContainer() ) - StaticTapeClassContainer() = new SFDPArray( 430, 1, TapeClass_Compare, c3d_null ); // \ru не владеет \en doesn't own + StaticTapeClassContainer() = new SFDPArray( 430, 1, TapeClass_Compare, NULL ); // \ru не владеет \en doesn't own return StaticTapeClassContainer()->AddExact( tapeClass ); } @@ -1962,7 +1962,7 @@ inline uint16 hash( const char * name ) // --- inline reader & __readChar( reader & ps, char *& s ) { - s = c3d_null; + s = NULL; if ( ps.good() ) { @@ -1974,7 +1974,7 @@ inline reader & __readChar( reader & ps, char *& s ) (len > 0 && ps.eof()) || !ps.good() ) { - s = c3d_null; + s = NULL; } else // good { @@ -1990,7 +1990,7 @@ inline reader & __readChar( reader & ps, char *& s ) { // \ru прочли не все, скорее всего ошибка - очистить строку \en not everything has been read, must be an error - clear the string delete [] s; - s = c3d_null; + s = NULL; } } else @@ -2010,7 +2010,7 @@ inline reader & __readChar( reader & ps, char *& s ) // --- inline reader & __readWchar( reader & ps, TCHAR * & s ) { - s = c3d_null; // \ru на случай, если ничего не прочитаем \en for case if nothing will be read + s = NULL; // \ru на случай, если ничего не прочитаем \en for case if nothing will be read if ( ps.good() ) { uint32 len = 0; @@ -2028,7 +2028,7 @@ inline reader & __readWchar( reader & ps, TCHAR * & s ) else { // \ru прочли не все, скорее всего ошибка - очистить строку \en not everything has been read, must be an error - clear the string delete [] readBuf; - readBuf = c3d_null; + readBuf = NULL; } if ( readBuf ) { // is OK @@ -2065,7 +2065,7 @@ inline reader & __readWchar( reader & ps, TCHAR * & s ) // --- inline reader & __readWcharT( reader & ps, wchar_t * & s ) { - s = c3d_null; // \ru на случай, если ничего не прочитаем \en for case if nothing will be read + s = NULL; // \ru на случай, если ничего не прочитаем \en for case if nothing will be read if ( ps.good() ) { uint32 len = 0; @@ -2083,7 +2083,7 @@ inline reader & __readWcharT( reader & ps, wchar_t * & s ) else { // \ru прочли не все, скорее всего ошибка - очистить строку \en not everything has been read, must be an error - clear the string delete [] readBuf; - readBuf = c3d_null; + readBuf = NULL; } if ( readBuf ) { // is OK @@ -2536,7 +2536,7 @@ inline reader & operator >> ( reader & ps, long double & l ) { template inline reader & operator >> ( reader & ps, SPtr<_Class> & sPtr ) { - _Class * ptr = c3d_null; + _Class * ptr = NULL; ps >> ptr; sPtr.assign( ptr ); return ps; @@ -2671,7 +2671,7 @@ inline void ReadTCHAR( reader & in, TCHAR *& ts, bool directSingleByte = false ) if ( directSingleByte || in.MathVersion() < UNICODE_VERSION ) { // \ru читаем WCHAR* из CHAR* \en read WCHAR* from CHAR* - char * s = c3d_null; + char * s = NULL; __readChar( in, s ); // \ru читаем строку в формате ANSI \en read string in ANSI format ts = _strNtcs( s ); // \ru создаем TCHAR из ANSI (если TCHAR == char, то просто дублируем) \en create TCHAR from ANSI (if TCHAR == char, then simply duplicate) delete [] s; @@ -3063,7 +3063,7 @@ inline reader & operator >> ( reader & ps, std::string & s ) { if ( ps.MathVersion() < UNICODE_VERSION ) { - char * str( c3d_null ); + char * str( NULL ); __readChar( ps, str ); // \ru читаем строку в формате ANSI \en read string in ANSI format if ( str ) s = str; @@ -3071,7 +3071,7 @@ inline reader & operator >> ( reader & ps, std::string & s ) s.clear(); delete [] str; } else { - wchar_t * p (c3d_null); + wchar_t * p (NULL); ReadWcharT( ps, p ); // \ru в зависимости от версии потока \en subject to the stream version if ( p ) { char* str = wcsnewmbs(p); @@ -3114,7 +3114,7 @@ inline reader & operator >> ( reader & ps, std::wstring & s ) { if ( ps.MathVersion() < UNICODE_VERSION ) { - char * str( c3d_null ); + char * str( NULL ); __readChar( ps, str ); // \ru читаем строку в формате ANSI \en read string in ANSI format wchar_t* p = mbsnewwcs( str ); if ( p ) @@ -3124,7 +3124,7 @@ inline reader & operator >> ( reader & ps, std::wstring & s ) delete [] p; delete [] str; } else { - wchar_t * p = c3d_null; + wchar_t * p = NULL; ReadWcharT( ps, p ); // \ru в зависимости от версии потока \en subject to the stream version if ( p ) s = p; @@ -3141,7 +3141,7 @@ inline reader & operator >> ( reader & ps, std::wstring & s ) //--- inline writer & operator << ( writer & ps, const std::wstring * s ) { - WriteWcharT( ps, (s ? s->c_str() : c3d_null) ); // \ru в зависимости от версии потока \en subject to the stream version + WriteWcharT( ps, (s ? s->c_str() : NULL) ); // \ru в зависимости от версии потока \en subject to the stream version return ps; } diff --git a/C3d/Include/io_tree.h b/C3d/Include/io_tree.h index e2967e3..3591c45 100644 --- a/C3d/Include/io_tree.h +++ b/C3d/Include/io_tree.h @@ -153,7 +153,7 @@ protected: public: - IModelTree() : m_type ( mtt_Model ), m_nodeToAddFunc( c3d_null ), m_filterFunc( c3d_null ) {} + IModelTree() : m_type ( mtt_Model ), m_nodeToAddFunc( NULL ), m_filterFunc( NULL ) {} virtual ~IModelTree() {} // \ru Выдать тип дерева. \en Get the tree type. @@ -165,12 +165,12 @@ public: // \en Build a tree with nodes, selected by filters. In case of embodiment tree, the function works with the first embodiment. virtual std_unique_ptr GetFilteredTree ( const std::vector& filters ) const = 0; - // \ru Построить дерево по заданным узлам. Не применимо к дереву исполнений (в этом случае возвращает c3d_null). - // \en Build a tree for given nodes. Not applicable to embodiment tree (in this case, returns c3d_null). + // \ru Построить дерево по заданным узлам. Не применимо к дереву исполнений (в этом случае возвращает NULL). + // \en Build a tree for given nodes. Not applicable to embodiment tree (in this case, returns NULL). virtual std_unique_ptr GetFilteredTree ( std::vector& nodes ) const = 0; - // \ru Выдать указатель на дерево исполнений. Выдает c3d_null, если не применимо (нет исполнений). - // \en Get pointer to embodiments tree. Return c3d_null if not applicable (no embodiments). + // \ru Выдать указатель на дерево исполнений. Выдает NULL, если не применимо (нет исполнений). + // \en Get pointer to embodiments tree. Return NULL if not applicable (no embodiments). virtual const IEmbodimentTree* GetEmbodimentsTree() const = 0; // \ru Добавить узел. \en Add a node. @@ -244,7 +244,7 @@ public: IEmbodimentNode() {} virtual ~IEmbodimentNode() { for ( std::set::iterator i = m_children.begin(); i != m_children.end(); ++i ) - if ( *i != c3d_null ) delete *i; + if ( *i != NULL ) delete *i; } // \ru Построить поддерево модели, содержащееся в данном исполнении. diff --git a/C3d/Include/item_registrator.h b/C3d/Include/item_registrator.h index 2c39ac3..53ee5d6 100644 --- a/C3d/Include/item_registrator.h +++ b/C3d/Include/item_registrator.h @@ -29,10 +29,10 @@ class MATH_CLASS MbRefItem; */ // --- #define __REG_DUPLICATE_IMPL( __CLASS ) \ -MbRefItem * copyItem = c3d_null; \ -if ( iReg == c3d_null || !iReg->IsReg( this, copyItem ) ) { \ +MbRefItem * copyItem = NULL; \ +if ( iReg == NULL || !iReg->IsReg( this, copyItem ) ) { \ copyItem = new __CLASS; \ - if ( iReg != c3d_null ) \ + if ( iReg != NULL ) \ iReg->SetReg( this, copyItem ); \ } diff --git a/C3d/Include/legend.h b/C3d/Include/legend.h index 136f13a..f70eb86 100644 --- a/C3d/Include/legend.h +++ b/C3d/Include/legend.h @@ -38,10 +38,10 @@ public: /* \ru Общие функции геометрического объе virtual MbeSpaceType IsA() const = 0; // \ru Тип объекта. \en Type of the object. virtual MbeSpaceType Type() const = 0; // \ru Тип объекта. \en Type of the object. virtual MbeSpaceType Family() const; // \ru Семейство элемента. \en Family of the element. - virtual MbSpaceItem & Duplicate( MbRegDuplicate * = c3d_null ) const = 0; // \ru Создать копию. \en Create a copy. - virtual void Transform( const MbMatrix3D &, MbRegTransform * = c3d_null ) = 0; // \ru Преобразовать согласно матрице. \en Transform according to the matrix. - virtual void Move ( const MbVector3D &, MbRegTransform * = c3d_null ) = 0; // \ru Сдвинуть вдоль вектора. \en Translate along a vector. - virtual void Rotate ( const MbAxis3D &, double angle, MbRegTransform * = c3d_null ) = 0; // \ru Повернуть вокруг оси. \en Rotate around an axis. + virtual MbSpaceItem & Duplicate( MbRegDuplicate * = NULL ) const = 0; // \ru Создать копию. \en Create a copy. + virtual void Transform( const MbMatrix3D &, MbRegTransform * = NULL ) = 0; // \ru Преобразовать согласно матрице. \en Transform according to the matrix. + virtual void Move ( const MbVector3D &, MbRegTransform * = NULL ) = 0; // \ru Сдвинуть вдоль вектора. \en Translate along a vector. + virtual void Rotate ( const MbAxis3D &, double angle, MbRegTransform * = NULL ) = 0; // \ru Повернуть вокруг оси. \en Rotate around an axis. virtual bool IsSame ( const MbSpaceItem & other, double accuracy = LENGTH_EPSILON ) const = 0; // \ru Являются ли объекты равными? \en Determine whether the objects are equal. virtual bool IsSimilar( const MbSpaceItem & init ) const = 0; // \ru Являются ли объекты подобными? \en Determine whether the objects are similar. virtual bool SetEqual ( const MbSpaceItem & init ) = 0; // \ru Сделать объекты равным. \en Make the objects equal. diff --git a/C3d/Include/lump.h b/C3d/Include/lump.h index a803bc2..1219c08 100644 --- a/C3d/Include/lump.h +++ b/C3d/Include/lump.h @@ -67,7 +67,7 @@ typedef std::pair ConstLumpsSPtrSetRet; // --- struct MATH_CLASS MbLump: public MbRefItem { protected: - c3d::ConstSolidSPtr solid; ///< \ru Тело (всегда не c3d_null). \en Solid (always not c3d_null). + c3d::ConstSolidSPtr solid; ///< \ru Тело (всегда не NULL). \en Solid (always not NULL). MbMatrix3D from; ///< \ru Матрица преобразования из локальной системы координат. \en A transformation matrix from the local coordinate system. uint component; ///< \ru Идентификатор компонента, в котором определено тело. \en An identifier of a component which a solid is defined in. size_t identifier; ///< \ru Идентификатор нити. \en A thread identifier. @@ -79,7 +79,7 @@ private: MbLump( const MbLump & other, MbRegDuplicate * iReg ); public: /// \ru Пустой конструктор. \en Empty constructor. - MbLump() : solid( c3d_null ), from(), component( 0 ), identifier( SYS_MAX_T ), changed( true ) {} + MbLump() : solid( NULL ), from(), component( 0 ), identifier( SYS_MAX_T ), changed( true ) {} /// \ru Конструктор по данным. \en Constructor by data. MbLump( const MbSolid & _solid, const MbMatrix3D & _from, uint _comp = 0, size_t _ident = SYS_MAX_T, bool _changed = true ); /// \ru Деструктор. \en Destructor. @@ -96,7 +96,7 @@ public: /// \ru Разрезать тело в производном виде. \en Cut solid on derive view. virtual bool WillCutOnDeriveView() const { return true; } /// \ru Дублирование объекта. \en Duplication of an object. - virtual MbLump & Duplicate( MbRegDuplicate * iReg = c3d_null ) const; + virtual MbLump & Duplicate( MbRegDuplicate * iReg = NULL ) const; /// \ru Получить имя компонента. \en Get the name of a component. uint GetComponent() const { return component; } /// \ru Установить имя компонента. \en Set the name of a component. diff --git a/C3d/Include/map_create.h b/C3d/Include/map_create.h index af3547d..49aecba 100644 --- a/C3d/Include/map_create.h +++ b/C3d/Include/map_create.h @@ -64,11 +64,11 @@ class MATH_CLASS MbMapBodiesPArray; class MATH_CLASS MbProjectionsObjects { public: - TPointer< RPArray > annCurves; ///< \ru Аннотационные кривые (может быть нулем). \en Annotation curves (can be c3d_null). - TPointer< RPArray > annotations; ///< \ru Аннотационные объекты (может быть нулем). \en Annotation objects (can be c3d_null). - TPointer< RPArray > symbolObjects; ///< \ru Условные обозначения (может быть нулем). \en Conventional notations (can be c3d_null). - TPointer< RPArray > pointsData; ///< \ru Пространственные точки (может быть нулем). \en Spatial points (can be c3d_null). - TPointer< RPArray > curvesData; ///< \ru Пространственные кривые (может быть нулем). \en Spatial curves (can be c3d_null). + TPointer< RPArray > annCurves; ///< \ru Аннотационные кривые (может быть нулем). \en Annotation curves (can be NULL). + TPointer< RPArray > annotations; ///< \ru Аннотационные объекты (может быть нулем). \en Annotation objects (can be NULL). + TPointer< RPArray > symbolObjects; ///< \ru Условные обозначения (может быть нулем). \en Conventional notations (can be NULL). + TPointer< RPArray > pointsData; ///< \ru Пространственные точки (может быть нулем). \en Spatial points (can be NULL). + TPointer< RPArray > curvesData; ///< \ru Пространственные кривые (может быть нулем). \en Spatial curves (can be NULL). public: /** \brief \ru Конструктор. @@ -78,11 +78,11 @@ public: \en Constructor of empty sets of projected objects.\n \~ */ MbProjectionsObjects() - : annCurves ( c3d_null ) - , annotations ( c3d_null ) - , symbolObjects( c3d_null ) - , pointsData ( c3d_null ) - , curvesData ( c3d_null ) + : annCurves ( NULL ) + , annotations ( NULL ) + , symbolObjects( NULL ) + , pointsData ( NULL ) + , curvesData ( NULL ) {} /// \ru Конструктор копирования с регистратором. \en Copy-constructor with the registrator. MbProjectionsObjects( const MbProjectionsObjects & other, MbRegDuplicate * iReg ); @@ -104,7 +104,7 @@ public: } /// \ru Дать копию объекта. \en Get a copy of the object. - virtual MbProjectionsObjects & Duplicate( MbRegDuplicate * iReg = c3d_null ) const; + virtual MbProjectionsObjects & Duplicate( MbRegDuplicate * iReg = NULL ) const; /// \ru Отпустить все указатели. \en Detach all pointers. void Relinquish() @@ -173,9 +173,9 @@ public: size_t GetLumpsCount() const { return lumps.size(); } const MbLump * _GetLump( size_t k ) const { return lumps[k]; } - const MbLump * GetLump( size_t k ) const { return ((k < lumps.size()) ? lumps[k] : c3d_null); } + const MbLump * GetLump( size_t k ) const { return ((k < lumps.size()) ? lumps[k] : NULL); } MbLump * _SetLump( size_t k ) { return lumps[k]; } - MbLump * SetLump( size_t k ) { return ((k < lumps.size()) ? lumps[k] : c3d_null); } + MbLump * SetLump( size_t k ) { return ((k < lumps.size()) ? lumps[k] : NULL); } template void GetLumps( Lumps & _lumps ) const @@ -282,7 +282,7 @@ MATH_FUNC (MbResultType) GetVestiges ( const MbPlacement3D & place, const MbMapVisibilityMode & visMode, VERSION version = Math::DefaultMathVersion(), bool merge = true, - const std::vector * prevCubes = c3d_null ); + const std::vector * prevCubes = NULL ); //------------------------------------------------------------------------------ @@ -316,7 +316,7 @@ public: public: MbMapSettings( MbMapVisibilityMode mode, MbPlacement3D place = MbPlacement3D::global, - double znear = 0, bool merge = true, const LumpCubes * prevCubes = c3d_null ) + double znear = 0, bool merge = true, const LumpCubes * prevCubes = NULL ) : m_place ( place ) , m_zNear ( znear ) , m_visMode ( mode ) diff --git a/C3d/Include/map_implementation.h b/C3d/Include/map_implementation.h index fbb0280..da1d5eb 100644 --- a/C3d/Include/map_implementation.h +++ b/C3d/Include/map_implementation.h @@ -109,7 +109,7 @@ public: void CreateFirst( const RPArray & lumps, const MbMatrix3D & into, double znear, bool perspective, const MbMapVisibilityMode & visMode, VERSION version, - const std::vector * prevCubes = c3d_null ); + const std::vector * prevCubes = NULL ); /** \brief \ru Построение ассоциативных проекций. \en The construction of associative projections. \~ @@ -220,7 +220,7 @@ OBVIOUS_PRIVATE_COPY( MbMapBodiesPArray ) mvt_Cut - Разрез,\n mvt_Section - Сечечние;\n плоскость вида, разреза или сечения.\n - \en The information about basic view on witch a local view(cutaway) is constructed:\n + \en The information about basic view on witch a local view\cutaway is constructed:\n a view type:\n mvt_View - View,\n mvt_Cut - Cutaway,\n diff --git a/C3d/Include/map_lump.h b/C3d/Include/map_lump.h index 89e83e8..8290612 100644 --- a/C3d/Include/map_lump.h +++ b/C3d/Include/map_lump.h @@ -138,7 +138,7 @@ public: /// \ru Деструктор. \en Destructor. virtual ~CurveWType() {} /// \ru Сделать копию объекта. \en Create a copy of the object. - virtual CurveWType & Duplicate( MbRegDuplicate * iReg = c3d_null ) const; + virtual CurveWType & Duplicate( MbRegDuplicate * iReg = NULL ) const; public: @@ -229,7 +229,7 @@ public: explicit MbAnnCurves( const MbName & _name, uint _comp, size_t _ident ) : component ( _comp ) , identifier( _ident ) - , solid ( c3d_null ) + , solid ( NULL ) , name ( &_name ) , from ( ) , wtCurves ( 0, 1, true ) @@ -245,7 +245,7 @@ public: public: /// \ru Дать копию объекта. \en Get a copy of the object. - virtual MbAnnCurves & Duplicate( MbRegDuplicate * iReg = c3d_null ) const; + virtual MbAnnCurves & Duplicate( MbRegDuplicate * iReg = NULL ) const; /// \ru Получить имя компонента. \en Get the component name. uint GetComponent() const { return component; } @@ -265,12 +265,12 @@ public: \param[in, out] wtCurve - \ru Кривая. \en A curve. \~ */ - void AbsorbCurve( CurveWType *& wtCurve ) { wtCurves.Add( wtCurve ); wtCurve = c3d_null; } + void AbsorbCurve( CurveWType *& wtCurve ) { wtCurves.Add( wtCurve ); wtCurve = NULL; } /// \ru Количество кривых в наборе. \en The number of curves in the set. size_t GetCurvesCount() const { return wtCurves.Count(); } /// \ru Получить указатель на кривую. \en Get the pointer to the curve. - const CurveWType * GetCurve( size_t k ) const { return ((k < wtCurves.Count()) ? wtCurves[k] : c3d_null); } + const CurveWType * GetCurve( size_t k ) const { return ((k < wtCurves.Count()) ? wtCurves[k] : NULL); } private: DECLARE_PERSISTENT_CLASS_NEW_DEL ( MbAnnCurves ) @@ -317,7 +317,7 @@ public : public: /// \ru Дать копию объекта. \en Get a copy of the object. - virtual MbSimbolthThreadView & Duplicate( MbRegDuplicate * iReg = c3d_null ) const; + virtual MbSimbolthThreadView & Duplicate( MbRegDuplicate * iReg = NULL ) const; public : /// \ru Получить аннотационные кривые для редактирования. \en Get annotative curves for editing. @@ -508,7 +508,7 @@ public: public: /// \ru Дать копию объекта. \en Get a copy of the object. - virtual MbSpacePoints & Duplicate( MbRegDuplicate * iReg = c3d_null ) const; + virtual MbSpacePoints & Duplicate( MbRegDuplicate * iReg = NULL ) const; public: @@ -659,16 +659,16 @@ public: \en Get the name. \~ \details \ru Получить имя по индексу.\n Если индекс некорректный, то есть не меньше числа точек, - вернет c3d_null. + вернет NULL. \en Get the name by an index.\n If the index is incorrect i.e. it isn't less than the number of points, - c3d_null is returned. \~ + NULL is returned. \~ \param[in] k - \ru Индекс имени. \en A name index. \~ \return \ru Имя по индексу из набора имен. \en A name by an index from the set of names. \~ */ - const MbName * GetName( size_t k ) const { return ((k < names.size()) ? names[k] : c3d_null); } + const MbName * GetName( size_t k ) const { return ((k < names.size()) ? names[k] : NULL); } /** \} */ DECLARE_PERSISTENT_CLASS_NEW_DEL ( MbSpacePoints ) @@ -786,7 +786,7 @@ private: public: /// \ru Дать копию объекта. \en Get a copy of the object. - virtual MbSpaceCurves & Duplicate( MbRegDuplicate * iReg = c3d_null ) const; + virtual MbSpaceCurves & Duplicate( MbRegDuplicate * iReg = NULL ) const; public: /** \} */ @@ -908,11 +908,11 @@ public: \param[in] k - \ru Индекс кривой. \en A curve index. \~ \return \ru Указатель на кривую, если индекс меньше количества кривых,\n - иначе c3d_null. + иначе NULL. \en A pointer to a curve, if the index is less than the number of curves,\n - otherwise c3d_null is returned. \~ + otherwise NULL is returned. \~ */ - const MbCurve3D * GetCurve( size_t k ) const { return ((k < curves.size()) ? curves[k] : c3d_null); } + const MbCurve3D * GetCurve( size_t k ) const { return ((k < curves.size()) ? curves[k] : NULL); } /** \} */ /**\ru \name Доступ к именам. @@ -940,11 +940,11 @@ public: \param[in] k - \ru Индекс имени. \en A name index. \~ \return \ru Указатель на имя, если индекс меньше количества имен,\n - иначе c3d_null. + иначе NULL. \en A pointer to a name, if the index is less than the number of curves, - otherwise c3d_null is returned. \~ + otherwise NULL is returned. \~ */ - const MbName * GetName( size_t k ) const { return ((k < names.size()) ? names[k] : c3d_null); } ///< \ru Получить имя. \en Get the name. + const MbName * GetName( size_t k ) const { return ((k < names.size()) ? names[k] : NULL); } ///< \ru Получить имя. \en Get the name. /** \} */ DECLARE_PERSISTENT_CLASS_NEW_DEL ( MbSpaceCurves ) @@ -958,7 +958,7 @@ IMPL_PERSISTENT_OPS( MbSpaceCurves ) inline void MbSpaceCurves::AddNamedCurve( MbCurve3D * crv, MbName * nm, bool noSameCheck ) { - if ( crv != c3d_null && (noSameCheck || curves.FindIt( crv ) == SYS_MAX_T ) ) { + if ( crv != NULL && (noSameCheck || curves.FindIt( crv ) == SYS_MAX_T ) ) { curves.push_back( crv ); crv->AddRef(); names.push_back( nm ); @@ -1111,7 +1111,7 @@ public: */ MbMappingLumps( const MbSolid & _solid, const MbMatrix3D & _from, bool _willCut, uint _comp = 0, size_t _ident = SYS_MAX_T ) : MbCutLump ( _solid, _from, _comp, _ident ) - , lumps ( c3d_null ) + , lumps ( NULL ) , willCut ( _willCut ) { } @@ -1121,13 +1121,13 @@ public: \details \ru Конструктор по набору тел.\n Захватывает тело MbSolid из первого элемента _lumps и остальные элементы _lumps методом AddRef().\n - Если в _lumps один элемент, массив lumps остается c3d_null.\n - Если в _lumps нет элементов, тело MbSolid в базовом объекте = c3d_null. Таких объектов быть не должно. + Если в _lumps один элемент, массив lumps остается NULL.\n + Если в _lumps нет элементов, тело MbSolid в базовом объекте = NULL. Таких объектов быть не должно. \en Constructor by a set of solids.\n Captures MbSolid solid from the first element of the _lumps and the other elements of the _lumps by AddRef() method.\n - If the _lumps contains one element the lumps array remains c3d_null.\n - If the _lumps doesn't contain any elements the MbSolid solid in the base object = c3d_null. These objects should not be. \~ + If the _lumps contains one element the lumps array remains NULL.\n + If the _lumps doesn't contain any elements the MbSolid solid in the base object = NULL. These objects should not be. \~ \param[in] _lumps - \ru Контейнер тел с матрицами преобразования в глобальную систему координат,. не должен быть пустым контейнером. \en A container of solids with the matrices of transformation to the global coordinate system @@ -1136,13 +1136,13 @@ public: template MbMappingLumps( const LumpsVector & _lumps ) : MbCutLump() - , lumps( c3d_null ) + , lumps( NULL ) , willCut( false ) // конструктор по нескольким телам только в случае "не рассекать" { size_t count = _lumps.size(); - C3D_ASSERT( count > 0 && _lumps[0] != c3d_null ); + C3D_ASSERT( count > 0 && _lumps[0] != NULL ); - if ( count > 0 && _lumps[0] != c3d_null ) { + if ( count > 0 && _lumps[0] != NULL ) { from = _lumps[0]->GetMatrixFrom(); component = _lumps[0]->GetComponent(); identifier = _lumps[0]->GetIdentifier(); @@ -1154,7 +1154,7 @@ public: lumps = new c3d::LumpsSPtrVector(); for ( size_t i = 1; i < count; ++i ) { MbLump * lump = _lumps[i]; - if ( lump != c3d_null ) + if ( lump != NULL ) lumps->push_back( c3d::LumpSPtr(lump) ); } } @@ -1167,19 +1167,19 @@ public: /** \brief \ru Число тел. \en The number of solids. \~ \details \ru Число тел.\n - Минимальное количество - 1 тело. В этом случае массив lumps = c3d_null. - В случае, если массив lumps != c3d_null, количество тел равно количеству + Минимальное количество - 1 тело. В этом случае массив lumps = NULL. + В случае, если массив lumps != NULL, количество тел равно количеству элементов в массиве плюс один. \en The number of solids.\n - Minimal number = 1 solid. In this case the lumps array is c3d_null. - In a case when the lumps array isn't c3d_null the number of solids is equal to + Minimal number = 1 solid. In this case the lumps array is NULL. + In a case when the lumps array isn't NULL the number of solids is equal to the number of elements in the array plus one. \~ \return \ru Число тел. \en The number of solids. \~ */ size_t Count() const { size_t res = 1; - if ( lumps != c3d_null ) + if ( lumps != NULL ) res += lumps->size(); return res; } @@ -1190,21 +1190,21 @@ public: По индексу 0 выдается базовый объект.\n По индексу i выдается объект из массива lumps с индексом i-1.\n Индекс проверяется на корректность. - В случае некорректного индекса возвращает c3d_null. + В случае некорректного индекса возвращает NULL. \en A solid by an index.\n The basic object is given by the "0" index.\n An object with the index i - 1 from the lumps array is issued by the index i.\n An index is validated for correctness. - In a case of an incorrect index the method returns c3d_null. \~ + In a case of an incorrect index the method returns NULL. \~ \return \ru Указатель на тело с матрицей. \en A pointer to a solid with a matrix. \~ */ MbLump * operator []( size_t ind ) { if ( ind == 0 ) return static_cast( this ); - else if ( lumps != c3d_null && ind - 1 < lumps->size() ) + else if ( lumps != NULL && ind - 1 < lumps->size() ) return lumps->operator []( ind - 1 ); - return c3d_null; + return NULL; } /** \brief \ru Тело по индексу. @@ -1213,12 +1213,12 @@ public: По индексу 0 выдается базовый объект.\n По индексу i выдается объект из массива lumps с индексом i-1.\n Индекс проверяется на корректность. - В случае некорректного индекса возвращает c3d_null. + В случае некорректного индекса возвращает NULL. \en A solid by an index.\n The basic object is given by the "0" index.\n An object with the index i - 1 from the lumps array is issued by the index i.\n An index is validated for correctness. - In a case of an incorrect index the method returns c3d_null. \~ + In a case of an incorrect index the method returns NULL. \~ \return \ru Константный указатель на тело с матрицей. \en A constant pointer to a solid with a matrix. \~ */ @@ -1226,9 +1226,9 @@ public: { if ( ind == 0 ) return static_cast( this ); - else if ( lumps != c3d_null && ind - 1 < lumps->size() ) + else if ( lumps != NULL && ind - 1 < lumps->size() ) return lumps->operator []( ind - 1 ); - return c3d_null; + return NULL; } void ChangeLump( size_t ind, MbLump * newLump ) @@ -1239,7 +1239,7 @@ public: component = newLump->GetComponent(); identifier = newLump->GetIdentifier(); } - else if ( lumps != c3d_null && ind - 1 < lumps->size() ) { + else if ( lumps != NULL && ind - 1 < lumps->size() ) { (*lumps)[ind - 1] = newLump; } } @@ -1323,7 +1323,7 @@ public: } /// \ru Деструктор. \en Destructor. ~MbPolygon3DSolid() { - if ( polygon != c3d_null ) + if ( polygon != NULL ) delete polygon; } @@ -1332,7 +1332,7 @@ public: /// \ru Получить имя компонента. \en Get the name of a component. uint GetComponent() const { return component; } /// \ru Занулить полигон без удаления. \en Reset polygon without removal. - void DoNotDeletePolyg() { polygon = c3d_null; } + void DoNotDeletePolyg() { polygon = NULL; } OBVIOUS_PRIVATE_COPY( MbPolygon3DSolid ) }; @@ -1360,7 +1360,7 @@ enum MbeMapViewType { информации о виде при построении местного вида\разреза или выносного элемента. \en The information about an associative view. Used for transfer - The information about a view in constructing the local view(cutaway) or + The information about a view in constructing the local view\cutaway or detail view. \~ \ingroup Mapping */ diff --git a/C3d/Include/map_section.h b/C3d/Include/map_section.h index f7dffe2..d3878f0 100644 --- a/C3d/Include/map_section.h +++ b/C3d/Include/map_section.h @@ -87,7 +87,7 @@ public: \en Clear the array of contours if it isn't null. \~ */ void DetachContours() { - if ( arContours != c3d_null ) + if ( arContours != NULL ) arContours->Flush( noDelete ); } @@ -142,10 +142,10 @@ public: /** \brief \ru Добавить оболочку. \en Add a shell. \~ \details \ru Добавить оболочку в набор оболочек.\n - Добавляется, даже если равна c3d_null.\n + Добавляется, даже если равна NULL.\n Если не нулевая - захватывается. \en Add a shell into the set of shells.\n - A shell is added even if it is equal to c3d_null.\n + A shell is added even if it is equal to NULL.\n If a shell isn't null it is captured. \~ \param[in] secShell - \ru Оболочка. \en A shell. \~ @@ -331,7 +331,7 @@ public: \return \ru true, если массив точек не нулевой и не пустой. \en returns true if the array of points isn't null and isn't empty. \~ */ - bool IsSpacePoints() const { return (pointsData != c3d_null && pointsData->size() > 0); } + bool IsSpacePoints() const { return (pointsData != NULL && pointsData->size() > 0); } /** \brief \ru Есть ли в объекте кривые. \en Whether any curve is in an object. \~ @@ -340,7 +340,7 @@ public: \return \ru true, если массив кривых не нулевой и не пустой. \en returns true if the array of curves isn't null and isn't empty. \~ */ - bool IsSpaceCurves() const { return (curvesData != c3d_null && curvesData->size() > 0); } + bool IsSpaceCurves() const { return (curvesData != NULL && curvesData->size() > 0); } const RPArray * GetSpacePoints() const { return pointsData; } ///< \ru Получить указатель на пространственные точки. \en Get spatial points. const RPArray * GetSpaceCurves() const { return curvesData; } ///< \ru Получить указатель на пространственные кривые. \en Get spatial curves. diff --git a/C3d/Include/map_section_complex.h b/C3d/Include/map_section_complex.h index 48bd08a..ae0e54b 100644 --- a/C3d/Include/map_section_complex.h +++ b/C3d/Include/map_section_complex.h @@ -233,14 +233,13 @@ MATH_FUNC(bool) FormFirstSectionPlane( const MbPlacement3D & m_place, const MbCu Нормаль плоскости вида направлена против вектора взгляда. \en The view plane convert to the plane of the projection. Normal to the view plane is directed against the view vector. \~ - \param[in,out] place - \ru Плоскость вида (отображения проекции). - \en A view plane (A plane of the projection). \~ + \param[in\out] place - \ru Плоскость вида\Плоскость отображения проекции. + \en A view plane\A plane of the projection. \~ \param[in] viewDir - \ru Вектор взгляда. \en A view vector. \~ */ // --- -inline -void MappingVPtoMP( MbPlacement3D & place, const MbVector & viewDir ) +inline void MappingVPtoMP( MbPlacement3D & place, const MbVector & viewDir ) { if ( ::fabs(viewDir.x) > Math::lengthEpsilon || ::fabs(viewDir.y) > Math::lengthEpsilon ) { MbVector vDir( viewDir ); diff --git a/C3d/Include/map_vestige.h b/C3d/Include/map_vestige.h index e05ce3b..bc4e949 100644 --- a/C3d/Include/map_vestige.h +++ b/C3d/Include/map_vestige.h @@ -154,7 +154,7 @@ protected: , ident ( otherIdent ) , style ( SYS_MAX_UINT16 ) , attrData ( ) - , item ( c3d_null ) + , item ( NULL ) , name ( &otherName ) { name.SetOwn( false ); } /// \ru Конструктор копирования с регистратором. \en Copy-constructor with the registrator. @@ -164,13 +164,13 @@ protected: : comp ( 0 ) , ident ( SYS_MAX_T ) , style ( SYS_MAX_UINT16 ) - , item ( c3d_null ) - , name ( c3d_null ) + , item ( NULL ) + , name ( NULL ) { name.SetOwn(false); } virtual ~MbBaseVestige() {} public: - virtual MbBaseVestige & Duplicate( MbRegDuplicate * iReg = c3d_null ) const; ///< \ru Создать копию объекта. \en Create a copy of the object. + virtual MbBaseVestige & Duplicate( MbRegDuplicate * iReg = NULL ) const; ///< \ru Создать копию объекта. \en Create a copy of the object. public: uint GetComponent() const { return comp; } size_t GetIdentifier() const { return ident; } @@ -268,7 +268,7 @@ protected: {} public: /// \ru Создать копию объекта. \en Create a copy of the object. - virtual MbBaseVestige & Duplicate( MbRegDuplicate * iReg = c3d_null ) const; + virtual MbBaseVestige & Duplicate( MbRegDuplicate * iReg = NULL ) const; public: /// \ru Тип отображения. \en Mapping type. Type GetType() const { return (Type)vesType; } @@ -304,11 +304,11 @@ void ReplaceCurveVestigeDuplicates( MbCurveVestige & ); // --- struct MATH_CLASS MbCurveVestige : public TapeBase { protected: - SPtr totalPrj; ///< \ru Полная проекция (может быть c3d_null). \en A full projection (can be c3d_null). \~ \internal \ru Владеет. \en Owns. \~ \endinternal + SPtr totalPrj; ///< \ru Полная проекция (может быть NULL). \en A full projection (can be NULL). \~ \internal \ru Владеет. \en Owns. \~ \endinternal std::vector arTotal; ///< \ru Все проекции в упорядоченной форме. \en All projections in an ordered form. \~ \internal \ru Не владеет. \en Doesn't own. \~ \endinternal // \ru Двумерные кривые лежат копиями, поэтому массивы владеющие. \en Two-dimensional uv-curves are copies therefore arrays are owners - // \ru Если кривых нет то указатель останется нулевым. \en If no curves then the pointer remains c3d_null. + // \ru Если кривых нет то указатель останется нулевым. \en If no curves then the pointer remains NULL. TPointer< PArray > arVisPrj; ///< \ru Видимые проекции. \en Visible projections. TPointer< PArray > arHidPrj; ///< \ru Не видимые проекции. \en Invisible projections. @@ -321,10 +321,10 @@ public: Creates an object with the null projection. \~ */ MbCurveVestige() - : totalPrj( c3d_null ) + : totalPrj( NULL ) , arTotal ( ) - , arVisPrj( c3d_null ) - , arHidPrj( c3d_null ) + , arVisPrj( NULL ) + , arHidPrj( NULL ) {} /// \ru Конструктор копирования с регистратором. \en Copy-constructor with the registrator. MbCurveVestige( const MbCurveVestige & other, MbRegDuplicate * iReg ); @@ -332,7 +332,7 @@ public: virtual ~MbCurveVestige() { ClearAll(); } public: /// \ru Создать копию объекта. \en Create a copy of the object. - virtual MbCurveVestige & Duplicate( MbRegDuplicate * iReg = c3d_null ) const; + virtual MbCurveVestige & Duplicate( MbRegDuplicate * iReg = NULL ) const; public: /** \brief \ru Очистить проекции. @@ -347,14 +347,14 @@ public: void ClearAll() { arTotal.clear(); - totalPrj = c3d_null; - arVisPrj = c3d_null; - arHidPrj = c3d_null; + totalPrj = NULL; + arVisPrj = NULL; + arHidPrj = NULL; } /// \ru Пустое ли отображение кривой? \en Is an empty curve vestige? bool IsEmpty() const { - return ( totalPrj == c3d_null ) && + return ( totalPrj == NULL ) && ( arTotal.size() < 1 ) && ( !arVisPrj || arVisPrj->empty() ) && ( !arHidPrj || arHidPrj->empty() ); @@ -372,9 +372,9 @@ public: bool IsHiddenCurvesArray () const { return !!arHidPrj; } /// \ru Получить видимую часть проекции. \en Get visible part of projection. - const MbCurve * _GetVisibleCurve( size_t k ) const { return (( !!arVisPrj ) ? (*arVisPrj)[k] : c3d_null); } + const MbCurve * _GetVisibleCurve( size_t k ) const { return (( !!arVisPrj ) ? (*arVisPrj)[k] : NULL); } /// \ru Получить невидимую часть проекции. \en Get hidden part of projection. - const MbCurve * _GetHiddenCurve ( size_t k ) const { return (( !!arHidPrj ) ? (*arHidPrj)[k] : c3d_null); } + const MbCurve * _GetHiddenCurve ( size_t k ) const { return (( !!arHidPrj ) ? (*arHidPrj)[k] : NULL); } /// \ru Положить в массив указатели видимых частей проекции. \en Put pointers of visible parts of projection into the array. template @@ -414,7 +414,7 @@ public: \details \ru Забрать все проекционные кривые из структуры и очистить ее. \en Pick up all curves of this structure and clear it. \~ */ - bool PickUpMapCurves( RPArray & crvArr, c3d::BoolVector & visArr ); + bool PickUpMapCurves( RPArray & crvArr, SArray & visArr ); /// \ru Забрать видимую часть проекции (не обнуляет в массиве всех проекций). \en Pick up visible part of projection (it doesn't set zero in all projections array). MbCurve * _PickupVisibleCurve( size_t ); /// \ru Забрать невидимую часть проекции (не обнуляет в массиве всех проекций). \en Pick up hidden part of projection (it doesn't set zero in all projections array). @@ -433,7 +433,7 @@ public: bool RepairSpecificCorrespondence( bool uncertainIsVisible ); /// \ru Есть ли указатель на полную проекцию? \en Is there a pointer to the full projection? - bool IsTotalProjection() const { return (totalPrj != c3d_null); } + bool IsTotalProjection() const { return (totalPrj != NULL); } /// \ru Указатель на полную проекцию. \en The pointer to a full projection. MbCurve * DetachTotalProjection() { return ::DetachItem( totalPrj ); } /// \ru Установить полную проекцию. \en Set a full projection. @@ -466,7 +466,7 @@ const MbCurve * MbCurveVestige::GetFullProjection() const MbCurve * curve = totalPrj; - if ( curve == c3d_null ) { + if ( curve == NULL ) { if ( !!arVisPrj && (arVisPrj->size() == 1) ) curve = arVisPrj->operator[]( 0 ); else if ( !!arHidPrj && (arHidPrj->size() == 1) ) @@ -480,15 +480,15 @@ const MbCurve * MbCurveVestige::GetFullProjection() const //--- inline MbCurve * MbCurveVestige::_PickupVisibleCurve( size_t k ) { - if ( arVisPrj != c3d_null ) { + if ( arVisPrj != NULL ) { PArray & crvs = *arVisPrj; MbCurve * crv = crvs[k]; ::AddRefItem( crv ); // захват и отпускание на случай перехода на владение по счетчику ссылок - crvs[k] = c3d_null; + crvs[k] = NULL; ::DecRefItem( crv ); return crv; } - return c3d_null; + return NULL; } //------------------------------------------------------------------------------ @@ -496,15 +496,15 @@ inline MbCurve * MbCurveVestige::_PickupVisibleCurve( size_t k ) //--- inline MbCurve * MbCurveVestige::_PickupHiddenCurve( size_t k ) { - if ( arHidPrj != c3d_null ) { + if ( arHidPrj != NULL ) { PArray & crvs = *arHidPrj; MbCurve * crv = crvs[k]; ::AddRefItem( crv ); // захват и отпускание на случай перехода на владение по счетчику ссылок - crvs[k] = c3d_null; + crvs[k] = NULL; ::DecRefItem( crv ); return crv; } - return c3d_null; + return NULL; } //------------------------------------------------------------------------------ @@ -513,11 +513,11 @@ inline MbCurve * MbCurveVestige::_PickupHiddenCurve( size_t k ) inline void MbCurveVestige::DetachAllCurves( PArray *& visCurves, PArray *& hidCurves, SPtr & wholePrj ) { wholePrj = totalPrj; - totalPrj = c3d_null; + totalPrj = NULL; arTotal.clear(); - visCurves = !!arVisPrj ? arVisPrj.Relinquish() : c3d_null; - hidCurves = !!arHidPrj ? arHidPrj.Relinquish() : c3d_null; + visCurves = !!arVisPrj ? arVisPrj.Relinquish() : NULL; + hidCurves = !!arHidPrj ? arHidPrj.Relinquish() : NULL; } //------------------------------------------------------------------------------ @@ -634,7 +634,7 @@ protected: , vesSubType( vst_None ) {} public: - virtual MbBaseVestige & Duplicate( MbRegDuplicate * iReg = c3d_null ) const; + virtual MbBaseVestige & Duplicate( MbRegDuplicate * iReg = NULL ) const; public: /// \ru Получить тип отображения. \en Get mapping type. Type GetType() const { return (Type)vesType; } @@ -735,7 +735,7 @@ protected: /// \ru Конструктор копирования с регистратором. \en Copy-constructor with the registrator. MbFaceVestige( const MbFaceVestige & other, MbRegDuplicate * iReg ); public: - virtual MbBaseVestige & Duplicate( MbRegDuplicate * iReg = c3d_null ) const; + virtual MbBaseVestige & Duplicate( MbRegDuplicate * iReg = NULL ) const; public: /// \ru Тип отображения. \en Mapping type. Type GetType() const { return (Type)vesType; } @@ -796,7 +796,7 @@ protected: MbAnnotationEdgeVestige( const MbAnnotationEdgeVestige & other, MbRegDuplicate * iReg ); public: - virtual MbBaseVestige & Duplicate( MbRegDuplicate * iReg = c3d_null ) const; + virtual MbBaseVestige & Duplicate( MbRegDuplicate * iReg = NULL ) const; public: /// \ru Тип отображения. \en Mapping type. @@ -886,7 +886,7 @@ protected: MbSymbolVestige( uint otherComp, size_t otherIdent, const MbTopologyItem * otherItem, const MbName & otherName, bool _bvisible = true ) : MbBaseVestige( otherComp, otherIdent, otherName, otherItem ) , bvisible( _bvisible ) - , matrix ( c3d_null ) + , matrix ( NULL ) {} /// \ru Конструктор копирования с регистратором. \en Copy-constructor with the registrator. MbSymbolVestige( const MbSymbolVestige & other, MbRegDuplicate * iReg ); @@ -894,12 +894,12 @@ protected: MbSymbolVestige() : MbBaseVestige() , bvisible( true ) - , matrix ( c3d_null ) + , matrix ( NULL ) {} public: virtual ~MbSymbolVestige() {} - virtual MbBaseVestige & Duplicate( MbRegDuplicate * iReg = c3d_null ) const; + virtual MbBaseVestige & Duplicate( MbRegDuplicate * iReg = NULL ) const; public: /// \ru Это видимая точка? \en Is point visible? @@ -924,8 +924,8 @@ IMPL_PERSISTENT_OPS( MbSymbolVestige ) // --- inline void MbSymbolVestige::SetMatrix( const MbMatrix & initMatrix ) { - C3D_ASSERT( matrix == c3d_null ); - if ( matrix == c3d_null ) + C3D_ASSERT( matrix == NULL ); + if ( matrix == NULL ) matrix = new MbMatrix( initMatrix ); else *matrix = initMatrix; @@ -970,7 +970,7 @@ public: public: /// \ru Создать копию объекта. \en Create a copy of the object. - virtual MbVEFVestiges & Duplicate( MbRegDuplicate * iReg = c3d_null ) const; + virtual MbVEFVestiges & Duplicate( MbRegDuplicate * iReg = NULL ) const; /// \ru Очистить массивы следов. \en Clear arrays of vestiges. void SetEmpty() { @@ -1209,16 +1209,16 @@ inline MbEdgeVestige * MbVEFVestiges::AddVestigeCurve( uint otherComp, size_t ot inline MbEdgeVestige * MbVEFVestiges::AddVestigeCurve( uint otherComp, size_t otherIdent, const RPArray & mapCurves, bool visible, const MbName & otherName ) { - MbEdgeVestige * ev = c3d_null; + MbEdgeVestige * ev = NULL; ev = ::AddVestigeCurve( otherComp, otherIdent, otherName, curveVestiges, false, false ); // BUG_93683 ev = ::AddVestigeEdge( otherComp, otherIdent, otherName, MbBaseVestige::vt_Edge, edgeVestiges ); - if ( ev != c3d_null ) { + if ( ev != NULL ) { MbCurveVestige & vc = ev->curveInfo; for ( size_t m = 0, mapCurvesCnt = mapCurves.Count(); m < mapCurvesCnt; m++ ) { MbCurve * mapCurve = mapCurves[m]; - if ( mapCurve != c3d_null ) + if ( mapCurve != NULL ) vc.AddSegment( *mapCurve, visible ); } } diff --git a/C3d/Include/marker.h b/C3d/Include/marker.h index 94cbd38..49b7d18 100644 --- a/C3d/Include/marker.h +++ b/C3d/Include/marker.h @@ -76,10 +76,10 @@ public: // \ru Общие функции геометрического объекта \en Common functions of a geometric object virtual MbeSpaceType IsA() const; // \ru Тип объекта. \en Type of the object. virtual MbeSpaceType Type() const; // \ru Тип объекта. \en Type of the object. - virtual MbSpaceItem & Duplicate( MbRegDuplicate * = c3d_null ) const; // \ru Создать копию. \en Create a copy. - virtual void Transform( const MbMatrix3D &, MbRegTransform * = c3d_null ); // \ru Преобразовать согласно матрице. \en Transform according to the matrix. - virtual void Move( const MbVector3D &, MbRegTransform * = c3d_null ); // \ru Сдвинуть вдоль вектора. \en Translate along a vector. - virtual void Rotate( const MbAxis3D &, double angle, MbRegTransform * = c3d_null ); // \ru Повернуть вокруг оси. \en Rotate around an axis. + virtual MbSpaceItem & Duplicate( MbRegDuplicate * = NULL ) const; // \ru Создать копию. \en Create a copy. + virtual void Transform( const MbMatrix3D &, MbRegTransform * = NULL ); // \ru Преобразовать согласно матрице. \en Transform according to the matrix. + virtual void Move( const MbVector3D &, MbRegTransform * = NULL ); // \ru Сдвинуть вдоль вектора. \en Translate along a vector. + virtual void Rotate( const MbAxis3D &, double angle, MbRegTransform * = NULL ); // \ru Повернуть вокруг оси. \en Rotate around an axis. virtual bool IsSame( const MbSpaceItem & other, double accuracy = LENGTH_EPSILON ) const; // \ru Являются ли объекты равными? \en Determine whether objects are equal. virtual bool IsSimilar( const MbSpaceItem & init ) const; // \ru Являются ли объекты подобными? \en Determine whether objects are similar. virtual bool SetEqual ( const MbSpaceItem & init ); // \ru Сделать объекты равным. \en Make objects equal. diff --git a/C3d/Include/math_define.h b/C3d/Include/math_define.h index 6749456..c4fca86 100644 --- a/C3d/Include/math_define.h +++ b/C3d/Include/math_define.h @@ -39,59 +39,49 @@ namespace c3d // namespace C3D { -typedef std::pair IndicesPair; ///< \ru Пара целочисленных неотрицательных индексов. \en Pair of non-negative integer indices. -typedef std::pair NumbersPair; ///< \ru Пара целочисленных номеров. \en Pair of integer numbers. -typedef std::pair UintPair; ///< \ru Пара 32-битных целочисленных неотрицательных индексов. \en Pair of 32-bit non-negative integer indices. -typedef std::pair BoolPair; ///< \ru Пара флагов. \en Bool pair. -typedef std::pair DoublePair; ///< \ru Пара действительных чисел двойной точности с плавающей запятой. \en Pair of doubles. -typedef std::pair IndicesPairDouble; ///< \ru Пара индексов и числа. \en A pair of indices and double. -typedef std::pair DoubleIndicesPair; ///< \ru Число и пара индексов. \en Double and a pair of indices. +typedef std::pair IndicesPair; ///< \ru Пара целочисленных неотрицательных индексов. \en Pair of non-negative integer indices. +typedef std::pair NumbersPair; ///< \ru Пара целочисленных номеров. \en Pair of integer numbers. +typedef std::pair UintPair; ///< \ru Пара 32-битных целочисленных неотрицательных индексов. \en Pair of 32-bit non-negative integer indices. +typedef std::pair BoolPair; ///< \ru Пара флагов. \en Bool pair. +typedef std::pair DoublePair; ///< \ru Пара действительных чисел двойной точности с плавающей запятой. \en Pair of doubles. +typedef std::pair IndicesPairDouble; ///< \ru Пара индексов и числа. \en A pair of indices and double. +typedef std::pair DoubleIndicesPair; ///< \ru Число и пара индексов. \en Double and a pair of indices. -typedef std::pair IndexBool; ///< \ru Пара номер-флаг. \en Index-double pair. -typedef std::pair BoolIndex; ///< \ru Пара флаг-номер. \en Double-index pair. -typedef std::pair IndexDouble; ///< \ru Пара номер-число. \en Index-double pair. -typedef std::pair DoubleIndex; ///< \ru Пара число-номер. \en Double-index pair. -typedef std::pair FlagDouble; ///< \ru Пара флаг-число. \en Flag-double pair. -typedef std::pair DoubleFlag; ///< \ru Пара число-флаг. \en Double-flag pair. -typedef FlagDouble BoolDouble; ///< \ru Пара флаг-число. \en Flag-double pair. -typedef DoubleFlag DoubleBool; ///< \ru Пара число-флаг. \en Double-flag pair. +typedef std::pair IndexBool; ///< \ru Пара номер-флаг. \en Index-double pair. +typedef std::pair BoolIndex; ///< \ru Пара флаг-номер. \en Double-index pair. +typedef std::pair IndexDouble; ///< \ru Пара номер-число. \en Index-double pair. +typedef std::pair DoubleIndex; ///< \ru Пара число-номер. \en Double-index pair. +typedef std::pair FlagDouble; ///< \ru Пара флаг-число. \en Flag-double pair. +typedef std::pair DoubleFlag; ///< \ru Пара число-флаг. \en Double-flag pair. +typedef FlagDouble BoolDouble; ///< \ru Пара флаг-число. \en Flag-double pair. +typedef DoubleFlag DoubleBool; ///< \ru Пара число-флаг. \en Double-flag pair. -typedef std::vector IndicesVector; ///< \ru Вектор целочисленных неотрицательных индексов. \en Vector of non-negative integer indices. -typedef std::vector NumbersVector; ///< \ru Вектор целочисленных номеров. \en Vector of integer numbers. -typedef std::vector UintVector; ///< \ru Вектор 32-битных целочисленных неотрицательных индексов. \en Vector of 32-bit non-negative integer indices. -typedef std::vector BoolVector; ///< \ru Вектор флагов. \en Bool vector. -typedef std::vector DoubleVector; ///< \ru Вектор double. \en Double vector. +typedef std::vector IndicesVector; ///< \ru Вектор целочисленных неотрицательных индексов. \en Vector of non-negative integer indices. +typedef std::vector NumbersVector; ///< \ru Вектор целочисленных номеров. \en Vector of integer numbers. +typedef std::vector UintVector; ///< \ru Вектор 32-битных целочисленных неотрицательных индексов. \en Vector of 32-bit non-negative integer indices. +typedef std::vector BoolVector; ///< \ru Вектор флагов. \en Bool vector. +typedef std::vector DoubleVector; ///< \ru Вектор double. \en Double vector. -typedef std::vector IndicesPairsVector; ///< \ru Вектор пар целочисленных неотрицательных индексов. \en Vector of pairs of non-negative integer indices. -typedef std::vector NumbersPairsVector; ///< \ru Вектор пар целочисленных индексов. \en Vector of pairs of integer indices. -typedef std::vector DoublePairsVector; ///< \ru Вектор пар double. \en Vector of double pairs. +typedef std::vector< IndicesPair > IndicesPairsVector; ///< \ru Вектор пар целочисленных неотрицательных индексов. \en Vector of pairs of non-negative integer indices. +typedef std::vector< NumbersPair > NumbersPairsVector; ///< \ru Вектор пар целочисленных индексов. \en Vector of pairs of integer indices. +typedef std::vector< DoublePair > DoublePairsVector; ///< \ru Вектор пар double. \en Vector of double pairs. -typedef std::set IndicesSet; ///< \ru Набор целочисленных неотрицательных индексов. \en Set of non-negative integer indices. -typedef IndicesSet::iterator IndicesSetIt; -typedef IndicesSet::const_iterator IndicesSetConstIt; -typedef std::pair IndicesSetRet; +typedef std::set IndicesSet; ///< \ru Набор целочисленных неотрицательных индексов. \en Set of non-negative integer indices. +typedef IndicesSet::iterator IndicesSetIt; +typedef IndicesSet::const_iterator IndicesSetConstIt; +typedef std::pair IndicesSetRet; -typedef std::set NumbersSet; ///< \ru Набор целочисленных номеров. \en Set of integer numbers. -typedef NumbersSet::iterator NumbersSetIt; -typedef NumbersSet::const_iterator NumbersSetConstIt; -typedef std::pair NumbersSetRet; +typedef std::set NumbersSet; ///< \ru Набор целочисленных номеров. \en Set of integer numbers. +typedef NumbersSet::iterator NumbersSetIt; +typedef NumbersSet::const_iterator NumbersSetConstIt; +typedef std::pair NumbersSetRet; -typedef std::set UintSet; ///< \ru Набор 32-битных целочисленных неотрицательных индексов. \en Set of 32-bit non-negative integer indices. -typedef UintSet::iterator UintSetIt; -typedef UintSet::const_iterator UintSetConstIt; -typedef std::pair UintSetRet; +typedef std::set UintSet; ///< \ru Набор 32-битных целочисленных неотрицательных индексов. \en Set of 32-bit non-negative integer indices. +typedef UintSet::iterator UintSetIt; +typedef UintSet::const_iterator UintSetConstIt; +typedef std::pair UintSetRet; -typedef std::set UintPairsSet; ///< \ru Набор пар 32-битных целочисленных неотрицательных индексов. \en Set of pairs of 32-bit non-negative integer indices. -typedef UintPairsSet::iterator UintPairsSetIt; -typedef UintPairsSet::const_iterator UintPairsSetConstIt; -typedef std::pair UintPairsSetRet; - -typedef std::set IndicesPairsSet; ///< \ru Набор пар целочисленных неотрицательных индексов. \en Set of pairs of non-negative integer indices. -typedef IndicesPairsSet::iterator IndicesPairsSetIt; -typedef IndicesPairsSet::const_iterator IndicesPairsSetConstIt; -typedef std::pair IndicesPairsSetRet; - -typedef std::pair IndicesPairsPair; ///< \ru Пара индексных пар. \en Pair of indices' pair. +typedef std::pair IndicesPairsPair; ///< \ru Пара индексных пар. \en Pair of indices' pair. //------------------------------------------------------------------------------ @@ -99,7 +89,7 @@ typedef std::pair IndicesPairsPair; ///< \ru Па // --- template bool IsNullPointer( const ItemPtr * itemPtr ) { - return ((c3d_null == itemPtr) ? true : false); + return ((C3D_NULL_PTR == itemPtr) ? true : false); } //------------------------------------------------------------------------------ @@ -268,7 +258,7 @@ private: \ // // \ru примеры: \en examples: // \ru #pragma message( __TODO__ "Восстановить закрытый код" ) \en #pragma message( __TODO__ "Restore the private code" ) -// \ru #pragma message( __WARN__ "Отсутствует проверка на c3d_null" ) \en #pragma message( __WARN__ "There is no check for c3d_null" ) +// \ru #pragma message( __WARN__ "Отсутствует проверка на NULL" ) \en #pragma message( __WARN__ "There is no check for NULL" ) //--- #ifdef _MSC_VER // __TODO__ / __WARN__ @@ -329,6 +319,12 @@ private: \ #define CONV_FUNC MATH_FUNC #define CONV_FUNC_EX MATH_FUNC_EX +// \ru Поддержка кода. \en Support of the code. +#ifndef NULL +#define NULL 0 +#endif + + namespace c3d // namespace C3D { diff --git a/C3d/Include/math_version.h b/C3d/Include/math_version.h index 6add4a1..b2d3c52 100644 --- a/C3d/Include/math_version.h +++ b/C3d/Include/math_version.h @@ -112,7 +112,7 @@ MATH_FUNC (VERSION) GetCurrentMathFileVersion(); //------------------------------------------------------------------------------ /// \ru Можно ли потенциально сохранить в заданную версию? \en Can it be saved to this math version? \~ \ingroup Base_Tools // --- -MATH_FUNC( bool ) CanWriteToMathFileVersion( VERSION dstVertsion, bool * canUseWriterEx = c3d_null ); +MATH_FUNC( bool ) CanWriteToMathFileVersion( VERSION dstVertsion, bool * canUseWriterEx = NULL ); //------------------------------------------------------------------------------ @@ -131,10 +131,9 @@ enum MbeWritableReleaseVersion wrv_MATH_18_SP1 = MATH_18_SP1_VERSION, ///< \ru Версия файла - 18.1. \en The file version - 18.1. wrv_C3D_2019 = C3D_2019_VERSION, ///< \ru Версия файла - C3D 2019. \en The file version - C3D 2019. wrv_MATH_19 = MATH_19_VERSION, ///< \ru Версия файла - 19.0. \en The file version - 19.0. - wrv_C3D_2020 = C3D_2020_VERSION, ///< \ru Версия файла - C3D 2020. \en The file version - C3D 2020. - wrv_PrevRelease = wrv_MATH_19, ///< \ru Версия потока предпоследнего релиза. \en The previous release version. - wrv_LastRelease = wrv_C3D_2020, ///< \ru Версия потока последнего релиза. \en The last release version. + wrv_PrevRelease = wrv_MATH_18_SP1, ///< \ru Версия потока предпоследнего релиза. \en The previous release version. + wrv_LastRelease = wrv_C3D_2019, ///< \ru Версия потока последнего релиза. \en The last release version. wrv_MaxPossible = SYS_MAX_UINT32 ///< \ru Использовать последнюю версия потока. \en Use current working version. }; diff --git a/C3d/Include/mb_class_traits.h b/C3d/Include/mb_class_traits.h index 9ef6082..f2572c6 100644 --- a/C3d/Include/mb_class_traits.h +++ b/C3d/Include/mb_class_traits.h @@ -57,7 +57,7 @@ struct _IsInstant template inline bool operator()( const ParentType * obj, const ClassEnum _typeId ) { - return obj == c3d_null ? true : obj->IsA() == _typeId; + return obj == NULL ? true : obj->IsA() == _typeId; } }; @@ -69,7 +69,7 @@ struct _IsFamily template inline bool operator()( const ParentType * obj, const ClassEnum _typeId ) { - return obj == c3d_null ? true : obj->Family() == _typeId; + return obj == NULL ? true : obj->Family() == _typeId; } }; @@ -154,7 +154,7 @@ inline DerivedPtr _IsaCast( ParentType * obj ) { return static_cast( obj ); } - return static_cast( c3d_null ); + return static_cast( NULL ); } //---------------------------------------------------------------------------------------- @@ -202,7 +202,7 @@ DerivedPtr isa_cast( ParentType * obj ) template< class DerivedPtr > DerivedPtr isa_cast( const MbRefItem * obj ) { - DerivedPtr resPtr = c3d_null; + DerivedPtr resPtr = NULL; return _IsaCast( obj, resPtr ); } @@ -214,7 +214,7 @@ DerivedPtr isa_cast( const MbRefItem * obj ) template< class DerivedPtr > DerivedPtr isa_cast( MbRefItem * obj ) { - DerivedPtr resPtr = c3d_null; + DerivedPtr resPtr = NULL; return _IsaCast( obj, resPtr ); } diff --git a/C3d/Include/mb_cross_point.h b/C3d/Include/mb_cross_point.h index 4076aba..bedf5de 100644 --- a/C3d/Include/mb_cross_point.h +++ b/C3d/Include/mb_cross_point.h @@ -55,7 +55,7 @@ public: template MbPointOnCurve::MbPointOnCurve() : t ( 0.0 ) - , curve( c3d_null ) + , curve( NULL ) {} diff --git a/C3d/Include/mb_cube_tree.h b/C3d/Include/mb_cube_tree.h index d1e341b..7851312 100644 --- a/C3d/Include/mb_cube_tree.h +++ b/C3d/Include/mb_cube_tree.h @@ -242,9 +242,9 @@ inline MbCubeTree::MbCubeTree( const std::vector & , direction ( eda_anyDirection ) , dmType ( dm ) , leafObjects( ) - , midstBranch( c3d_null ) - , lowerBranch( c3d_null ) - , upperBranch( c3d_null ) + , midstBranch( NULL ) + , lowerBranch( NULL ) + , upperBranch( NULL ) { size_t cnt = objects.size(); C3D_ASSERT( Cube::GetDimension() == Point::GetDimension() ); @@ -252,7 +252,7 @@ inline MbCubeTree::MbCubeTree( const std::vector & if ( cnt > 0 ) { // Инициализация дерева Cube gabarit; for ( size_t i = 0; i < cnt; ++i ) { - if ( objects[i].first != c3d_null ) + if ( objects[i].first != NULL ) gabarit |= objects[i].first->GetCube(); } InitTree( objects, gabarit, eda_anyDirection, 0, 0 ); @@ -273,9 +273,9 @@ inline MbCubeTree::MbCubeTree( const std::vector & , direction ( eda_anyDirection ) , dmType ( dm ) , leafObjects( ) - , midstBranch( c3d_null ) - , lowerBranch( c3d_null ) - , upperBranch( c3d_null ) + , midstBranch( NULL ) + , lowerBranch( NULL ) + , upperBranch( NULL ) { C3D_ASSERT( Cube::GetDimension() == Point::GetDimension() ); InitTree( objects, gabarit, eda_anyDirection, 0, 0 ); @@ -295,9 +295,9 @@ inline MbCubeTree::MbCubeTree( DistanceMeasure dm ) , direction ( eda_anyDirection ) , dmType ( dm ) , leafObjects( ) - , midstBranch( c3d_null ) - , lowerBranch( c3d_null ) - , upperBranch( c3d_null ) + , midstBranch( NULL ) + , lowerBranch( NULL ) + , upperBranch( NULL ) { } @@ -311,7 +311,7 @@ inline void MbCubeTree::Clear() delete midstBranch; delete lowerBranch; delete upperBranch; - midstBranch = lowerBranch = upperBranch = c3d_null; + midstBranch = lowerBranch = upperBranch = NULL; midst = minimum = maximum = lower = upper = 0.0; direction = eda_anyDirection; leafObjects.clear(); @@ -566,7 +566,7 @@ inline void MbCubeTree::SetBranches( const std::vectorGetCube(); double pMin = UNDEFINED_DBL; double pMax = UNDEFINED_DBL; @@ -606,22 +606,22 @@ inline void MbCubeTree::SetBranches( const std::vector 0) || (upperCount > 0) ) { if ( lowerCount > 0 ) { // нижняя ветвь / lower branch - C3D_ASSERT ( lowerBranch == c3d_null ); - if ( lowerBranch == c3d_null ) + C3D_ASSERT ( lowerBranch == NULL ); + if ( lowerBranch == NULL ) lowerBranch = new MbCubeTree( dmType ); lowerBranch->InitTree( lowerArray, lowerGabarit, eda_anyDirection, tier+1, 0 ); lowerArray.clear(); } if ( upperCount > 0 ) { // верхняя ветвь / upper branch - C3D_ASSERT( upperBranch == c3d_null ); - if ( upperBranch == c3d_null ) + C3D_ASSERT( upperBranch == NULL ); + if ( upperBranch == NULL ) upperBranch = new MbCubeTree( dmType ); upperBranch->InitTree( upperArray, upperGabarit, eda_anyDirection, tier+1, 0 ); upperArray.clear(); } if ( midstCount > 0 ) { // центральная ветвь / central branch - C3D_ASSERT( midstBranch == c3d_null ); - if ( midstBranch == c3d_null ) + C3D_ASSERT( midstBranch == NULL ); + if ( midstBranch == NULL ) midstBranch = new MbCubeTree( dmType ); midstBranch->InitTree( midstArray, midstGabarit, direction, tier+1, 0 ); midstArray.clear(); @@ -650,7 +650,7 @@ inline void MbCubeTree::SetBranches( const std::vector::FillLeaf( const std::vector::FillLeaf( const std::vector inline bool MbCubeTree::IsReady() const { - return ( (midstBranch != c3d_null) || - (lowerBranch != c3d_null) || - (upperBranch != c3d_null) || + return ( (midstBranch != NULL) || + (lowerBranch != NULL) || + (upperBranch != NULL) || (leafObjects.size() > 0) ); } @@ -733,11 +733,11 @@ template inline size_t MbCubeTree::Count() const { size_t cnt = leafObjects.size(); - if ( midstBranch != c3d_null ) + if ( midstBranch != NULL ) cnt += midstBranch->Count(); - if ( lowerBranch != c3d_null ) + if ( lowerBranch != NULL ) cnt += lowerBranch->Count(); - if ( upperBranch != c3d_null ) + if ( upperBranch != NULL ) cnt += upperBranch->Count(); return cnt; } @@ -750,7 +750,7 @@ template inline void MbCubeTree::GetContainsObjects( const Point & pnt, double epsilon, std::vector & items ) const { - if ( (lowerBranch != c3d_null) || (upperBranch != c3d_null) || (midstBranch != c3d_null) ) { + if ( (lowerBranch != NULL) || (upperBranch != NULL) || (midstBranch != NULL) ) { double w = -MB_MAXDOUBLE; switch ( direction ) { @@ -765,13 +765,13 @@ inline void MbCubeTree::GetContainsObjects( const Point & pnt if ( (w < (minimum - epsilon)) || ((maximum + epsilon) < w) ) return; // вне области / out of region - if ( (w < (midst + epsilon)) && (lowerBranch != c3d_null) ) { + if ( (w < (midst + epsilon)) && (lowerBranch != NULL) ) { lowerBranch->GetContainsObjects( pnt, epsilon, items ); } - if ( ((midst - epsilon) < w) && (upperBranch != c3d_null) ) { + if ( ((midst - epsilon) < w) && (upperBranch != NULL) ) { upperBranch->GetContainsObjects( pnt, epsilon, items ); } - if ( ((lower - epsilon) < w) && (w < (upper + epsilon)) && (midstBranch != c3d_null) ) { + if ( ((lower - epsilon) < w) && (w < (upper + epsilon)) && (midstBranch != NULL) ) { midstBranch->GetContainsObjects( pnt, epsilon, items ); } } @@ -780,7 +780,7 @@ inline void MbCubeTree::GetContainsObjects( const Point & pnt items.reserve( items.size() + iCount ); for ( size_t i = 0; i < iCount; ++i ) { const ItemIndex & obj = leafObjects[i]; - if ( obj.first != c3d_null ) { + if ( obj.first != NULL ) { if ( obj.first->GetCube().Contains( pnt, epsilon ) ) items.push_back( obj.first ); } @@ -796,7 +796,7 @@ template inline void MbCubeTree::GetContainsObjects( const Point & pnt, double epsilon, c3d::IndicesVector & indices ) const { - if ( (lowerBranch != c3d_null) || (upperBranch != c3d_null) || (midstBranch != c3d_null) ) { + if ( (lowerBranch != NULL) || (upperBranch != NULL) || (midstBranch != NULL) ) { double w = -MB_MAXDOUBLE; switch ( direction ) { @@ -811,13 +811,13 @@ inline void MbCubeTree::GetContainsObjects( const Point & pnt if ( (w < (minimum - epsilon)) || ((maximum + epsilon) < w) ) return; // вне области / out of region - if ( (w < (midst + epsilon)) && (lowerBranch != c3d_null) ) { + if ( (w < (midst + epsilon)) && (lowerBranch != NULL) ) { lowerBranch->GetContainsObjects( pnt, epsilon, indices ); } - if ( ((midst - epsilon) < w) && (upperBranch != c3d_null) ) { + if ( ((midst - epsilon) < w) && (upperBranch != NULL) ) { upperBranch->GetContainsObjects( pnt, epsilon, indices ); } - if ( ((lower - epsilon) < w) && (w < (upper + epsilon)) && (midstBranch != c3d_null) ) { + if ( ((lower - epsilon) < w) && (w < (upper + epsilon)) && (midstBranch != NULL) ) { midstBranch->GetContainsObjects( pnt, epsilon, indices ); } } @@ -826,7 +826,7 @@ inline void MbCubeTree::GetContainsObjects( const Point & pnt indices.reserve( indices.size() + iCount ); for ( size_t i = 0; i < iCount; ++i ) { const ItemIndex & obj = leafObjects[i]; - if ( obj.first != c3d_null ) { + if ( obj.first != NULL ) { if ( obj.first->GetCube().Contains( pnt, epsilon ) ) indices.push_back( obj.second ); } @@ -843,7 +843,7 @@ inline void MbCubeTree::GetIntersectObjects( const Cube & gab std::vector & items, bool skipOwnself ) const { - if ( (lowerBranch != c3d_null) || (upperBranch != c3d_null) || (midstBranch != c3d_null) ) { + if ( (lowerBranch != NULL) || (upperBranch != NULL) || (midstBranch != NULL) ) { double wMin = MB_MAXDOUBLE; double wMax = -MB_MAXDOUBLE; @@ -856,13 +856,13 @@ inline void MbCubeTree::GetIntersectObjects( const Cube & gab if ( (wMax < minimum) || (maximum < wMin) ) return; // вне области / out of region - if ( (wMin < midst) && (lowerBranch != c3d_null) ) { + if ( (wMin < midst) && (lowerBranch != NULL) ) { lowerBranch->GetIntersectObjects( gabarit, epsilon, items, skipOwnself ); } - if ( (midst < wMax) && (upperBranch != c3d_null) ) { + if ( (midst < wMax) && (upperBranch != NULL) ) { upperBranch->GetIntersectObjects( gabarit, epsilon, items, skipOwnself ); } - if ( (lower < wMax) && (wMin < upper) && (midstBranch != c3d_null) ) { + if ( (lower < wMax) && (wMin < upper) && (midstBranch != NULL) ) { midstBranch->GetIntersectObjects( gabarit, epsilon, items, skipOwnself ); } } @@ -871,7 +871,7 @@ inline void MbCubeTree::GetIntersectObjects( const Cube & gab items.reserve( items.size() + iCount ); for ( size_t i = 0; i < iCount; ++i ) { const ItemIndex & obj = leafObjects[i]; - if ( obj.first != c3d_null ) { + if ( obj.first != NULL ) { if ( !skipOwnself || (&gabarit != &static_cast(obj.first->GetCube()) ) ) { // KOMPAS-20871 if ( obj.first->GetCube().Intersect( gabarit, epsilon ) ) items.push_back( obj.first ); @@ -890,7 +890,7 @@ inline void MbCubeTree::GetIntersectObjects( const Cube & gab c3d::IndicesVector & items, bool skipOwnself ) const { - if ( (lowerBranch != c3d_null) || (upperBranch != c3d_null) || (midstBranch != c3d_null) ) { + if ( (lowerBranch != NULL) || (upperBranch != NULL) || (midstBranch != NULL) ) { double wMin = MB_MAXDOUBLE; double wMax = -MB_MAXDOUBLE; @@ -906,13 +906,13 @@ inline void MbCubeTree::GetIntersectObjects( const Cube & gab if ( (wMax < minimum) || (maximum < wMin) ) return; // вне области / out of region - if ( (wMin < midst) && (lowerBranch != c3d_null) ) { + if ( (wMin < midst) && (lowerBranch != NULL) ) { lowerBranch->GetIntersectObjects( gabarit, epsilon, items, skipOwnself ); } - if ( (midst < wMax) && (upperBranch != c3d_null) ) { + if ( (midst < wMax) && (upperBranch != NULL) ) { upperBranch->GetIntersectObjects( gabarit, epsilon, items, skipOwnself ); } - if ( (lower < wMax) && (wMin < upper) && (midstBranch != c3d_null) ) { + if ( (lower < wMax) && (wMin < upper) && (midstBranch != NULL) ) { midstBranch->GetIntersectObjects( gabarit, epsilon, items, skipOwnself ); } } @@ -921,7 +921,7 @@ inline void MbCubeTree::GetIntersectObjects( const Cube & gab items.reserve( items.size() + iCount ); for ( size_t i = 0; i < iCount; ++i ) { const ItemIndex & obj = leafObjects[i]; - if ( obj.first != c3d_null ) { + if ( obj.first != NULL ) { if ( !skipOwnself || (&gabarit != &static_cast(obj.first->GetCube()) ) ) { // KOMPAS-20871 if ( obj.first->GetCube().Intersect( gabarit, epsilon ) ) items.push_back( obj.second ); @@ -961,7 +961,7 @@ inline double MbCubeTree::GetDistance( const Type & object, c template inline void MbCubeTree::FindNearestObject( const Cube & gabarit, double & distance, const Type *& item, double eps ) const { - if ( (lowerBranch != c3d_null) || (upperBranch != c3d_null) || (midstBranch != c3d_null) ) { + if ( (lowerBranch != NULL) || (upperBranch != NULL) || (midstBranch != NULL) ) { double wMin = MB_MAXDOUBLE; double wMax = -MB_MAXDOUBLE; @@ -977,20 +977,20 @@ inline void MbCubeTree::FindNearestObject( const Cube & gabar if ( (wMax < (minimum-distance)) || ((maximum+distance) < wMin) ) return; // вне области / out of region - if ( (wMin < (midst+distance)) && (lowerBranch != c3d_null) ) { + if ( (wMin < (midst+distance)) && (lowerBranch != NULL) ) { lowerBranch->FindNearestObject( gabarit, distance, item, eps ); } - if ( ((midst-distance) < wMax) && (upperBranch != c3d_null) ) { + if ( ((midst-distance) < wMax) && (upperBranch != NULL) ) { upperBranch->FindNearestObject( gabarit, distance, item, eps ); } - if ( ((lower-distance) < wMax) && (wMin < (upper+distance)) && (midstBranch != c3d_null) ) { + if ( ((lower-distance) < wMax) && (wMin < (upper+distance)) && (midstBranch != NULL) ) { midstBranch->FindNearestObject( gabarit, distance, item, eps ); } } else { // содержимое конечной ветви / final branch content for ( size_t i = 0, iCount = leafObjects.size(); i < iCount; ++i ) { const ItemIndex & obj = leafObjects[i]; - if ( obj.first != c3d_null ) { + if ( obj.first != NULL ) { double d = obj.first->GetCube().DistanceToCube( gabarit, eps ); if ( distance > d - eps ) { item = obj.first; @@ -1008,7 +1008,7 @@ inline void MbCubeTree::FindNearestObject( const Cube & gabar template inline void MbCubeTree::FindNearestObject( const Cube & gabarit, double & distance, size_t & index, double eps ) const { - if ( (lowerBranch != c3d_null) || (upperBranch != c3d_null) || (midstBranch != c3d_null) ) { + if ( (lowerBranch != NULL) || (upperBranch != NULL) || (midstBranch != NULL) ) { double wMin = MB_MAXDOUBLE; double wMax = -MB_MAXDOUBLE; @@ -1024,20 +1024,20 @@ inline void MbCubeTree::FindNearestObject( const Cube & gabar if ( (wMax < (minimum-distance)) || ((maximum+distance) < wMin) ) return; // вне области / out of region - if ( (wMin < (midst+distance)) && (lowerBranch != c3d_null) ) { + if ( (wMin < (midst+distance)) && (lowerBranch != NULL) ) { lowerBranch->FindNearestObject( gabarit, distance, index, eps ); } - if ( ((midst-distance) < wMax) && (upperBranch != c3d_null) ) { + if ( ((midst-distance) < wMax) && (upperBranch != NULL) ) { upperBranch->FindNearestObject( gabarit, distance, index, eps ); } - if ( ((lower-distance) < wMax) && (wMin < (upper+distance)) && (midstBranch != c3d_null) ) { + if ( ((lower-distance) < wMax) && (wMin < (upper+distance)) && (midstBranch != NULL) ) { midstBranch->FindNearestObject( gabarit, distance, index, eps ); } } else { // содержимое конечной ветви / final branch content for ( size_t i = 0, iCount = leafObjects.size(); i < iCount; ++i ) { const ItemIndex & obj = leafObjects[i]; - if ( obj.first != c3d_null ) { + if ( obj.first != NULL ) { double d = obj.first->GetCube().DistanceToCube( gabarit, eps ); if ( distance > d - eps ) { index = obj.second; @@ -1057,7 +1057,7 @@ inline void MbCubeTree::GetNearestObjects( const Cube & gabar std::vector & itemDistances, double eps ) const { - if ( (lowerBranch != c3d_null) || (upperBranch != c3d_null) || (midstBranch != c3d_null) ) { + if ( (lowerBranch != NULL) || (upperBranch != NULL) || (midstBranch != NULL) ) { double wMin = MB_MAXDOUBLE; double wMax = -MB_MAXDOUBLE; @@ -1073,20 +1073,20 @@ inline void MbCubeTree::GetNearestObjects( const Cube & gabar if ( (wMax < (minimum-distance)) || ((maximum+distance) < wMin) ) return; // вне области / out of region - if ( (wMin < (midst+distance)) && (lowerBranch != c3d_null) ) { + if ( (wMin < (midst+distance)) && (lowerBranch != NULL) ) { lowerBranch->GetNearestObjects( gabarit, distance, itemDistances, eps ); } - if ( ((midst-distance) < wMax) && (upperBranch != c3d_null) ) { + if ( ((midst-distance) < wMax) && (upperBranch != NULL) ) { upperBranch->GetNearestObjects( gabarit, distance, itemDistances, eps ); } - if ( ((lower-distance) < wMax) && (wMin < (upper+distance)) && (midstBranch != c3d_null) ) { + if ( ((lower-distance) < wMax) && (wMin < (upper+distance)) && (midstBranch != NULL) ) { midstBranch->GetNearestObjects( gabarit, distance, itemDistances, eps ); } } else { // содержимое конечной ветви / final branch content for ( size_t i = 0, iCount = leafObjects.size(); i < iCount; ++i ) { const ItemIndex & obj = leafObjects[i]; - if ( obj.first != c3d_null ) { + if ( obj.first != NULL ) { double d = obj.first->GetCube().DistanceToCube( gabarit, eps ); if ( distance > d - eps ) { IndexDistance itemDistance( obj.second, d ); @@ -1104,7 +1104,7 @@ inline void MbCubeTree::GetNearestObjects( const Cube & gabar template inline void MbCubeTree::FindNearestObject( const Point & pnt, double & distance, const Type *& item, double eps ) const { - if ( (lowerBranch != c3d_null) || (upperBranch != c3d_null) || (midstBranch != c3d_null) ) { + if ( (lowerBranch != NULL) || (upperBranch != NULL) || (midstBranch != NULL) ) { double w = -MB_MAXDOUBLE; switch ( direction ) { @@ -1119,20 +1119,20 @@ inline void MbCubeTree::FindNearestObject( const Point & pnt, if ( (w < (minimum-distance)) || ((maximum+distance) < w) ) return; // вне области / out of region - if ( (w < (midst+distance)) && (lowerBranch != c3d_null) ) { + if ( (w < (midst+distance)) && (lowerBranch != NULL) ) { lowerBranch->FindNearestObject( pnt, distance, item ); } - if ( ((midst-distance) < w) && (upperBranch != c3d_null) ) { + if ( ((midst-distance) < w) && (upperBranch != NULL) ) { upperBranch->FindNearestObject( pnt, distance, item ); } - if ( ((lower-distance) < w) && (w < (upper+distance)) && (midstBranch != c3d_null) ) { + if ( ((lower-distance) < w) && (w < (upper+distance)) && (midstBranch != NULL) ) { midstBranch->FindNearestObject( pnt, distance, item ); } } else { // содержимое конечной ветви / final branch content for ( size_t i = 0, iCount = leafObjects.size(); i < iCount; ++i ) { const ItemIndex & obj = leafObjects[i]; - if ( obj.first != c3d_null ) { + if ( obj.first != NULL ) { double d = GetDistance( *obj.first, pnt, false ); if ( distance > d - eps ) { item = obj.first; @@ -1150,7 +1150,7 @@ inline void MbCubeTree::FindNearestObject( const Point & pnt, template inline void MbCubeTree::FindNearestObject( const Point & pnt, double & distance, size_t & index, double eps ) const { - if ( (lowerBranch != c3d_null) || (upperBranch != c3d_null) || (midstBranch != c3d_null) ) { + if ( (lowerBranch != NULL) || (upperBranch != NULL) || (midstBranch != NULL) ) { double w = -MB_MAXDOUBLE; switch ( direction ) { @@ -1165,20 +1165,20 @@ inline void MbCubeTree::FindNearestObject( const Point & pnt, if ( (w < (minimum-distance)) || ((maximum+distance) < w) ) return; // вне области / out of region - if ( (w < (midst+distance)) && (lowerBranch != c3d_null) ) { + if ( (w < (midst+distance)) && (lowerBranch != NULL) ) { lowerBranch->FindNearestObject( pnt, distance, index ); } - if ( ((midst-distance) < w) && (upperBranch != c3d_null) ) { + if ( ((midst-distance) < w) && (upperBranch != NULL) ) { upperBranch->FindNearestObject( pnt, distance, index ); } - if ( ((lower-distance) < w) && (w < (upper+distance)) && (midstBranch != c3d_null) ) { + if ( ((lower-distance) < w) && (w < (upper+distance)) && (midstBranch != NULL) ) { midstBranch->FindNearestObject( pnt, distance, index ); } } else { // содержимое конечной ветви / final branch content for ( size_t i = 0, iCount = leafObjects.size(); i < iCount; ++i ) { const ItemIndex & obj = leafObjects[i]; - if ( obj.first != c3d_null ) { + if ( obj.first != NULL ) { double d = GetDistance( *obj.first, pnt, false ); if ( distance > d - eps ) { index = obj.second; @@ -1198,7 +1198,7 @@ inline void MbCubeTree::GetNearestObjects( const Point & pnt, std::vector & itemDistances, double eps ) const { - if ( (lowerBranch != c3d_null) || (upperBranch != c3d_null) || (midstBranch != c3d_null) ) { + if ( (lowerBranch != NULL) || (upperBranch != NULL) || (midstBranch != NULL) ) { double w = -MB_MAXDOUBLE; switch ( direction ) { @@ -1213,13 +1213,13 @@ inline void MbCubeTree::GetNearestObjects( const Point & pnt, if ( (w < (minimum-distance)) || ((maximum+distance) < w) ) return; // вне области / out of region - if ( (w < (midst+distance)) && (lowerBranch != c3d_null) ) { + if ( (w < (midst+distance)) && (lowerBranch != NULL) ) { lowerBranch->GetNearestObjects( pnt, distance, itemDistances ); } - if ( ((midst-distance) < w) && (upperBranch != c3d_null) ) { + if ( ((midst-distance) < w) && (upperBranch != NULL) ) { upperBranch->GetNearestObjects( pnt, distance, itemDistances ); } - if ( ((lower-distance) < w) && (w < (upper+distance)) && (midstBranch != c3d_null) ) { + if ( ((lower-distance) < w) && (w < (upper+distance)) && (midstBranch != NULL) ) { midstBranch->GetNearestObjects( pnt, distance, itemDistances ); } } @@ -1228,7 +1228,7 @@ inline void MbCubeTree::GetNearestObjects( const Point & pnt, itemDistances.reserve( itemDistances.size() + iCount ); for ( size_t i = 0; i < iCount; ++i ) { const ItemIndex & obj = leafObjects[i]; - if ( obj.first != c3d_null ) { + if ( obj.first != NULL ) { double d = GetDistance( *obj.first, pnt, true ); if ( distance > d - eps ) { ItemDistance itemDistance( obj.first, d ); @@ -1248,7 +1248,7 @@ inline void MbCubeTree::GetNearestObjects( const Point & pnt, std::vector & itemDistances, double eps ) const { - if ( (lowerBranch != c3d_null) || (upperBranch != c3d_null) || (midstBranch != c3d_null) ) { + if ( (lowerBranch != NULL) || (upperBranch != NULL) || (midstBranch != NULL) ) { double w = -MB_MAXDOUBLE; switch ( direction ) { @@ -1263,13 +1263,13 @@ inline void MbCubeTree::GetNearestObjects( const Point & pnt, if ( (w < (minimum-distance)) || ((maximum+distance) < w) ) return; // вне области / out of region - if ( (w < (midst+distance)) && (lowerBranch != c3d_null) ) { + if ( (w < (midst+distance)) && (lowerBranch != NULL) ) { lowerBranch->GetNearestObjects( pnt, distance, itemDistances ); } - if ( ((midst-distance) < w) && (upperBranch != c3d_null) ) { + if ( ((midst-distance) < w) && (upperBranch != NULL) ) { upperBranch->GetNearestObjects( pnt, distance, itemDistances ); } - if ( ((lower-distance) < w) && (w < (upper+distance)) && (midstBranch != c3d_null) ) { + if ( ((lower-distance) < w) && (w < (upper+distance)) && (midstBranch != NULL) ) { midstBranch->GetNearestObjects( pnt, distance, itemDistances ); } } @@ -1278,7 +1278,7 @@ inline void MbCubeTree::GetNearestObjects( const Point & pnt, itemDistances.reserve( itemDistances.size() + iCount ); for ( size_t i = 0; i < iCount; ++i ) { const ItemIndex & obj = leafObjects[i]; - if ( obj.first != c3d_null ) { + if ( obj.first != NULL ) { double d = GetDistance( *obj.first, pnt, true ); if ( distance > d - eps ) { IndexDistance itemDistance( obj.second, d ); @@ -1298,7 +1298,7 @@ inline void MbCubeTree::GetNearestObjects( const Point & pnt, c3d::IndicesVector & itemDistances, double eps ) const { - if ( (lowerBranch != c3d_null) || (upperBranch != c3d_null) || (midstBranch != c3d_null) ) { + if ( (lowerBranch != NULL) || (upperBranch != NULL) || (midstBranch != NULL) ) { double w = -MB_MAXDOUBLE; switch ( direction ) { @@ -1313,13 +1313,13 @@ inline void MbCubeTree::GetNearestObjects( const Point & pnt, if ( (w < (minimum-distance)) || ((maximum+distance) < w) ) return; // вне области / out of region - if ( (w < (midst+distance)) && (lowerBranch != c3d_null) ) { + if ( (w < (midst+distance)) && (lowerBranch != NULL) ) { lowerBranch->GetNearestObjects( pnt, distance, itemDistances ); } - if ( ((midst-distance) < w) && (upperBranch != c3d_null) ) { + if ( ((midst-distance) < w) && (upperBranch != NULL) ) { upperBranch->GetNearestObjects( pnt, distance, itemDistances ); } - if ( ((lower-distance) < w) && (w < (upper+distance)) && (midstBranch != c3d_null) ) { + if ( ((lower-distance) < w) && (w < (upper+distance)) && (midstBranch != NULL) ) { midstBranch->GetNearestObjects( pnt, distance, itemDistances ); } } @@ -1328,7 +1328,7 @@ inline void MbCubeTree::GetNearestObjects( const Point & pnt, itemDistances.reserve( itemDistances.size() + iCount ); for ( size_t i = 0; i < iCount; ++i ) { const ItemIndex & obj = leafObjects[i]; - if ( obj.first != c3d_null ) { + if ( obj.first != NULL ) { double d = GetDistance( *obj.first, pnt, true ); if ( distance > d - eps ) { itemDistances.push_back( obj.second ); diff --git a/C3d/Include/mb_data.h b/C3d/Include/mb_data.h index 6356ad7..6627a43 100644 --- a/C3d/Include/mb_data.h +++ b/C3d/Include/mb_data.h @@ -545,12 +545,12 @@ public: size_t numberOfIterationsVCurve; ///< \ru Количество итераций построения V-кривой (заданное и фактическое). \en The number of iterations for building the V-curve (given and actual). double realAccuracyBSpl; ///< \ru Точность построения B-сплайна (заданная и фактическая). \en The accuracy of creating the B-spline (given and actual). double realAccuracyVCurve; ///< \ru Точность построения V-кривой (заданная и фактическая). \en The accuracy of creating the V-curve (given and actual). - /// \ru Параметры аппроксимации V-кривой. \en Params of Approximation of V-curve. - bool switchEndTangents; ///< \ru Флаги учета значений концевых касательных. \en Flags accounting tangents values. - bool switchEndCurvature; ///< \ru Флаги учета значений кривизны. \en Flags accounting curvature values. - MbVector3D firstTangent; ///< \ru Касательная в начальной точке. \en Tangent in the first point. - MbVector3D lastTangent; ///< \ru Касательная в конечной точке. \en Tangent in the last point. - double firstCurvature; ///< \ru Значение кривизны в начальной точке. \en Curvature in the first point. + /// \ru Параметры аппроксимации V-кривой. \en Params of Approximation of V-curve. + bool switchEndTangents; ///< \ru Флаги учета значений концевых касательных. \en Flags accounting tangents values. + bool switchEndCurvature; ///< \ru Флаги учета значений кривизны. \en Flags accounting curvature values. + MbVector3D firstTangent; ///< \ru Касательная в начальной точке. \en Tangent in the first point. + MbVector3D lastTangent; ///< \ru Касательная в конечной точке. \en Tangent in the last point. + double firstCurvature; ///< \ru Значение кривизны в начальной точке. \en Curvature in the first point. double lastCurvature; ///< \ru Значение кривизны в конечной точке. \en Curvature in the last point. @@ -571,7 +571,7 @@ public: clothoidLMax( 200.0 ), clothoidSegms( 10 ), numberOfIterationsBSpl( 500 ), numberOfIterationsVCurve( 192 ), #ifdef C3D_DEBUG_FAIR_CURVES - prt( c3d_null ), + prt( C3D_NULL_PTR ), #endif realAccuracyBSpl( METRIC_ACCURACY ), realAccuracyVCurve( METRIC_EPSILON ), switchEndTangents( false ), switchEndCurvature( false ), @@ -600,56 +600,19 @@ public: clothoidRMin = other.clothoidRMin; clothoidLMax = other.clothoidLMax; clothoidSegms = other.clothoidSegms; - numberOfIterationsBSpl = other.numberOfIterationsBSpl; - numberOfIterationsVCurve = other.numberOfIterationsVCurve; - realAccuracyBSpl = other.realAccuracyBSpl; - realAccuracyVCurve = other.realAccuracyVCurve; - switchEndTangents = other.switchEndTangents; - switchEndCurvature = other.switchEndCurvature; - firstTangent = other.firstTangent; - lastTangent = other.lastTangent; - firstCurvature = other.firstCurvature; + numberOfIterationsBSpl = other.numberOfIterationsBSpl; + numberOfIterationsVCurve = other.numberOfIterationsVCurve; + realAccuracyBSpl = other.realAccuracyBSpl; + realAccuracyVCurve = other.realAccuracyVCurve; + switchEndTangents = other.switchEndTangents; + switchEndCurvature = other.switchEndCurvature; + firstTangent = other.firstTangent; + lastTangent = other.lastTangent; + firstCurvature = other.firstCurvature; lastCurvature = other.lastCurvature; return *this; } }; // MbFairCurveData -//------------------------------------------------------------------------------ -/** \brief \ru Параметры для проверки, является ли кривая плоской. - \en Parameters for checking if the curve is planar. \~ - \details \ru Параметры для проверки, является ли кривая плоской. - \en Parameters for checking if the curve is planar. \~ -*/ -// --- -struct PlanarCheckParams { - double accuracy; - VERSION version; - - /// \ru Конструктор по умолчанию. \en Default constructor. - PlanarCheckParams() - : accuracy( METRIC_EPSILON ) - , version( Math::DefaultMathVersion() ) - {} - - /// \ru Конструктор. \en Constructor. - explicit PlanarCheckParams( double accuracy_ ) - : accuracy( accuracy_ ) - , version( Math::DefaultMathVersion() ) - {} - - /// \ru Конструктор. \en Constructor. - PlanarCheckParams( double accuracy_, VERSION version_ ) - : accuracy( accuracy_ ) - , version( version_ ) - {} - - /// \ru Конструктор копирования. \en Copy-constructor. - PlanarCheckParams( const PlanarCheckParams & other ) - : accuracy( other.accuracy ) - , version( other.version ) - {} -}; - - #endif // __MB_DATA_H diff --git a/C3d/Include/mb_dimension.h b/C3d/Include/mb_dimension.h index 70a5bd6..f48fa9c 100644 --- a/C3d/Include/mb_dimension.h +++ b/C3d/Include/mb_dimension.h @@ -83,12 +83,12 @@ public: \en \name Common functions of a geometric object. \{ */ virtual MbeSpaceType IsA() const; - virtual MbSpaceItem & Duplicate(MbRegDuplicate * = c3d_null) const; + virtual MbSpaceItem & Duplicate(MbRegDuplicate * = NULL) const; virtual bool IsSame(const MbSpaceItem & /*other*/, double /*accuracy*/ = LENGTH_EPSILON) const; virtual bool SetEqual(const MbSpaceItem &); - virtual void Transform(const MbMatrix3D &, MbRegTransform * = c3d_null); - virtual void Move(const MbVector3D &, MbRegTransform * = c3d_null); - virtual void Rotate(const MbAxis3D &, double, MbRegTransform * = c3d_null); + virtual void Transform(const MbMatrix3D &, MbRegTransform * = NULL); + virtual void Move(const MbVector3D &, MbRegTransform * = NULL); + virtual void Rotate(const MbAxis3D &, double, MbRegTransform * = NULL); virtual double DistanceToPoint(const MbCartPoint3D &) const; virtual void AddYourGabaritTo(MbCube &) const; virtual void CalculateMesh( const MbStepData & stepData, const MbFormNote & note, MbMesh & mesh ) const; // \ru Построить полигональную копию mesh. \en Build polygonal copy mesh. @@ -155,12 +155,12 @@ public: \en \name Common functions of a geometric object. \{ */ virtual MbeSpaceType IsA() const; - virtual MbSpaceItem & Duplicate(MbRegDuplicate * = c3d_null) const; + virtual MbSpaceItem & Duplicate(MbRegDuplicate * = NULL) const; virtual bool IsSame(const MbSpaceItem & /*other*/, double /*accuracy*/ = LENGTH_EPSILON) const; virtual bool SetEqual(const MbSpaceItem &); - virtual void Transform(const MbMatrix3D &, MbRegTransform * = c3d_null); - virtual void Move(const MbVector3D &, MbRegTransform * = c3d_null); - virtual void Rotate(const MbAxis3D &, double, MbRegTransform * = c3d_null); + virtual void Transform(const MbMatrix3D &, MbRegTransform * = NULL); + virtual void Move(const MbVector3D &, MbRegTransform * = NULL); + virtual void Rotate(const MbAxis3D &, double, MbRegTransform * = NULL); virtual double DistanceToPoint(const MbCartPoint3D &) const; virtual void AddYourGabaritTo(MbCube &) const; virtual void CalculateMesh( const MbStepData & stepData, const MbFormNote & note, MbMesh & mesh ) const; // \ru Построить полигональную копию mesh. \en Build polygonal copy mesh. @@ -231,12 +231,12 @@ public: \en \name Common functions of a geometric object. \{ */ virtual MbeSpaceType IsA() const; - virtual MbSpaceItem & Duplicate(MbRegDuplicate * = c3d_null) const; + virtual MbSpaceItem & Duplicate(MbRegDuplicate * = NULL) const; virtual bool IsSame(const MbSpaceItem & /*other*/, double /*accuracy*/ = LENGTH_EPSILON) const; virtual bool SetEqual(const MbSpaceItem &); - virtual void Transform(const MbMatrix3D &, MbRegTransform * = c3d_null); - virtual void Move(const MbVector3D &, MbRegTransform * = c3d_null); - virtual void Rotate(const MbAxis3D &, double, MbRegTransform * = c3d_null); + virtual void Transform(const MbMatrix3D &, MbRegTransform * = NULL); + virtual void Move(const MbVector3D &, MbRegTransform * = NULL); + virtual void Rotate(const MbAxis3D &, double, MbRegTransform * = NULL); virtual double DistanceToPoint(const MbCartPoint3D &) const; virtual void AddYourGabaritTo(MbCube &) const; virtual void CalculateMesh( const MbStepData & stepData, const MbFormNote & note, MbMesh & mesh ) const; // \ru Построить полигональную копию mesh. \en Build polygonal copy mesh. diff --git a/C3d/Include/mb_homogeneous.h b/C3d/Include/mb_homogeneous.h index 88a184d..a07fbc1 100644 --- a/C3d/Include/mb_homogeneous.h +++ b/C3d/Include/mb_homogeneous.h @@ -513,12 +513,12 @@ namespace c3d // namespace C3D */ // --- template< typename ParamContainer, typename PointContainer > -void SplitHomoVector( const SArray & hList, PointContainer & uvList, ParamContainer * tList = c3d_null ) +void SplitHomoVector( const SArray & hList, PointContainer & uvList, ParamContainer * tList = NULL ) { const size_t sz = hList.size(); uvList.clear(); uvList.reserve( sz ); - if ( tList != c3d_null ) { + if ( tList != NULL ) { tList->clear(); tList->reserve( sz ); for ( size_t n = 0; n < sz; n++ ) { diff --git a/C3d/Include/mb_matrix3d.h b/C3d/Include/mb_matrix3d.h index 21eb18c..56e4819 100644 --- a/C3d/Include/mb_matrix3d.h +++ b/C3d/Include/mb_matrix3d.h @@ -845,7 +845,7 @@ inline bool MbMatrix3D::IsSame( const MbMatrix3D & m2, double accuracy ) const /** \brief \ru Извлечь углы Эйлера из ротационной подматрицы R = Rx*Ry*Rz. \en Extract the Euler angles from the rotational submatrix R = Rx*Ry*Rz. \param[in] trans - \ru Матрица преобразования, содержащая подматрицу вращения. - \en The transformation matrix containing the rotational sub-matrix. \~ + \en The transformaton matrix containig the rotational submatrix. \~ \param[out] alpha - \ru Угол поворота вокруг оси "X", извлеченный из матрицы вращения. \en Angle of rotation around the "X" axis extracted from the rotation matrix. \~ \param[out] betta - \ru Угол поворота вокруг оси "Y", извлеченный из матрицы вращения. @@ -855,22 +855,22 @@ inline bool MbMatrix3D::IsSame( const MbMatrix3D & m2, double accuracy ) const \details \ru Функция разлагает подматрицу вращения на элементарные повороты вокруг осей R = Rx*Ry*Rz, заданные в виде угловых значений, а именно значения в радианах, определяющую присланную матрицу вращения R - в виде комбинации (произведения) из трех элементарных поворотов: R = Rx*Ry*Rz, где\n + в виде комбинации (произведения) из трех элементарных поворотов: R = Rx*Ry*Rz<\b>, где\n Rx = Rx(alpha) - поворот вокруг оси "X", \n Ry = Ry(betta) - поворот вокруг оси "Y", \n Rz = Rz(gamma) - поворот вокруг оси "Z" и \n - R - ротационная подматрица 3x3 из матрицы trans. - Матрица trans может содержать любые преобразования, включая масштабирование и сдвиг. + R - ротационная подматрица 3x3 из матрицы trans<\b>. + Матрица trans может содержать любые преобразования, вклячая масштабирование и сдвиг. Метод ExtractEulerAngles извлечет из данной матрицы вращающий компонент и разложит его на три вращения: Rx(alpha), Ry(betta), Rz(gamma). \en The function factorizes the rotation submatrix into elementary rotations about the axes: R = Rx * Ry * Rz, - given in the form of angular values, namely the values in radians, specifying the rotation sub-matrix R of the given trans - in the form of a combination (product) of three elementary rotations: R = Rx * Ry * Rz , where \n + given in the form of angular values, namely the values in radians, specifing the rotation submatrix R of the given trans<\b> + in the form of a combination (product) of three elementary rotations: R = Rx * Ry * Rz <\b>, where \n Rx = Rx(alpha) - rotation around X-axis, \n Ry = Ry(betta) - rotation around Y-axis, \n Rz = Rz(gamma) - rotation around Z-axis and \n - R is a rotational 3x3 sub-matrix from the matrix trans. + R is a rotational 3x3 submatrix from the matrix trans<\b>. The matrix trans can contain any transformations including the scaling and the shear. The ExtractEulerAngles method extracts from the given matrix a rotating component and decomposes it into three rotations: Rx( alpha ), Ry( betta ), Rz( gamma ). diff --git a/C3d/Include/mb_matrixnn.h b/C3d/Include/mb_matrixnn.h index 4f46f94..b88d6a3 100644 --- a/C3d/Include/mb_matrixnn.h +++ b/C3d/Include/mb_matrixnn.h @@ -29,12 +29,12 @@ private : protected: /// \ru Конструктор. \en Constructor. - MatrixNN() : parr( c3d_null ), n( 0 ) {} + MatrixNN() : parr( NULL ), n( 0 ) {} /// \ru Конструктор по заданной размерности. \en The constructor by a given dimension. - MatrixNN( size_t dim ) : parr( c3d_null ), n( 0 ) { SetSize( dim ); } + MatrixNN( size_t dim ) : parr( NULL ), n( 0 ) { SetSize( dim ); } public: /// \ru Конструктор ограниченной размерности. \en The constructor of restricted dimension. - MatrixNN ( const uint16 & dim ) : parr( c3d_null ), n( 0 ) { SetSize( dim ); } + MatrixNN ( const uint16 & dim ) : parr( NULL ), n( 0 ) { SetSize( dim ); } /// \ru Конструктор копирования. \en The copy constructor. explicit MatrixNN ( const MatrixNN & ); /// \ru Деструктор. \en Destructor. @@ -116,10 +116,10 @@ private: */ // --- template -MbeNewtonResult TypedGaussEquation ( MatrixNN & a, Type * b, double epsilon, ProgressBarWrapper * baseProgBar = c3d_null ) +MbeNewtonResult TypedGaussEquation ( MatrixNN & a, Type * b, double epsilon, ProgressBarWrapper * baseProgBar = NULL ) { - ProgressBarWrapper * progBar = c3d_null; - if ( baseProgBar != c3d_null ) { + ProgressBarWrapper * progBar = NULL; + if ( baseProgBar != NULL ) { StrData strData( pbarId_Solve_LinearEquationsSystem ); progBar = &baseProgBar->CreateChildAddRef( strData ); } @@ -249,8 +249,8 @@ MbeNewtonResult TypedGaussEquation ( MatrixNN & a, Type * b, double epsilon, Pro \en Main diagonal of a tridiagonal matrix is an array of doubles of size "n" \~ \param[in] b - \ru Верхняя диагональ, размерность n-1 \en Upper diagonal, dimension is n-1 \~ - \param[in] c - \ru c - нижняя диагональ, размерность n-1 - \en c - lower diagonal, dimension is n-1 \~ + \param[in] \ru С - нижняя диагональ, размерность n-1 + \en C- lower diagonal, dimension is n-1 \~ \param[in] r - \ru Вектор правой части, массив точек или векторов размерности n; должна быть определена операция умножения на double справа \en Vector of the right part is an array of points or vectors of dimension n; the multiplication operation by the double value on the right must be defined \~ \param[in] solution - \ru Массив решений (точек, векторов), размерности n diff --git a/C3d/Include/mb_nurbs_function.h b/C3d/Include/mb_nurbs_function.h index e626243..5651beb 100644 --- a/C3d/Include/mb_nurbs_function.h +++ b/C3d/Include/mb_nurbs_function.h @@ -343,8 +343,7 @@ double GetParamDistance( const Type & p1, const Type & p2, MbeSplineParamType sp \ingroup Base_Algorithms */ // --- -inline -bool IsValidNurbsParams( size_t degree, bool closed, size_t pcnt ) +inline bool IsValidNurbsParams( size_t degree, bool closed, size_t pcnt ) { // \ru 1. Порядок B-сплайна должен быть не менее 2. \en 1. The order of B-spline must be at least 2. // \ru 2а. Для незамкнутой кривой количество точек не меньше порядка сплайна. \en 2a. The number of open curve points isn't less than the order of spline. @@ -371,8 +370,7 @@ bool IsValidNurbsParams( size_t degree, bool closed, size_t pcnt ) \ingroup Base_Algorithms */ // --- -inline -bool IsValidNurbsParams( size_t degree, bool closed, size_t pcnt, size_t wcnt ) +inline bool IsValidNurbsParams( size_t degree, bool closed, size_t pcnt, size_t wcnt ) { // \ru 1. Порядок B-сплайна должен быть не менее 2. \en 1. The order of B-spline must be at least 2. // \ru 2а. Для незамкнутой кривой количество точек не меньше порядка сплайна. \en 2a. The number of open curve points isn't less than the order of spline. @@ -403,8 +401,7 @@ bool IsValidNurbsParams( size_t degree, bool closed, size_t pcnt, size_t wcnt ) \ingroup Base_Algorithms */ // --- -inline -bool IsValidNurbsParams( size_t degree, bool closed, size_t pcnt, size_t wcnt, size_t kcnt ) +inline bool IsValidNurbsParams( size_t degree, bool closed, size_t pcnt, size_t wcnt, size_t kcnt ) { // \ru 1. Порядок B-сплайна должен быть не менее 2. \en 1. The order of B-spline must be at least 2. // \ru 2а. Для незамкнутой кривой количество точек не меньше порядка сплайна. \en 2a. The number of open curve points isn't less than the order of spline. @@ -449,7 +446,7 @@ bool IsValidNurbsParamsExt( size_t degree, bool closed, size_t pcnt, ( knots.size() == (degree + pcnt + (closed ? (degree - 1) : 0)) ); if ( res ) { - if ( !c3d::IsMonotonic( knots, true, true ) ) + if ( !c3d::IsMonotonic(knots, true, true) ) res = false; // SD#7118498 } @@ -479,7 +476,7 @@ bool IsValidNurbsParamsExt( size_t degree, bool closed, size_t pcnt, template bool IsValidNurbsParamsExt( size_t degree, bool closed, const PointVector & pnts, const DoubleVector * wts, - const DoubleVector * knots = c3d_null ) + const DoubleVector * knots = NULL ) { // \ru 1. Порядок B-сплайна должен быть не менее 2. \en 1. The order of B-spline must be at least 2. // \ru 2а. Для незамкнутой кривой количество точек не меньше порядка сплайна. \en 2a. The number of open curve points isn't less than the order of spline. @@ -490,11 +487,11 @@ bool IsValidNurbsParamsExt( size_t degree, bool closed, const PointVector & pnts size_t pcnt = pnts.size(); bool res = ::IsValidNurbsParams( degree, closed, pcnt ) && - ( (wts == c3d_null) || (wts->size() == pcnt) ) && - ( (knots == c3d_null) || (knots->size() == (degree + pcnt + (closed ? (degree - 1) : 0))) ); + ( (wts == NULL) || (wts->size() == pcnt) ) && + ( (knots == NULL) || (knots->size() == (degree + pcnt + (closed ? (degree - 1) : 0))) ); - if ( res && (knots != c3d_null) ) { - if ( !c3d::IsMonotonic( *knots, true, true ) ) + if ( res && (knots != NULL) ) { + if ( !c3d::IsMonotonic(*knots, true, true) ) res = false; // SD#7118498 } @@ -526,11 +523,10 @@ bool IsValidNurbsKnots( const KnotsVector & knots, double eps = EXTENT_EPSILON ) return false; eps = ::fabs(eps); - if ( ::fabs( knots.back() - knots.front() ) < eps ) + if ( ::fabs(knots[cnt-1] - knots[0]) < eps ) return false; - size_t maxInd = cnt - 1; - for ( size_t i = 0; i < maxInd; ++i ) { + for ( size_t i = 0; i < (cnt - 1); i++ ) { if ( knots[i+1] < knots[i] - eps ) return false; } @@ -840,14 +836,14 @@ template void CurveDeriveCpts( ptrdiff_t p, const KnotsVector & U, const Point * P, const double * W, size_t pointCount, const NurbsVector * PW, ptrdiff_t d, ptrdiff_t r1, ptrdiff_t r2, NurbsVector * PK ) { - C3D_ASSERT( (P != c3d_null && W != c3d_null) != (PW != c3d_null) ); + C3D_ASSERT( (P != NULL && W != NULL) != (PW != NULL) ); ptrdiff_t r = ( r2 - r1 ); ptrdiff_t degree = ( p + 1 ); ptrdiff_t i, k, icount; NurbsVector & PK0 = PK[0]; - if ( PW != c3d_null ) { + if ( PW != NULL ) { for ( i = 0; i <= r; i++ ) PK0.Set( i, *PW, (r1 + i) ); } @@ -890,14 +886,14 @@ template void CurveDeriveCpts( ptrdiff_t p, const KnotsVector & U, const Point * P, const double w, size_t pointCount, const NurbsVector * PW, ptrdiff_t d, ptrdiff_t r1, ptrdiff_t r2, NurbsVector * PK ) { - C3D_ASSERT( (P != c3d_null) != (PW != c3d_null) ); + C3D_ASSERT( (P != NULL) != (PW != NULL) ); ptrdiff_t r = ( r2 - r1 ); ptrdiff_t degree = ( p + 1 ); ptrdiff_t i, k, icount; NurbsVector & PK0 = PK[0]; - if ( PW != c3d_null ) { + if ( PW != NULL ) { for ( i = 0; i <= r; i++ ) PK0.Set( i, *PW, (r1 + i) ); } @@ -940,16 +936,16 @@ template void CurveDeriveCpts( ptrdiff_t p, const KnotsVector & U, const Point * P, const double * W, size_t pointCount, const NurbsVector * PW, ptrdiff_t d, ptrdiff_t r1, ptrdiff_t r2, DoubleTriple ** DT, double ** WT ) { - C3D_ASSERT( ( P != c3d_null && W != c3d_null ) != ( PW != c3d_null ) ); + C3D_ASSERT( ( P != NULL && W != NULL ) != ( PW != NULL ) ); ptrdiff_t r = ( r2 - r1 ); ptrdiff_t degree = ( p + 1 ); ptrdiff_t i, k, icount; DoubleTriple * DT0 = DT[0]; double * WT0 = WT[0]; - bool useWeight = WT0 != c3d_null; + bool useWeight = WT0 != NULL; - if ( PW != c3d_null ) { + if ( PW != NULL ) { if ( !useWeight ) { for ( i = 0; i <= r; i++ ) DT0[i].Init( (*PW)[r1 + i] ); @@ -977,8 +973,8 @@ void CurveDeriveCpts( ptrdiff_t p, const KnotsVector & U, const Point * P, const } } - double * WTMin = c3d_null; - double * WTPls = c3d_null; + double * WTMin = NULL; + double * WTPls = NULL; for ( k = 1; k <= d; k++ ) { DoubleTriple * DTMin = DT[k - 1]; DoubleTriple * DTPls = DT[k]; @@ -1012,16 +1008,16 @@ template void CurveDeriveCpts( ptrdiff_t p, const KnotsVector & U, const Point * P, const double w, size_t pointCount, const NurbsVector * PW, ptrdiff_t d, ptrdiff_t r1, ptrdiff_t r2, DoubleTriple ** DT, double ** WT ) { - C3D_ASSERT( ( P != c3d_null ) != ( PW != c3d_null ) ); + C3D_ASSERT( ( P != NULL ) != ( PW != NULL ) ); ptrdiff_t r = ( r2 - r1 ); ptrdiff_t degree = ( p + 1 ); ptrdiff_t i, k, icount; DoubleTriple * DT0 = DT[0]; double * WT0 = WT[0]; - bool useWeight = WT0 != c3d_null; + bool useWeight = WT0 != NULL; - if ( PW != c3d_null ) { + if ( PW != NULL ) { if ( !useWeight ) { for ( i = 0; i <= r; i++ ) DT0[i].Init( (*PW)[r1 + i] ); @@ -1050,8 +1046,8 @@ void CurveDeriveCpts( ptrdiff_t p, const KnotsVector & U, const Point * P, const } } - double * WTMin = c3d_null; - double * WTPls = c3d_null; + double * WTMin = NULL; + double * WTPls = NULL; for ( k = 1; k <= d; k++ ) { DoubleTriple * DTMin = DT[k - 1]; DoubleTriple * DTPls = DT[k]; @@ -1091,7 +1087,7 @@ void CurveDeriveCpts( ptrdiff_t p, const double * U, const Point * P, const doub for ( i = 0; i <= r; i++ ) { k = ( (r1 + i) % pointCount ); - if ( W != c3d_null ) + if ( W != NULL ) H0[i].Init( P[k], W[k] ); else H0[i].Init( P[k], 1.0 ); @@ -1262,7 +1258,7 @@ MbeNewtonResult CalculatePointList( const DoubleVector & params, const PointVect DPtr matrixPtr( MatrixNN::Create(pointsCount) ); // \ru Матрица системы уравнений для прохождения NURBS при params[i] через points[i] \en Matrix of equation system for constructing the NURBS-curve passing through the points[i] with params[i] - if ( matrixPtr != c3d_null && ::IsValidNurbsParamsExt(degree, closed, pointList.size(), knots) ) { + if ( matrixPtr != NULL && ::IsValidNurbsParamsExt(degree, closed, pointList.size(), knots) ) { MatrixNN & matrix = *matrixPtr; std::vector bSplines; // \ru Ненулевые B-сплайны \en Non-zero B-splines @@ -1270,15 +1266,17 @@ MbeNewtonResult CalculatePointList( const DoubleVector & params, const PointVect std::vector lrVect; - for ( size_t i = 0; i < pointsCount; ++i ) { // \ru Заполняем строки матрицы \en Fills matrix rows + for ( size_t i = 0; i < pointsCount; i++ ) { // \ru Заполняем строки матрицы \en Fills matrix rows double t = params[i]; ptrdiff_t k = 0; ptrdiff_t ind = ::CalculateSplines( degree, knots, closed, t, bSplines, lrVect ); // \ru Заполняем i-ю строку \en Fill the i-th row - for ( k = 0; k < (ptrdiff_t)pointsCount; ++k ) + for ( k = 0; k < ind; k++ ) + matrix( i, k ) = 0.0; + for ( k = ind; k < ind + (ptrdiff_t)degree; k++ ) + matrix( i, k%pointsCount ) = bSplines[k - ind]; // \ru Ненулевые элементы строки. \en Non-zero elements of row + for ( k = ind + degree; k < (ptrdiff_t)pointsCount; k++ ) matrix( i, k ) = 0.0; - for ( k = ind; k < ind + (ptrdiff_t)degree; ++k ) - matrix( i, k % pointsCount ) += bSplines[k - ind]; // \ru Ненулевые элементы строки. \en Non-zero elements of row } double epsilon = PARAM_EPSILON; @@ -1295,9 +1293,9 @@ MbeNewtonResult CalculatePointList( const DoubleVector & params, const PointVect //------------------------------------------------------------------------------ // \ru Вычисление характеристических точек pointList для прохождения NURBS-кривой через points[i] при params[i] \en Calculation of characteristic points "pointList" of NURBS-curve passing through points[i] with params[i] // --- -template -MATH_FUNC (MbeNewtonResult) CalculatePointListWithBandMatrix( const ParamsVector & params, const PointsVector & points, - size_t degree, bool closed, const ParamsVector & knots, +template +MATH_FUNC (MbeNewtonResult) CalculatePointListWithBandMatrix( const DoubleVector & params, const PointsVector & points, + size_t degree, bool closed, const DoubleVector & knots, PointsVector & pointList ); @@ -1620,9 +1618,9 @@ bool AttachNurbsG2( TypedNurbs & nurbs, // \ru Модифицируемый сп // \ru Сохраняем вычисленные производные \en Save the calculated derivatives if ( res ) { - if ( wDiff1 != c3d_null ) + if ( wDiff1 != NULL ) *wDiff1 = weightDiff1; - if ( wDiff2 != c3d_null && res ) + if ( wDiff2 != NULL && res ) *wDiff2 = weightDiff2; } @@ -2243,7 +2241,7 @@ size_t DefineApproxPointsOpen( const Curve & curve, size_t pCount, double pmin, \en Construction of closed spline. \~ \details \ru Построение замкнутого сплайна, аппроксимирующего набор точек, с помощью метода наименьших квадратов. \n \en Construction of closed spline which approximates a set of points by the method of least squares. \n \~ - \param[in,out] nurbs - \ru Модифицируемый сплайн. + \param[in/out] nurbs - \ru Модифицируемый сплайн. \en Modifiable spline. \~ \param[in] aDegree - \ru Порядок сплайна. \en The spline order. \~ @@ -2266,7 +2264,7 @@ MATH_FUNC (bool) CreateNurbsLSMClosed( SPtr & nurbs, // \ru Мод const ptrdiff_t pCount, const PointsVector & aPoints, const DoubleVector & aKnots, - const DoubleVector * aParams = c3d_null ); + const DoubleVector * aParams = NULL ); //------------------------------------------------------------------------------ @@ -2274,7 +2272,7 @@ MATH_FUNC (bool) CreateNurbsLSMClosed( SPtr & nurbs, // \ru Мод \en Construction of non-closed spline. \~ \details \ru Построение незамкнутого сплайна, аппроксимирующего набор точек, с помощью метода наименьших квадратов. \n \en Construction of non-closed spline which approximates a set of points by the method of least squares. \n \~ - \param[in,out] nurbs - \ru Модифицируемый сплайн. + \param[in/out] nurbs - \ru Модифицируемый сплайн. \en Modifiable spline. \~ \param[in] aDegree - \ru Порядок сплайна. \en The spline order. \~ @@ -2297,7 +2295,7 @@ MATH_FUNC (bool) CreateNurbsLSM( SPtr & nurbs, // \ru Модифи const ptrdiff_t pCount, const PointsVector & aPoints, const DoubleVector & aKnots, - const DoubleVector * aParams = c3d_null ); + const DoubleVector * aParams = NULL ); //------------------------------------------------------------------------------- @@ -2307,7 +2305,7 @@ template Nurbs * CreateLineOutRgn( const Curve & curve, double tn1, double tn2, double t1, double t2, const MbCurveIntoNurbsInfo & nci ) { - Nurbs * nurbs = c3d_null; + Nurbs * nurbs = NULL; if ( !curve.IsClosed() && nci.ExtendRange() && ((tn2 - tn1) > Math::paramEpsilon) ) { SArray points ( 2, 1 ); diff --git a/C3d/Include/mb_placement3d.h b/C3d/Include/mb_placement3d.h index 09e6b04..83c40d0 100644 --- a/C3d/Include/mb_placement3d.h +++ b/C3d/Include/mb_placement3d.h @@ -133,7 +133,7 @@ private: mutable uint8 flag; public: - /// \ru Константа глобальной системы координат. \en A constant of the global coordinate system. + ///< \ru Константа глобальной системы координат. \en A constant of the global coordinate system. static const MbPlacement3D global; public: /** \ru \name Конструкторы. @@ -392,7 +392,7 @@ public: /** \} /// \ru Пересчитать СК по измененным внутренним данным. \en Recalculate the coordinate system for changed internal data. void Reset (); /// \ru Инвертировать. \en Invert. - void Invert( MbMatrix * = c3d_null ); + void Invert( MbMatrix * = NULL ); /// \ru Найти ближайшую точку пересечения с линией. \en Find the nearest point of intersection with line. bool LineIntersectionPoint( const MbCartPoint3D & pc, const MbVector3D & axis, MbCartPoint3D & p, double & d, double eps = ANGLE_EPSILON ) const; diff --git a/C3d/Include/mb_point_mating.h b/C3d/Include/mb_point_mating.h index bb7ca09..a4af357 100644 --- a/C3d/Include/mb_point_mating.h +++ b/C3d/Include/mb_point_mating.h @@ -101,10 +101,10 @@ private: // \ru не реализовано \en not implemented //--- template MbPntMatingData::MbPntMatingData() - : tangent ( c3d_null ) - , tangentDer1 ( c3d_null ) - , tangentDer2 ( c3d_null ) - , changedPnts ( c3d_null ) + : tangent ( C3D_NULL_PTR ) + , tangentDer1 ( C3D_NULL_PTR ) + , tangentDer2 ( C3D_NULL_PTR ) + , changedPnts ( C3D_NULL_PTR ) , type ( trt_Position ) , movePnts ( false ) , attach ( false ) @@ -124,9 +124,9 @@ MbPntMatingData::MbPntMatingData( const MbeMatingType nType, bool nMovePnts, bool nAttach ) : type ( nType ) - , tangent ( (nTang != c3d_null) ? new Vector( *nTang ) : c3d_null ) - , tangentDer1 ( (nTangDer1 != c3d_null) ? new Vector( *nTangDer1 ) : c3d_null ) - , tangentDer2 ( (nTangDer2 != c3d_null) ? new Vector( *nTangDer2 ) : c3d_null ) + , tangent ( (nTang != C3D_NULL_PTR) ? new Vector( *nTang ) : C3D_NULL_PTR ) + , tangentDer1 ( (nTangDer1 != C3D_NULL_PTR) ? new Vector( *nTangDer1 ) : C3D_NULL_PTR ) + , tangentDer2 ( (nTangDer2 != C3D_NULL_PTR) ? new Vector( *nTangDer2 ) : C3D_NULL_PTR ) , movePnts ( nMovePnts ) , changedPnts ( nChangedPnts ) , attach ( nAttach ) @@ -145,9 +145,9 @@ MbPntMatingData::MbPntMatingData( const MbeMatingType nType, template MbPntMatingData::MbPntMatingData( const MbPntMatingData & d ) : type ( d.type ) - , tangent ( (d.tangent != c3d_null) ? new Vector( *d.tangent ) : c3d_null ) - , tangentDer1 ( (d.tangentDer1 != c3d_null) ? new Vector( *d.tangentDer1 ) : c3d_null ) - , tangentDer2 ( (d.tangentDer2 != c3d_null) ? new Vector( *d.tangentDer2 ) : c3d_null ) + , tangent ( (d.tangent != C3D_NULL_PTR) ? new Vector( *d.tangent ) : C3D_NULL_PTR ) + , tangentDer1 ( (d.tangentDer1 != C3D_NULL_PTR) ? new Vector( *d.tangentDer1 ) : C3D_NULL_PTR ) + , tangentDer2 ( (d.tangentDer2 != C3D_NULL_PTR) ? new Vector( *d.tangentDer2 ) : C3D_NULL_PTR ) , movePnts ( d.movePnts ) , changedPnts ( d.changedPnts ) , attach ( d.attach ) @@ -181,25 +181,25 @@ void MbPntMatingData::Init( const MbeMatingType nType, { type = nType; - if ( tangent != c3d_null && nTang != c3d_null ) // \ru касательный вектор \en tangent vector + if ( tangent != C3D_NULL_PTR && nTang != C3D_NULL_PTR ) // \ru касательный вектор \en tangent vector tangent->Init( *nTang ); - else if ( nTang != c3d_null ) + else if ( nTang != C3D_NULL_PTR ) tangent = new Vector( *nTang ); - else if ( tangent != c3d_null ) + else if ( tangent != C3D_NULL_PTR ) ::DeleteMatItem( tangent ); - if ( tangentDer1 != c3d_null && nTangDer1 != c3d_null ) // \ru первая производная касательного вектора \en first derivative of tangent vector + if ( tangentDer1 != C3D_NULL_PTR && nTangDer1 != C3D_NULL_PTR ) // \ru первая производная касательного вектора \en first derivative of tangent vector tangentDer1->Init( *nTangDer1 ); - else if ( nTangDer1 != c3d_null ) + else if ( nTangDer1 != C3D_NULL_PTR ) tangentDer1 = new Vector( *nTangDer1 ); - else if ( tangentDer1 != c3d_null ) + else if ( tangentDer1 != C3D_NULL_PTR ) ::DeleteMatItem( tangentDer1 ); - if ( tangentDer2 != c3d_null && nTangDer2 != c3d_null ) // \ru вторая производная касательного вектора \en second derivative of tangent vector + if ( tangentDer2 != C3D_NULL_PTR && nTangDer2 != C3D_NULL_PTR ) // \ru вторая производная касательного вектора \en second derivative of tangent vector tangentDer2->Init( *nTangDer2 ); - else if ( nTangDer2 != c3d_null ) + else if ( nTangDer2 != C3D_NULL_PTR ) tangentDer2 = new Vector( *nTangDer2 ); - else if ( tangentDer2 != c3d_null ) + else if ( tangentDer2 != C3D_NULL_PTR ) ::DeleteMatItem( tangentDer2 ); if ( type <= trt_Position ) { // BUG_52162 @@ -208,7 +208,7 @@ void MbPntMatingData::Init( const MbeMatingType nType, ::DeleteMatItem( tangentDer2 ); } - if ( changedPnts != c3d_null ) + if ( changedPnts != C3D_NULL_PTR ) changedPnts->clear(); movePnts = nMovePnts; @@ -223,10 +223,10 @@ void MbPntMatingData::Init( const MbeMatingType nType, template bool MbPntMatingData::Init( const MbPntMatingData & d ) { - C3D_ASSERT( changedPnts == c3d_null ); + C3D_ASSERT( changedPnts == C3D_NULL_PTR ); if ( this != &d ) { - SArray * dummyInds = c3d_null; + SArray * dummyInds = C3D_NULL_PTR; Init( d.type, d.tangent, d.tangentDer1, d.tangentDer2, dummyInds, d.movePnts, d.attach ); return true; } @@ -265,9 +265,9 @@ bool MbPntMatingData::IsValid() const if ( type >= trt_Position ) { double lenEps = LENGTH_EPSILON; - bool isTang = (tangent != c3d_null); - bool isTangDer1 = (tangentDer1 != c3d_null); - bool isTangDer2 = (tangentDer2 != c3d_null); + bool isTang = (tangent != C3D_NULL_PTR); + bool isTangDer1 = (tangentDer1 != C3D_NULL_PTR); + bool isTangDer2 = (tangentDer2 != C3D_NULL_PTR); bool isTangLen = (isTang && tangent->Length() > lenEps); switch( type ) { @@ -308,8 +308,8 @@ size_t MbPntMatingData::GetSmoothDegree() const res = 1; break; case trt_Normal : - if ( tangentDer1 != c3d_null ) res = 2; - else if ( tangent != c3d_null ) res = 1; + if ( tangentDer1 != C3D_NULL_PTR ) res = 2; + else if ( tangent != C3D_NULL_PTR ) res = 1; break; case trt_SmoothG2: res = 2; @@ -331,18 +331,18 @@ void MbPntMatingData::SetVector( ptrdiff_t i, const Vector & vect ) { switch ( i ) { case 0 : { - if ( tangent != c3d_null ) tangent->Init( vect ); - else tangent = new Vector( vect ); + if ( tangent != C3D_NULL_PTR ) tangent->Init( vect ); + else tangent = new Vector( vect ); break; } case 1 : { - if ( tangentDer1 != c3d_null ) tangentDer1->Init( vect ); - else tangentDer1 = new Vector( vect ); + if ( tangentDer1 != C3D_NULL_PTR ) tangentDer1->Init( vect ); + else tangentDer1 = new Vector( vect ); break; } case 2 : { - if ( tangentDer2 != c3d_null ) tangentDer2->Init( vect ); - else tangentDer2 = new Vector( vect ); + if ( tangentDer2 != C3D_NULL_PTR ) tangentDer2->Init( vect ); + else tangentDer2 = new Vector( vect ); break; } } @@ -355,7 +355,7 @@ void MbPntMatingData::SetVector( ptrdiff_t i, const Vector & vect ) template void MbPntMatingData::NormalizeAttachTangent() { - if ( attach && tangent != c3d_null ) { + if ( attach && tangent != C3D_NULL_PTR ) { double tangLen = tangent->Length(); if ( tangLen > LENGTH_EPSILON ) (*tangent) /= tangLen; @@ -386,11 +386,11 @@ void MbPntMatingData::GetProperties( MbProperties & properties ) properties.Add( new StringProperty( IDS_PROP_0901, typeName, false ) ); */ - if ( tangent != c3d_null ) + if ( tangent != C3D_NULL_PTR ) properties.Add( new MathItemProperty( IDS_PROP_0908, tangent, true ) ); - if ( tangentDer1 != c3d_null ) + if ( tangentDer1 != C3D_NULL_PTR ) properties.Add( new MathItemProperty( IDS_PROP_0909, tangentDer1, true ) ); - if ( tangentDer2 != c3d_null ) + if ( tangentDer2 != C3D_NULL_PTR ) properties.Add( new MathItemProperty( IDS_PROP_0910, tangentDer2, true ) ); properties.Add( new BoolProperty( IDS_PROP_0911, movePnts, false ) ); @@ -415,7 +415,7 @@ bool IsMatingDefined( const MbPntMatingData * data ) { bool isDefined = false; - if ( data != c3d_null && data->IsValid() ) { + if ( data != C3D_NULL_PTR && data->IsValid() ) { if ( data->GetType() > trt_Position ) // \ru по позиции и так выполнится, поэтому считаем не заданным \en would be held at position, so assumed as undefined isDefined = true; } @@ -456,8 +456,8 @@ bool CopyMating( const RPArray< MbPntMatingData > & src, RPArray< MbPntM if ( src.size() > 0 && dst.size() < 1 ) { isDone = true; for ( size_t k = 0, cnt = src.size(); k < cnt && isDone; k++ ) { - MbPntMatingData * copyItem = c3d_null; - if ( src[k] != c3d_null ) { + MbPntMatingData * copyItem = C3D_NULL_PTR; + if ( src[k] != C3D_NULL_PTR ) { copyItem = new MbPntMatingData(); isDone = copyItem->Init( *src[k] ); } @@ -502,18 +502,18 @@ void TransformMating( const RPArray< MbPntMatingData > & data, const Mat for ( size_t k = 0, kcnt = data.size(); k < kcnt; ++k ) { MbPntMatingData * dataItem = data[k]; - if ( dataItem != c3d_null ) { - if ( dataItem->GetTangent() != c3d_null ) { + if ( dataItem != C3D_NULL_PTR ) { + if ( dataItem->GetTangent() != C3D_NULL_PTR ) { vect = *dataItem->GetTangent(); vect.Transform( matr ); dataItem->SetVector( 0, vect ); } - if ( dataItem->GetTangentDer1() != c3d_null ) { + if ( dataItem->GetTangentDer1() != C3D_NULL_PTR ) { vect = *dataItem->GetTangentDer1(); vect.Transform( matr ); dataItem->SetVector( 1, vect ); } - if ( dataItem->GetTangentDer2() != c3d_null ) { + if ( dataItem->GetTangentDer2() != C3D_NULL_PTR ) { vect = *dataItem->GetTangentDer2(); vect.Transform( matr ); dataItem->SetVector( 2, vect ); @@ -533,17 +533,17 @@ void RotateMating( const RPArray< MbPntMatingData > & data, const Axis & for ( size_t i = 0; i < data.size(); ++i ) { MbPntMatingData * dataItem = data[i]; - if ( dataItem->GetTangent() != c3d_null ) { + if ( dataItem->GetTangent() != C3D_NULL_PTR ) { vect = *dataItem->GetTangent(); vect.Rotate( axis, angle ); dataItem->SetVector( 0, vect ); } - if ( dataItem->GetTangentDer1() != c3d_null ) { + if ( dataItem->GetTangentDer1() != C3D_NULL_PTR ) { vect = *dataItem->GetTangentDer1(); vect.Rotate( axis, angle ); dataItem->SetVector( 1, vect ); } - if ( dataItem->GetTangentDer2() != c3d_null ) { + if ( dataItem->GetTangentDer2() != C3D_NULL_PTR ) { vect = *dataItem->GetTangentDer2(); vect.Rotate( axis, angle ); dataItem->SetVector( 2, vect ); @@ -564,10 +564,10 @@ void WriteMating( writer & out, const RPArray< MbPntMatingData > & data for ( size_t k = 0; k < cnt && out.good(); k++ ) { const MbPntMatingData * item = data[k]; // \ru наличие сопряжения \en presence of conjugation - bool isItem = (item != c3d_null); + bool isItem = (item != NULL); out << isItem; - if ( isItem && item->GetChangedPoints() != c3d_null ) { + if ( isItem && item->GetChangedPoints() != C3D_NULL_PTR ) { C3D_ASSERT_UNCONDITIONAL( false ); // \ru KYA массив индексов должен быть пуст, т.к. он общий для всех сопряжений, им владеет заказчик операции \en KYA array of indices should be empy because it is shared between all of conjugations and owned by user of operation out.setState( io::cantWriteObject ); } @@ -577,17 +577,17 @@ void WriteMating( writer & out, const RPArray< MbPntMatingData > & data uint32 type = (uint32)item->GetType(); out << type; // \ru касательный вектор \en tangent vector - isItem = (item->GetTangent() != c3d_null); + isItem = (item->GetTangent() != C3D_NULL_PTR); out << isItem; if ( isItem ) out << (*item->GetTangent()); // \ru первая производная касательного вектора \en first derivative of tangent vector - isItem = (item->GetTangentDer1() != c3d_null); + isItem = (item->GetTangentDer1() != C3D_NULL_PTR); out << isItem; if ( isItem ) out << (*item->GetTangentDer1()); // \ru вторая производная касательного вектора \en second derivative of tangent vector - isItem = (item->GetTangentDer2() != c3d_null); + isItem = (item->GetTangentDer2() != C3D_NULL_PTR); out << isItem; if ( isItem ) out << (*item->GetTangentDer2()); @@ -612,7 +612,7 @@ void ReadMating( reader & in, RPArray< MbPntMatingData > & data ) if ( cnt > 0 ) { data.Reserve( cnt ); - SArray * dummyInds = c3d_null; + SArray * dummyInds = C3D_NULL_PTR; for ( size_t k = 0; k < cnt && in.good(); k++ ) { // \ru наличие сопряжения \en presence of conjugation @@ -624,9 +624,9 @@ void ReadMating( reader & in, RPArray< MbPntMatingData > & data ) uint32 type = uint32(trt_None); in >> type; - MbVector3D * v1 = c3d_null; - MbVector3D * v2 = c3d_null; - MbVector3D * v3 = c3d_null; + MbVector3D * v1 = C3D_NULL_PTR; + MbVector3D * v2 = C3D_NULL_PTR; + MbVector3D * v3 = C3D_NULL_PTR; // \ru касательный вектор \en tangent vector in >> isItem; @@ -661,7 +661,7 @@ void ReadMating( reader & in, RPArray< MbPntMatingData > & data ) ::DeleteMatItem( v3 ); } else { - data.Add( c3d_null ); + data.Add( NULL ); } } } @@ -682,21 +682,21 @@ void CopyPntMatingData( const MbPntMatingData & srcData, MbPntMatingD size_t dim = std_min( SrcVector::GetDimension(), DstVector::GetDimension() ); - DstVector * tangent = c3d_null; - DstVector * tangentDer1 = c3d_null; - DstVector * tangentDer2 = c3d_null; + DstVector * tangent = C3D_NULL_PTR; + DstVector * tangentDer1 = C3D_NULL_PTR; + DstVector * tangentDer2 = C3D_NULL_PTR; - if ( srcData.GetTangent() != c3d_null ) { + if ( srcData.GetTangent() != C3D_NULL_PTR ) { tangent = new DstVector; for ( size_t k = 0; k < dim; k++ ) (*tangent)[k] = (*srcData.GetTangent())[k]; } - if ( srcData.GetTangentDer1() != c3d_null ) { + if ( srcData.GetTangentDer1() != C3D_NULL_PTR ) { tangentDer1 = new DstVector; for ( size_t k = 0; k < dim; k++ ) (*tangentDer1)[k] = (*srcData.GetTangentDer1())[k]; } - if ( srcData.GetTangentDer2() != c3d_null ) { + if ( srcData.GetTangentDer2() != C3D_NULL_PTR ) { tangentDer2 = new DstVector; for ( size_t k = 0; k < dim; k++ ) (*tangentDer2)[k] = (*srcData.GetTangentDer2())[k]; @@ -710,14 +710,4 @@ void CopyPntMatingData( const MbPntMatingData & srcData, MbPntMatingD } -class MATH_CLASS MbVector; -class MATH_CLASS MbVector3D; - -namespace c3d // namespace C3D -{ -typedef MbPntMatingData PntMatingData2D; -typedef MbPntMatingData PntMatingData3D; -} // namespace C3D - - #endif diff --git a/C3d/Include/mb_property.h b/C3d/Include/mb_property.h index cb54a9e..4e226a4 100644 --- a/C3d/Include/mb_property.h +++ b/C3d/Include/mb_property.h @@ -517,8 +517,8 @@ OBVIOUS_PRIVATE_COPY( VersionProperty ) template inline void GetCharValue( const PropType *, const FieldType *, uint32 n, TCHAR * v ) { - C3D_ASSERT( v != c3d_null ); - if ( v != c3d_null ) { + C3D_ASSERT( v != NULL ); + if ( v != NULL ) { if ( n == 0 ) { v[0] = _T(' '); v[1] = _T('\0'); @@ -540,8 +540,8 @@ inline void GetCharValue( const PropType *, const FieldType *, uint32 n, TCHAR * template inline void GetCharValue( const PropType *, const MbCartPoint * value, uint32 n, TCHAR * v ) { - C3D_ASSERT( value != c3d_null && v != c3d_null ); - if ( value != c3d_null && v != c3d_null ) { + C3D_ASSERT( value != NULL && v != NULL ); + if ( value != NULL && v != NULL ) { if ( n == 0 ) _sntprintf( v, 64, _T("%.3f\t%.3f"), value->x, value->y ); else @@ -561,8 +561,8 @@ inline void GetCharValue( const PropType *, const MbCartPoint * value, uint32 n, template inline void GetCharValue( const PropType *, const MbVector * value, uint32 n, TCHAR * v ) { - C3D_ASSERT( value != c3d_null && v != c3d_null ); - if ( value != c3d_null && v != c3d_null ) { + C3D_ASSERT( value != NULL && v != NULL ); + if ( value != NULL && v != NULL ) { if ( n == 0 ) _sntprintf( v, 64, _T("%.3f\t%.3f"), value->x, value->y ); else @@ -582,8 +582,8 @@ inline void GetCharValue( const PropType *, const MbVector * value, uint32 n, TC template inline void GetCharValue( const PropType *, const MbDirection * value, uint32 n, TCHAR * v ) { - C3D_ASSERT( value != c3d_null && v != c3d_null ); - if ( value != c3d_null && v != c3d_null ) { + C3D_ASSERT( value != NULL && v != NULL ); + if ( value != NULL && v != NULL ) { double angle(0.0); if ( value->ax==0 && value->ay==0 ) angle = 0.0; @@ -608,8 +608,8 @@ inline void GetCharValue( const PropType *, const MbDirection * value, uint32 n, template inline void GetCharValue( const PropType *, const MbCartPoint3D * value, uint32 n, TCHAR * v ) { - C3D_ASSERT( value != c3d_null && v != c3d_null ); - if ( value != c3d_null && v != c3d_null ) { + C3D_ASSERT( value != NULL && v != NULL ); + if ( value != NULL && v != NULL ) { if ( n == 0 ) _sntprintf( v, 64, _T("%.3f\t%.3f\t%.3f"), value->x, value->y, value->z ); else @@ -629,8 +629,8 @@ inline void GetCharValue( const PropType *, const MbCartPoint3D * value, uint32 template inline void GetCharValue( const PropType *, const MbVector3D * value, uint32 n, TCHAR * v ) { - C3D_ASSERT( value != c3d_null && v != c3d_null ); - if ( value != c3d_null && v != c3d_null ) { + C3D_ASSERT( value != NULL && v != NULL ); + if ( value != NULL && v != NULL ) { if ( n == 0 ) _sntprintf( v, 64, _T("%.3f\t%.3f\t%.3f"), value->x, value->y, value->z ); else @@ -650,9 +650,9 @@ inline void GetCharValue( const PropType *, const MbVector3D * value, uint32 n, template inline void GetCharValue( const PropType *, const MbName * value, uint32 n, TCHAR * v ) { - C3D_ASSERT( v != c3d_null ); - if ( v != c3d_null ) { - if ( value != c3d_null ) { + C3D_ASSERT( v != NULL ); + if ( v != NULL ) { + if ( value != NULL ) { c3d::string_t str; value->ToString( str ); diff --git a/C3d/Include/mb_property_title.h b/C3d/Include/mb_property_title.h index c1e9caf..501a2ce 100644 --- a/C3d/Include/mb_property_title.h +++ b/C3d/Include/mb_property_title.h @@ -86,10 +86,6 @@ enum MbePrompt IDS_ITEM_0103, ///< \ru Матрица преобразования. \en Transformation matrix. IDS_ITEM_0104, ///< \ru Локальная система координат. \en Local coordinate system. - IDS_ITEM_0107, ///< \ru Перемещение. \en Translation. - IDS_ITEM_0108, ///< \ru Вращение. \en Rotation. - IDS_ITEM_0109, ///< \ru Трансформация. \en Transformation. - // \ru Типы функций \en Types of functions IDS_ITEM_0111, ///< \ru Kонстантная функция. \en Constant Function. @@ -141,16 +137,10 @@ enum MbePrompt IDS_ITEM_0251, ///< \ru Первое направляющее ребро. \en First Guide Edge. IDS_ITEM_0252, ///< \ru Первая направляющая кривая. \en First Guide Curve. IDS_ITEM_0253, ///< \ru Первая грань для стыковки. \en First Mating Face. - IDS_ITEM_0254, ///< \ru Первая контрольная кривая. \en First Control Curve. - IDS_ITEM_0255, ///< \ru Первая угловая функция. \en First Angle Function. + IDS_ITEM_0256, ///< \ru Второе направляющее ребро. \en Second Guide Edge. IDS_ITEM_0257, ///< \ru Вторая направляющая кривая. \en Second Guide Curve. IDS_ITEM_0258, ///< \ru Вторая грань для стыковки. \en Second Mating Face. - IDS_ITEM_0259, ///< \ru Вторая контрольная кривая. \en Second Control Curve. - IDS_ITEM_0260, ///< \ru Вторая угловая функция. \en Second Angle Function. - IDS_ITEM_0261, ///< \ru Угол к хорде. \en Angle from Chord. - IDS_ITEM_0262, ///< \ru Угол к касательной поверхности. \en Angle from Surface Tangent. - IDS_ITEM_0263, ///< \ru Угол к нормали поверхности. \en Angle from Surface Normal. // \ru Типы параметрических поверхностей. \en Types of parametric surfaces. @@ -356,11 +346,11 @@ enum MbePrompt IDS_ITEM_0651, ///< \ru Разрез тела. \en Solid Cutting. IDS_ITEM_0652, ///< \ru Сечение тела. \en Solid Section. - IDS_ITEM_0653, ///< \ru Копия объекта. \en Object copy. + IDS_ITEM_0653, ///< \ru Размножение тела. \en Duplication of solids. // \ru Вспомогательный объект. \en The helper object. - IDS_ITEM_0669, ///< \ru Вспомогательный объект. \en The Helper Object. + IDS_ITEM_0669, ///< \ru Вспомогательный объект. \en The helper object. // \ru Резьба. \en A thread. @@ -368,70 +358,70 @@ enum MbePrompt // \ru Обозначение \en Notation - IDS_ITEM_0671, ///< \ru Условное обозначение. \en Symbolic Notation. + IDS_ITEM_0671, ///< \ru Условное обозначение. \en Symbolic notation. // \ru Объекты. \en Objects. - IDS_ITEM_0700, ///< \ru Геометрический объект. \en Geometric Object. - IDS_ITEM_0701, ///< \ru Переменная уравнения. \en Equation Variable. - IDS_ITEM_0702, ///< \ru Объект на плоскости. \en Object on a Plane. - IDS_ITEM_0703, ///< \ru Объект в пространстве. \en Object in Space. - IDS_ITEM_0704, ///< \ru Объект модели. \en Model Object. - IDS_ITEM_0705, ///< \ru Сборочная единица. \en Assembly Unit. - IDS_ITEM_0706, ///< \ru Вспомогательный объект. \en Auxiliary Object. - IDS_ITEM_0707, ///< \ru Вставка объекта. \en Object Instance. - IDS_ITEM_0708, ///< \ru Количество элементов. \en Number of Elements. - IDS_ITEM_0709, ///< \ru Геометрическая модель. \en Geometric Model. + IDS_ITEM_0700, ///< \ru Геометрический объект. \en Geometric object. + IDS_ITEM_0701, ///< \ru Переменная уравнения. \en Equation variable. + IDS_ITEM_0702, ///< \ru Объект на плоскости. \en Object on a plane. + IDS_ITEM_0703, ///< \ru Объект в пространстве. \en Object in space. + IDS_ITEM_0704, ///< \ru Объект модели. \en Model object. + IDS_ITEM_0705, ///< \ru Сборочная единица. \en Assembly unit. + IDS_ITEM_0706, ///< \ru Вспомогательный объект. \en Auxiliary object. + IDS_ITEM_0707, ///< \ru Вставка объекта. \en Object instance. + IDS_ITEM_0708, ///< \ru Количество элементов. \en Number of elements. + IDS_ITEM_0709, ///< \ru Геометрическая модель. \en Geometric model. // \ru Атрибуты \en Attributes - IDS_ITEM_0729, ///< \ru Атрибуты модели. \en Model Attributes. - IDS_ITEM_0730, ///< \ru Поставщик атрибутов. \en Attributes Provider. - IDS_ITEM_0731, ///< \ru Атрибуты объекта. \en Object Attributes. + IDS_ITEM_0729, ///< \ru Атрибуты модели. \en Model attributes. + IDS_ITEM_0730, ///< \ru Поставщик атрибутов. \en Attributes provider. + IDS_ITEM_0731, ///< \ru Атрибуты объекта. \en Object attributes. IDS_ITEM_0732, ///< \ru Атрибут. \en Attribute. - IDS_ITEM_0733, ///< \ru Имя примитива. \en Primitive Name. - IDS_ITEM_0734, ///< \ru Поведение атрибутов. \en Attributes Behavior. + IDS_ITEM_0733, ///< \ru Имя примитива. \en Primitive name. + IDS_ITEM_0734, ///< \ru Поведение атрибутов. \en Attributes behavior. - IDS_ITEM_0751, ///< \ru Механические характеристики. \en Mechanical Properties. + IDS_ITEM_0751, ///< \ru Механические характеристики. \en Mechanical properties. IDS_ITEM_0754, ///< \ru Деформации. \en Strains. - IDS_ITEM_0761, ///< \ru Исполнение (вариант реализации модели). \en Embodiment (Variant of Model Implementation). - IDS_ITEM_0762, ///< \ru Количество u-линий и v-линий отрисовочной сетки. \en The Number of u-mesh and v-mesh Lines. + IDS_ITEM_0761, ///< \ru Исполнение (вариант реализации модели). \en Embodiment (variant of model implementation). + IDS_ITEM_0762, ///< \ru Количество u-линий и v-линий отрисовочной сетки. \en The number of u-mesh and v-mesh lines. IDS_ITEM_0763, ///< \ru Плотность. \en Density. IDS_ITEM_0764, ///< \ru Цвет. \en Color. IDS_ITEM_0765, ///< \ru Толщина. \en Thickness. IDS_ITEM_0766, ///< \ru Стиль. \en Style. - IDS_ITEM_0767, ///< \ru Визуальные свойства. \en Visual Properties. + IDS_ITEM_0767, ///< \ru Визуальные свойства. \en Visual properties. IDS_ITEM_0768, ///< \ru Идентификатор. \en Identifier. IDS_ITEM_0769, ///< \ru Селектированность. \en Selectivity. IDS_ITEM_0770, ///< \ru Видимость. \en Visibility. IDS_ITEM_0771, ///< \ru Измененность. \en Modification. - IDS_ITEM_0772, ///< \ru Топологическое имя. \en Topological Name. + IDS_ITEM_0772, ///< \ru Топологическое имя. \en Topological name. IDS_ITEM_0773, ///< \ru Якорь. \en Anchor. - IDS_ITEM_0774, ///< \ru Геометрический атрибут. \en Geometric Attribute. - IDS_ITEM_0775, ///< \ru Метка времени обновления. \en Label of Update Time. - IDS_ITEM_0776, ///< \ru Уникальность ключей. \en Keys Uniqueness. + IDS_ITEM_0774, ///< \ru Геометрический атрибут. \en Geometric attribute. + IDS_ITEM_0775, ///< \ru Метка времени обновления. \en Label of update time. + IDS_ITEM_0776, ///< \ru Уникальность ключей. \en Keys uniqueness. IDS_ITEM_0777, ///< \ru Имя объекта в модели. \en Name of object in the model. IDS_ITEM_0778, ///< \ru Данные об изделии. \en Product data. IDS_ITEM_0779, ///< \ru Атрибут ребра жесткости листового тела. \en Attribute of stamp rib of sheet solid. IDS_ITEM_0780, ///< \ru Атрибут отбортовки листового тела. \en Swept flange attribute of a sheet solid. - IDS_ITEM_0782, ///< \ru Атрибут пользовательский. \en Custom Attribute. - IDS_ITEM_0783, ///< \ru Атрибут обобщенный. \en Generalized Attribute. - IDS_ITEM_0784, ///< \ru Атрибут булев. \en Boolean Attribute. - IDS_ITEM_0785, ///< \ru Атрибут целочисленный (32-битный). \en (32 bit ) Integer Attribute. - IDS_ITEM_0786, ///< \ru Атрибут действительный. \en Real Attribute. - IDS_ITEM_0787, ///< \ru Атрибут строковый. \en String Attribute. - IDS_ITEM_0788, ///< \ru Атрибут элементарный. \en Elementary Attribute. + IDS_ITEM_0782, ///< \ru Атрибут пользовательский. \en Custom attribute. + IDS_ITEM_0783, ///< \ru Атрибут обобщенный. \en Generalized attribute. + IDS_ITEM_0784, ///< \ru Атрибут булев. \en Boolean attribute. + IDS_ITEM_0785, ///< \ru Атрибут целочисленный (32-битный). \en (32 bit ) Integer attribute. + IDS_ITEM_0786, ///< \ru Атрибут действительный. \en Real attribute. + IDS_ITEM_0787, ///< \ru Атрибут строковый. \en String attribute. + IDS_ITEM_0788, ///< \ru Атрибут элементарный. \en Elementary attribute. IDS_ITEM_0789, ///< \ru Пояснение. \en Prompt. - IDS_ITEM_0790, ///< \ru Атрибут int64. \en Int64 Attribute. - IDS_ITEM_0791, ///< \ru Атрибут бинарный. \en Binary Attribute. + IDS_ITEM_0790, ///< \ru Атрибут int64. \en Int64 attribute. + IDS_ITEM_0791, ///< \ru Атрибут бинарный. \en Binary attribute. // \ru Сообщения. \en Messages. IDS_ITEM_0900, ///< \ru ! Ошибка !. \en ! Error ! - IDS_ITEM_0901, ///< \ru Остановлено. \en Stopped. - IDS_ITEM_0902, ///< \ru Пропущено. \en Missed. + IDS_ITEM_0901, ///< \ru Остановлено. \en Stopped. + IDS_ITEM_0902, ///< \ru Пропущено. \en Missed. // \ru Состав объектов \en Structure of objects @@ -520,10 +510,10 @@ enum MbePrompt IDS_PROP_0152, ///< \ru Смещение зазора. \en Gap displacement. IDS_PROP_0153, ///< \ru Перемещение. \en Translation. IDS_PROP_0154, ///< \ru Вращение. \en Rotation. - IDS_PROP_0155, ///< \ru Масштабирование. \en Scaling. + IDS_PROP_0155, ///< \ru Общий масштаб. \en Common scale. IDS_PROP_0156, ///< \ru Зеркальность. \en Specularity. IDS_PROP_0157, ///< \ru Только ортогональность. \en Orthogonality only. - IDS_PROP_0158, ///< \ru Трансформация. \en Transformation. + IDS_PROP_0158, ///< \ru Объект общего вида. \en General object. IDS_PROP_0159, ///< \ru Перспектива. \en Perspective. IDS_PROP_0160, ///< \ru Локальная система координат. \en Local coordinate system. IDS_PROP_0161, ///< \ru Начальное значение. \en Start value. @@ -557,10 +547,7 @@ enum MbePrompt IDS_PROP_0188, ///< \ru Направление (вниз/вверх). \en Direction (down/up). IDS_PROP_0189, ///< \ru Радиус дуги. \en Arc radius. - IDS_PROP_0190, ///< \ru Дискриминантная функция. \en Discriminant function. - IDS_PROP_0191, ///< \ru Дискриминантная скривая. \en Discriminant cueve. - IDS_PROP_0192, ///< \ru Дискриминантная поверхность. \en Discriminant surface. - IDS_PROP_0193, ///< \ru Дискриминантная оболочка. \en Discriminant shell. + IDS_PROP_0190, ///< \ru Функция дискриминанта. \en Discriminant function. // \ru Параметры. \en Parameters. @@ -671,10 +658,10 @@ enum MbePrompt IDS_PROP_0328, ///< \ru Форма. \en Shape. IDS_PROP_0329, ///< \ru Закрепление границы поверхности. \en Surface boundary fixation. IDS_PROP_0330, ///< \ru Отличается от базовой поверхности. \en Differs from the base surface. - IDS_PROP_0331, ///< \ru Граничное значение Xmin. \en Boundary value Xmin. - IDS_PROP_0332, ///< \ru Граничное значение Ymin. \en Boundary value Ymin. - IDS_PROP_0333, ///< \ru Граничное значение Xmax. \en Boundary value Xmax. - IDS_PROP_0334, ///< \ru Граничное значение Ymax. \en Boundary value Ymax. + IDS_PROP_0331, ///< \ru Видимая длина Xmin. \en Visible length Xmin. + IDS_PROP_0332, ///< \ru Видимая длина Ymin. \en Visible length Ymin. + IDS_PROP_0333, ///< \ru Видимая длина Xmax. \en Visible length Xmax. + IDS_PROP_0334, ///< \ru Видимая длина Ymax. \en Visible length Ymax. IDS_PROP_0336, ///< \ru Число узлов по U. \en Number of knots by U. IDS_PROP_0337, ///< \ru Значение U узла. \en Value of U knot. IDS_PROP_0338, ///< \ru Число узлов по V. \en Number of knots by V. @@ -709,7 +696,7 @@ enum MbePrompt IDS_PROP_0370, ///< \ru Кривая на поверхности 0. \en Curve on surface 0. IDS_PROP_0371, ///< \ru Кривая на поверхности 1. \en Curve on surface 1. IDS_PROP_0372, ///< \ru Кривая на поверхности 2. \en Curve on surface 2. - IDS_PROP_0373, ///< \ru Кривая вершин. \en Apex Curve. + IDS_PROP_0373, ///< \ru Кривая вершин. \en Curve of vertices. IDS_PROP_0374, ///< \ru Параметр Umin. \en Parameter Umin. IDS_PROP_0375, ///< \ru Параметр Umax. \en Parameter Umax. IDS_PROP_0376, ///< \ru Параметр Vmin. \en Parameter Vmin. @@ -783,7 +770,6 @@ enum MbePrompt IDS_PROP_0517, ///< \ru Количество угловых шагов. \en Number of angular step. IDS_PROP_0518, ///< \ru Элемент. \en Element. IDS_PROP_0519, ///< \ru Сегмент полигональной сетки. \en Segment of polygonal mesh. - IDS_PROP_0520, ///< \ru Направляющая поверхность. \en Guide surface. IDS_PROP_0521, ///< \ru Длина Lx. \en Length Lx. IDS_PROP_0522, ///< \ru Ширина Ly. \en Width Ly. @@ -793,7 +779,7 @@ enum MbePrompt IDS_PROP_0526, ///< \ru Толщина стенки. \en Wall thickness. IDS_PROP_0527, ///< \ru Число вскрытых граней. \en Number of opened faces. IDS_PROP_0528, ///< \ru Форма. \en Shape. - IDS_PROP_0529, ///< \ru Сохранять кромку, поверхность или режим автоопределения. \en Keep the boundary, surface or auto mode. + IDS_PROP_0529, ///< \ru Сохранять кромку\поверхность\автоопределение. \en Keep the boundary\surface\auto. IDS_PROP_0530, ///< \ru Продолжить далее. \en Continue. IDS_PROP_0531, ///< \ru Катет 1. \en Cathetus 1. IDS_PROP_0532, ///< \ru Катет 2. \en Cathetus 2. @@ -884,7 +870,7 @@ enum MbePrompt IDS_PROP_0614, ///< \ru Номер по порядку. \en Number by and index. IDS_PROP_0615, ///< \ru Сортировка. \en Sorting. IDS_PROP_0616, ///< \ru Пуансон или матрица. \en Punch or die. - IDS_PROP_0617, ///< \ru Скруглять острые ребра инструмента. \en Fillet sharp edges of tool solid. + IDS_PROP_0617, ///< \ru Постоянность толщины штамповки. \en Stamp constant thickness. IDS_PROP_0651, ///< \ru Разрезанное тело. \en Cutting solid. IDS_PROP_0652, ///< \ru Плоскость раскроя. \en Cutting plane. IDS_PROP_0654, ///< \ru Наличие штриховки. \en Whether there is hatching. diff --git a/C3d/Include/mb_rough.h b/C3d/Include/mb_rough.h index 87b1d0f..336d668 100644 --- a/C3d/Include/mb_rough.h +++ b/C3d/Include/mb_rough.h @@ -62,7 +62,7 @@ public: \en \name Common functions of a geometric object. \{ */ virtual MbeSpaceType IsA () const; - virtual MbSpaceItem & Duplicate( MbRegDuplicate * = c3d_null ) const; + virtual MbSpaceItem & Duplicate( MbRegDuplicate * = NULL ) const; virtual bool IsSame ( const MbSpaceItem & other, double accuracy = LENGTH_EPSILON ) const; virtual bool SetEqual ( const MbSpaceItem & ); @@ -133,12 +133,12 @@ public: \{ */ virtual MbeSpaceType IsA () const; - virtual MbSpaceItem & Duplicate ( MbRegDuplicate * = c3d_null ) const; + virtual MbSpaceItem & Duplicate ( MbRegDuplicate * = NULL ) const; virtual bool IsSame ( const MbSpaceItem & other, double accuracy = LENGTH_EPSILON ) const; virtual bool SetEqual ( const MbSpaceItem & ); - virtual void Transform ( const MbMatrix3D &, MbRegTransform * = c3d_null ); - virtual void Move ( const MbVector3D &, MbRegTransform * = c3d_null ); - virtual void Rotate ( const MbAxis3D &, double, MbRegTransform * = c3d_null ); + virtual void Transform ( const MbMatrix3D &, MbRegTransform * = NULL ); + virtual void Move ( const MbVector3D &, MbRegTransform * = NULL ); + virtual void Rotate ( const MbAxis3D &, double, MbRegTransform * = NULL ); virtual void GetProperties( MbProperties & ); virtual void SetProperties( const MbProperties & ); diff --git a/C3d/Include/mb_symbol.h b/C3d/Include/mb_symbol.h index 4846a28..7e7f730 100644 --- a/C3d/Include/mb_symbol.h +++ b/C3d/Include/mb_symbol.h @@ -123,13 +123,13 @@ public: \{ */ virtual MbeSpaceType IsA() const = 0; virtual MbeSpaceType Type() const; - virtual MbSpaceItem & Duplicate ( MbRegDuplicate * = c3d_null ) const = 0; + virtual MbSpaceItem & Duplicate ( MbRegDuplicate * = NULL ) const = 0; virtual bool IsSame ( const MbSpaceItem & other, double accuracy = LENGTH_EPSILON ) const = 0; virtual bool IsSimilar ( const MbSpaceItem & ) const; virtual bool SetEqual ( const MbSpaceItem & ) = 0; - virtual void Transform ( const MbMatrix3D &, MbRegTransform * = c3d_null ) = 0; - virtual void Move ( const MbVector3D &, MbRegTransform * = c3d_null ) = 0; - virtual void Rotate ( const MbAxis3D &, double, MbRegTransform * = c3d_null ) = 0; + virtual void Transform ( const MbMatrix3D &, MbRegTransform * = NULL ) = 0; + virtual void Move ( const MbVector3D &, MbRegTransform * = NULL ) = 0; + virtual void Rotate ( const MbAxis3D &, double, MbRegTransform * = NULL ) = 0; virtual double DistanceToPoint ( const MbCartPoint3D & ) const; virtual void AddYourGabaritTo ( MbCube & ) const {}; virtual void CalculateMesh ( const MbStepData & stepData, const MbFormNote & note, MbMesh & mesh ) const; @@ -239,12 +239,12 @@ public: \en \name Common functions of a geometric object. \{ */ virtual MbeSpaceType IsA () const; - virtual MbSpaceItem & Duplicate ( MbRegDuplicate * = c3d_null ) const; + virtual MbSpaceItem & Duplicate ( MbRegDuplicate * = NULL ) const; virtual bool IsSame ( const MbSpaceItem & other, double accuracy = LENGTH_EPSILON ) const; virtual bool SetEqual ( const MbSpaceItem & ); - virtual void Transform ( const MbMatrix3D &, MbRegTransform * = c3d_null ); - virtual void Move ( const MbVector3D &, MbRegTransform * = c3d_null ); - virtual void Rotate ( const MbAxis3D &, double, MbRegTransform * = c3d_null ); + virtual void Transform ( const MbMatrix3D &, MbRegTransform * = NULL ); + virtual void Move ( const MbVector3D &, MbRegTransform * = NULL ); + virtual void Rotate ( const MbAxis3D &, double, MbRegTransform * = NULL ); virtual void GetProperties( MbProperties & ); // \ru Выдать свойства объекта. \en Get properties of the object. virtual void SetProperties( const MbProperties & ); // \ru Записать свойства объекта. \en Set properties of the object. diff --git a/C3d/Include/mb_thread.h b/C3d/Include/mb_thread.h index 7d6d709..0ac9375 100644 --- a/C3d/Include/mb_thread.h +++ b/C3d/Include/mb_thread.h @@ -284,13 +284,13 @@ public: \{ */ virtual MbeSpaceType IsA() const; virtual MbeSpaceType Type() const; - virtual MbSpaceItem & Duplicate( MbRegDuplicate * = c3d_null ) const; + virtual MbSpaceItem & Duplicate( MbRegDuplicate * = NULL ) const; virtual bool IsSame ( const MbSpaceItem &, double accuracy = LENGTH_EPSILON ) const; virtual bool IsSimilar ( const MbSpaceItem & ) const; virtual bool SetEqual( const MbSpaceItem & ); - virtual void Transform( const MbMatrix3D &, MbRegTransform * = c3d_null ); - virtual void Move ( const MbVector3D &, MbRegTransform * = c3d_null ); - virtual void Rotate ( const MbAxis3D &, double, MbRegTransform * = c3d_null ); + virtual void Transform( const MbMatrix3D &, MbRegTransform * = NULL ); + virtual void Move ( const MbVector3D &, MbRegTransform * = NULL ); + virtual void Rotate ( const MbAxis3D &, double, MbRegTransform * = NULL ); virtual double DistanceToPoint ( const MbCartPoint3D & ) const; virtual void AddYourGabaritTo( MbCube & ) const; virtual void Refresh(); @@ -379,7 +379,7 @@ public : \return \ru true, если имя есть и оно не пустое. \en True if there is name and it is not empty. \~ */ - bool IsName() const { return ((name != c3d_null) ? name->IsEmpty() : false); } + bool IsName() const { return ((name != NULL) ? name->IsEmpty() : false); } /** \} */ /**\ru \name Функции работы с телами, на которых нарезана резьба. @@ -562,7 +562,7 @@ public : */ bool IsMatedTo( const MbThread & otherThread, const MbThreadedJointCheckParameters & checkParams, - ThreadedJointErrors * thrJointErrors = c3d_null ) const; + ThreadedJointErrors * thrJointErrors = NULL ) const; /// \ru Принадлежит ли резьба грани. \en Check if thread belongs to face. bool IsFaceThread( const MbFace *, const MbMatrix3D & ) const; @@ -583,8 +583,8 @@ public : \en True if thread belongs to one of solid faces. \~ */ bool IsBodyThread( const MbSolid & solid, const MbMatrix3D & matrix, - c3d::IndicesVector * simObjNumbers = c3d_null, - c3d::IndicesVector * intObjNumbers = c3d_null ) const; + c3d::IndicesVector * simObjNumbers = NULL, + c3d::IndicesVector * intObjNumbers = NULL ) const; /** \brief \ru Принадлежит ли резьба телу. \en Check if thread belongs to solid. \~ @@ -612,7 +612,7 @@ public : \return \ru true в случае успеха операции. \en True if the operation is successful. \~ */ - bool AdaptToBody( const MbSolid & solid, const MbMatrix3D & matrix, MbeThrAdapt thrAdapt, const ThreadLimiters * limiters = c3d_null ); + bool AdaptToBody( const MbSolid & solid, const MbMatrix3D & matrix, MbeThrAdapt thrAdapt, const ThreadLimiters * limiters = NULL ); /** \brief \ru Выдать начало и конец изменённой резьбы относительно исходной. \en Get limit positions of the modified thread in regard to an initial thread. \~ @@ -737,7 +737,7 @@ bool MbThread::FindThreadBodies( const SolidsVector & solids, const MatricesVect MbCube solidCube; for ( size_t i = 0; i < solidsCnt; ++i ) { const MbSolid * solid = solids[i]; - if ( solid != c3d_null && solid->GetShell() != c3d_null ) { + if ( solid != NULL && solid->GetShell() != NULL ) { solidCube.SetEmpty(); solid->AddYourGabaritTo( solidCube ); if ( cube.Intersect( solidCube ) && IsBodyThread( *solid, matrices[i] ) ) @@ -788,32 +788,32 @@ bool CheckThreads( ThreadsVector & threads, const MbPlacement3D * placeSec, bool for ( size_t i = threads.size(); i--; ) { MbThread * thr = threads[i]; - if ( (thr == c3d_null) || !thr->IsValid() ) { + if ( (thr == C3D_NULL_PTR) || !thr->IsValid() ) { threads.erase( threads.begin() + i ); - thr = c3d_null; + thr = C3D_NULL_PTR; } - else if ( checkThreadNames && (thr->GetName() == c3d_null) ) { // C3D-695 : KOMPAS-25125 + else if ( checkThreadNames && (thr->GetName() == C3D_NULL_PTR) ) { // C3D-695 : KOMPAS-25125 threads.erase( threads.begin() + i ); - thr = c3d_null; + thr = C3D_NULL_PTR; } else { if ( threads.size() > 1 ) { for ( ptrdiff_t j = i - 1; j >= 0; j-- ) { if ( thr == threads[j] ) { - threads[i] = c3d_null; + threads[i] = C3D_NULL_PTR; threads.erase( threads.begin() + i ); C3D_ASSERT_UNCONDITIONAL( false ); // Error case! - thr = c3d_null; + thr = C3D_NULL_PTR; break; } } } } - if ( thr != c3d_null ) // KOMPAS-37171 + if ( thr != C3D_NULL_PTR ) // KOMPAS-37171 thr->DetachWrongBodies(); } - if ( !threads.empty() && (placeSec != c3d_null) ) { + if ( !threads.empty() && (placeSec != C3D_NULL_PTR) ) { const MbVector3D & axisZsec = placeSec->GetAxisZ(); for ( size_t i = threads.size(); i--; ) { const MbThread * thr = threads[i]; diff --git a/C3d/Include/mb_variables.h b/C3d/Include/mb_variables.h index 7100186..e7320d9 100644 --- a/C3d/Include/mb_variables.h +++ b/C3d/Include/mb_variables.h @@ -567,7 +567,7 @@ MATH_FUNC(const char *) C3DFileNameOnly( const char * path ); #ifdef C3D_DEBUG #define C3D_ASSERT_UNCONDITIONAL(expr) \ - { const c3d::eAssertViolationNotify notify = ::Math::CheckAssertNotify(); \ + { const c3d::eAssertViolationNotify notify = Math::CheckAssertNotify(); \ if ( c3d::avn_ASSERT == notify ) { _ASSERT(false); } \ else if ( c3d::avn_CERR == notify ) { C3D_ASSERT_AS_CERR(expr) } \ } @@ -594,8 +594,8 @@ extern "C" \en Pointer to the beginning of the buffer. \~ \param[in] bufferSize - \ru Размер буфера, в символах. \en The size of the buffer in characters. \~ - \return \ru Возвращает количество скопированных символов, без учета null-символа. Если buffer == c3d_null возвращается необходимый размер буфера без учета null-символа. - \en Returns the number of copied characters, excluding the null character. If buffer = = c3d_null returns the required buffer size without the null character. \~ + \return \ru Возвращает количество скопированных символов, без учета null-символа. Если buffer == nullptr возвращается необходимый размер буфера без учета null-символа. + \en Returns the number of copied characters, excluding the null character. If buffer = = null ptr returns the required buffer size without the null character. \~ */ extern MATH_FUNC(size_t) GetC3dVersionInfo( char * const buffer, size_t bufferSize ); ///< \ru Информация о версии c3d.dll \en c3d.dll version information @@ -608,8 +608,8 @@ extern "C" \en Pointer to the beginning of the buffer. \~ \param[in] bufferSize - \ru Размер буфера, в символах. \en The size of the buffer in characters. \~ - \return \ru Возвращает количество скопированных символов, без учета null-символа. Если buffer == c3d_null возвращается необходимый размер буфера без учета null-символа. - \en Returns the number of copied characters, excluding the null character. If buffer = = c3d_null returns the required buffer size without the null character. \~ + \return \ru Возвращает количество скопированных символов, без учета null-символа. Если buffer == nullptr возвращается необходимый размер буфера без учета null-символа. + \en Returns the number of copied characters, excluding the null character. If buffer = = null ptr returns the required buffer size without the null character. \~ */ extern MATH_FUNC(size_t) GetC3dBuildInfo( char * const buffer, size_t bufferSize ); ///< \ru Информация о сборке c3d.dll \en c3d.dll building information @@ -630,7 +630,7 @@ inline std::string GetC3dLibInfo( bool needVersionInfo = true ) size_t( *GetLibInfo )( char * const buffer, size_t bufferSize ); GetLibInfo = ( needVersionInfo ) ? GetC3dVersionInfo : GetC3dBuildInfo; - std::vector buffer( GetLibInfo( c3d_null, 1 ) ); + std::vector buffer( GetLibInfo( C3D_NULL_PTR, 1 ) ); GetLibInfo( &buffer[0], buffer.size() ); diff --git a/C3d/Include/mesh.h b/C3d/Include/mesh.h index 9020c54..e1bf88f 100644 --- a/C3d/Include/mesh.h +++ b/C3d/Include/mesh.h @@ -112,10 +112,10 @@ public: // \ru Общие функции геометрического объекта. \en Common functions of a geometric object. virtual MbeSpaceType IsA() const; // \ru Тип объекта. \en Type of the object. - virtual MbSpaceItem & Duplicate( MbRegDuplicate * = c3d_null ) const; // \ru Создать копию. \en Create a copy. - virtual void Transform( const MbMatrix3D &, MbRegTransform * = c3d_null ); // \ru Преобразовать согласно матрице. \en Transform according to the matrix. - virtual void Move ( const MbVector3D &, MbRegTransform * = c3d_null ); // \ru Сдвинуть вдоль вектора. \en Translate along a vector. - virtual void Rotate ( const MbAxis3D &, double angle, MbRegTransform * = c3d_null ); // \ru Повернуть вокруг оси. \en Rotate around an axis. + virtual MbSpaceItem & Duplicate( MbRegDuplicate * = NULL ) const; // \ru Создать копию. \en Create a copy. + virtual void Transform( const MbMatrix3D &, MbRegTransform * = NULL ); // \ru Преобразовать согласно матрице. \en Transform according to the matrix. + virtual void Move ( const MbVector3D &, MbRegTransform * = NULL ); // \ru Сдвинуть вдоль вектора. \en Translate along a vector. + virtual void Rotate ( const MbAxis3D &, double angle, MbRegTransform * = NULL ); // \ru Повернуть вокруг оси. \en Rotate around an axis. virtual bool IsSame ( const MbSpaceItem & other, double accuracy = LENGTH_EPSILON ) const; // \ru Являются ли объекты равными? \en Determine whether objects are equal. virtual bool SetEqual ( const MbSpaceItem & init ); // \ru Сделать объекты равным. \en Make equal objects. virtual double DistanceToPoint ( const MbCartPoint3D & ) const; // \ru Вычислить расстояние до точки. \en Calculate the distance to a point. @@ -181,7 +181,7 @@ public: gridsVector.reserve( gridsVector.size() + grids.size() ); for( size_t i = 0, iCount = grids.size(); i < iCount; ++i ) { MbGrid * gr = grids[i]; - if ( gr != c3d_null ) { + if ( gr != NULL ) { gr->DecRef(); gridsVector.push_back( gr ); } @@ -193,9 +193,9 @@ public: cube.SetEmpty(); } /// \ru Вернуть указатель на триангуляцию по её номеру. \en Return pointer to triangulation by it number. - const MbGrid * GetGrid( size_t i ) const { return ( (i < grids.size()) ? grids[i]: c3d_null ); } + const MbGrid * GetGrid( size_t i ) const { return ( (i < grids.size()) ? grids[i]: NULL ); } /// \ru Вернуть указатель на триангуляцию по её номеру для модификации. \en Return the pointer to triangulation by its number to be modified. - MbGrid * SetGrid( size_t i ) { return ( (i < grids.size()) ? grids[i]: c3d_null ); } + MbGrid * SetGrid( size_t i ) { return ( (i < grids.size()) ? grids[i]: NULL ); } /// \ru Получить указатели на триангуляции. \en Get pointers to triangulations. template void GetGrids( GridsVector & gridsVector ) const { @@ -220,7 +220,7 @@ public: polyVector.reserve( polyVector.size() + wires.size() ); for( size_t i = 0, iCount = wires.size(); i < iCount; ++i ) { MbPolygon3D * pl = wires[i]; - if ( pl != c3d_null ) { + if ( pl != NULL ) { pl->DecRef(); polyVector.push_back( pl ); } @@ -232,9 +232,9 @@ public: cube.SetEmpty(); } /// \ru Вернуть указатель на полигон по его номеру. \en Return the pointer to polygon by its number. - const MbPolygon3D * GetPolygon( size_t i ) const { return ( (i < wires.size()) ? wires[i]: c3d_null ); } + const MbPolygon3D * GetPolygon( size_t i ) const { return ( (i < wires.size()) ? wires[i]: NULL ); } /// \ru Вернуть указатель на полигон по его номеру. \en Return the pointer to polygon by its number. - MbPolygon3D * SetPolygon( size_t i ) { return ( (i < wires.size()) ? wires[i]: c3d_null ); } + MbPolygon3D * SetPolygon( size_t i ) { return ( (i < wires.size()) ? wires[i]: NULL ); } /// \ru Получить указатели на полигоны. \en Get pointers to polygons. template void GetPolygons( PolygonsVector & polyVector ) const { @@ -259,7 +259,7 @@ public: peakVector.reserve( peakVector.size() + peaks.size() ); for( size_t i = 0, iCount = peaks.size(); i < iCount; ++i ) { MbApex3D * peak = peaks[i]; - if ( peak != c3d_null ) { + if ( peak != NULL ) { peak->DecRef(); peakVector.push_back( peak ); } @@ -271,9 +271,9 @@ public: cube.SetEmpty(); } /// \ru Вернуть указатель на апекс по его номеру. \en Return the pointer to apex by its number. - const MbApex3D * GetApex( size_t i ) const { return ( (i < peaks.size()) ? peaks[i]: c3d_null ); } + const MbApex3D * GetApex( size_t i ) const { return ( (i < peaks.size()) ? peaks[i]: NULL ); } /// \ru Вернуть указатель на апекс по его номеру для модификации. \en Return the pointer to apex by its number to be modified. - MbApex3D * SetApex( size_t i ) { return ( (i < peaks.size()) ? peaks[i]: c3d_null ); } + MbApex3D * SetApex( size_t i ) { return ( (i < peaks.size()) ? peaks[i]: NULL ); } /// \ru Получить указатели на вершины. \en Get pointers to apexes. template void GetApexes( ApexesVector & peakVector ) const { @@ -294,14 +294,14 @@ public: bool AddMesh( const MbMesh &, bool checkSamePointers ); /// \ru Получить пространственный объект, для которого построен полигональный объект. \en Get a spatial object for which a polygonal object is constructed. - const MbSpaceItem * SpaceItem() const { return ((item != c3d_null && item->RefType() == rt_SpaceItem) ? (const MbSpaceItem *)item : c3d_null); } + const MbSpaceItem * SpaceItem() const { return ((item != NULL && item->RefType() == rt_SpaceItem) ? (const MbSpaceItem *)item : NULL); } /// \ru Получить двумерный объект, для которого построен полигональный объект. \en Get a two-dimensional object for which a polygonal object is constructed. - const MbPlaneItem * PlaneItem() const { return ((item != c3d_null && item->RefType() == rt_PlaneItem) ? (const MbPlaneItem *)item : c3d_null); } + const MbPlaneItem * PlaneItem() const { return ((item != NULL && item->RefType() == rt_PlaneItem) ? (const MbPlaneItem *)item : NULL); } /// \ru Получить объект геометрической модели, для которого построен полигональный объект. \en Get a model geometric object for which a polygonal object is constructed. const MbItem * Item() const { - const MbItem * modelItem = c3d_null; - if ( item != c3d_null ) { + const MbItem * modelItem = NULL; + if ( item != NULL ) { MbeRefType refType = item->RefType(); if ( refType == rt_SpaceItem ) { if ( static_cast(item)->Family() == st_Item ) diff --git a/C3d/Include/mesh_grid.h b/C3d/Include/mesh_grid.h index 7c9da46..0f3d9e1 100644 --- a/C3d/Include/mesh_grid.h +++ b/C3d/Include/mesh_grid.h @@ -57,7 +57,7 @@ public: // \ru \name Общие функции примитива. \en \name Common functions of primitive. virtual MbePrimitiveType IsA() const; // \ru Тип объекта. \en A type of an object. - virtual MbExactGrid & Duplicate( MbRegDuplicate * iReg = c3d_null ) const; // \ru Создать копию объекта. \en Create a copy of the object. + virtual MbExactGrid & Duplicate( MbRegDuplicate * iReg = NULL ) const; // \ru Создать копию объекта. \en Create a copy of the object. virtual void Transform( const MbMatrix3D & matr ); // \ru Преобразовать сетку согласно матрице. \en Transform mesh according to the matrix. virtual void Move ( const MbVector3D & to ); // \ru Сдвиг сетки. \en Move mesh. virtual void Rotate ( const MbAxis3D & axis, double angle ); // \ru Поворот сетки вокруг оси. \en Rotation of mesh about an axis. @@ -321,11 +321,11 @@ public: /// \ru Выдать адрес начала массива. \en Get the address of the beginning of the array. virtual const MbCartPoint * GetExactParamsAddr() const { return &(params[0]); } /// \ru Выдать адрес начала массива. \en Get the address of the beginning of the array. - virtual const MbFloatPoint3D * GetFloatPointsAddr() const { return c3d_null; } + virtual const MbFloatPoint3D * GetFloatPointsAddr() const { return NULL; } /// \ru Выдать адрес начала массива. \en Get the address of the beginning of the array. - virtual const MbFloatVector3D * GetFloatNormalsAddr() const { return c3d_null; } + virtual const MbFloatVector3D * GetFloatNormalsAddr() const { return NULL; } /// \ru Выдать адрес начала массива. \en Get the address of the beginning of the array. - virtual const MbFloatPoint * GetFloatParamsAddr() const { return c3d_null; } + virtual const MbFloatPoint * GetFloatParamsAddr() const { return NULL; } private : // \ru Объявление оператора присваивания без реализации, чтобы не было присваивания по умолчанию. \en The declaration of the assignment operator without implementation, to prevent an assignment by default. @@ -371,7 +371,7 @@ public: // \ru \name Общие функции примитива. \en \name Common functions of primitive. virtual MbePrimitiveType IsA() const; // \ru Тип объекта. \en A type of an object. - virtual MbFloatGrid & Duplicate( MbRegDuplicate * iReg = c3d_null ) const; // \ru Создать копию объекта. \en Create a copy of the object. + virtual MbFloatGrid & Duplicate( MbRegDuplicate * iReg = NULL ) const; // \ru Создать копию объекта. \en Create a copy of the object. virtual void Transform( const MbMatrix3D & matr ); // \ru Преобразовать сетку согласно матрице. \en Transform mesh according to the matrix. virtual void Move ( const MbVector3D & to ); // \ru Сдвиг сетки. \en Move mesh. virtual void Rotate ( const MbAxis3D & axis, double angle ); // \ru Поворот сетки вокруг оси. \en Rotation of mesh about an axis. @@ -629,11 +629,11 @@ public: virtual void Init( const MbGrid & grid ); /// \ru Выдать адрес начала массива. \en Get the address of the beginning of the array. - virtual const MbCartPoint3D * GetExactPointsAddr() const { return c3d_null; } + virtual const MbCartPoint3D * GetExactPointsAddr() const { return NULL; } /// \ru Выдать адрес начала массива. \en Get the address of the beginning of the array. - virtual const MbVector3D * GetExactNormalsAddr() const { return c3d_null; } + virtual const MbVector3D * GetExactNormalsAddr() const { return NULL; } /// \ru Выдать адрес начала массива. \en Get the address of the beginning of the array. - virtual const MbCartPoint * GetExactParamsAddr() const { return c3d_null; } + virtual const MbCartPoint * GetExactParamsAddr() const { return NULL; } /// \ru Выдать адрес начала массива. \en Get the address of the beginning of the array. virtual const MbFloatPoint3D * GetFloatPointsAddr() const { return &(points[0]); } /// \ru Выдать адрес начала массива. \en Get the address of the beginning of the array. diff --git a/C3d/Include/mesh_plane_grid.h b/C3d/Include/mesh_plane_grid.h index 190f256..10328c4 100644 --- a/C3d/Include/mesh_plane_grid.h +++ b/C3d/Include/mesh_plane_grid.h @@ -215,7 +215,7 @@ private: intptr_t size; ///< \ru Количество вершин. \en Count of vertices. public: - TriPoly() : vertex( c3d_null ), size( 0 ) {} + TriPoly() : vertex( NULL ), size( 0 ) {} TriPoly( TriVertex * vert ) : vertex( vert ), size( 0 ) { Resize(); } public: @@ -223,7 +223,7 @@ public: public: intptr_t Size() const { return size; } ///< \ru Размер цепочки вершин \en Size of vertex chain - size_t Index() const { return (vertex != c3d_null) ? vertex->Index() : SYS_MAX_T; } ///< \ru Индекс вершины \en Index of vertex + size_t Index() const { return (vertex != NULL) ? vertex->Index() : SYS_MAX_T; } ///< \ru Индекс вершины \en Index of vertex TriVertex * This() const { return vertex; } ///< \ru Текущая вершина \en Current vertex TriVertex * Next() const; ///< \ru Следующая вершина \en Next vertex @@ -301,7 +301,7 @@ protected: // \ru 2 - смедный через ребра на вершинах 2,0 \en 2 - adjacent at edge with vertices 2,0 public: - MbLinkedTri() : MbTri() { neighbors[0] = neighbors[1] = neighbors[2] = c3d_null; }; + MbLinkedTri() : MbTri() { neighbors[0] = neighbors[1] = neighbors[2] = NULL; }; ~MbLinkedTri() {}; public: MbTri * GetNeighbor( size_t n ) const { return neighbors[n % 3]; } @@ -317,9 +317,9 @@ OBVIOUS_PRIVATE_COPY( MbLinkedTri ) // --- inline bool MbLinkedTri::IsBoundary() const { - bool isBoundary = (neighbors[0] == c3d_null) || - (neighbors[1] == c3d_null) || - (neighbors[2] == c3d_null); + bool isBoundary = (neighbors[0] == NULL) || + (neighbors[1] == NULL) || + (neighbors[2] == NULL); return isBoundary; } // */ diff --git a/C3d/Include/mesh_polygon.h b/C3d/Include/mesh_polygon.h index 0cbafd6..915bfcc 100644 --- a/C3d/Include/mesh_polygon.h +++ b/C3d/Include/mesh_polygon.h @@ -51,7 +51,7 @@ public: // \ru Общие функции примитива. \en Common functions of the primitive. virtual MbePrimitiveType IsA() const; // \ru Вернуть тип объекта \en Get the object type. - virtual MbExactPolygon3D & Duplicate( MbRegDuplicate * iReg = c3d_null ) const; // \ru Создать копию объекта \en Create a copy of the object + virtual MbExactPolygon3D & Duplicate( MbRegDuplicate * iReg = NULL ) const; // \ru Создать копию объекта \en Create a copy of the object virtual void Transform( const MbMatrix3D & ); // \ru Преобразовать полигон согласно матрице \en Transform polygon according to the matrix virtual void Move ( const MbVector3D & ); // \ru Сдвиг полигона \en Translation of the polygon. virtual void Rotate ( const MbAxis3D &, double angle ); // \ru Поворот полигона вокруг оси \en Rotation of the polygon around an axis @@ -177,7 +177,7 @@ public: // \ru Общие функции примитива. \en Common functions of the primitive. virtual MbePrimitiveType IsA() const; // \ru Вернуть тип объекта \en Get the object type. - virtual MbFloatPolygon3D & Duplicate( MbRegDuplicate * iReg = c3d_null ) const; // \ru Создать копию объекта \en Create a copy of the object + virtual MbFloatPolygon3D & Duplicate( MbRegDuplicate * iReg = NULL ) const; // \ru Создать копию объекта \en Create a copy of the object virtual void Transform( const MbMatrix3D & ); // \ru Преобразовать полигон согласно матрице \en Transform polygon according to the matrix virtual void Move ( const MbVector3D & ); // \ru Сдвиг полигона \en Translation of the polygon. virtual void Rotate ( const MbAxis3D &, double angle ); // \ru Поворот полигона вокруг оси \en Rotation of the polygon around an axis diff --git a/C3d/Include/mesh_primitive.h b/C3d/Include/mesh_primitive.h index 31fdd9f..2dfc6f2 100644 --- a/C3d/Include/mesh_primitive.h +++ b/C3d/Include/mesh_primitive.h @@ -29,7 +29,6 @@ class MATH_CLASS MbPolygon3D; class MATH_CLASS MbPolygon; class MATH_CLASS MbFloatAxis3D; class MATH_CLASS MbFloatPoint3D; -class MATH_CLASS MbGrid; namespace c3d // namespace C3D @@ -37,9 +36,6 @@ namespace c3d // namespace C3D typedef SPtr PrimitiveSPtr; typedef SPtr ConstPrimitiveSPtr; -typedef SPtr GridSPtr; -typedef SPtr ConstGridSPtr; - typedef std::vector PrimitivesVector; typedef std::vector ConstPrimitivesVector; @@ -55,12 +51,6 @@ typedef std::set ConstPrimitivesSet; typedef ConstPrimitivesSet::iterator ConstPrimitivesSetIt; typedef ConstPrimitivesSet::const_iterator ConstPrimitivesSetConstIt; typedef std::pair ConstPrimitivesSetRet; - -typedef std::vector GridsVector; -typedef std::vector ConstGridsVector; - -typedef std::vector GridsSPtrVector; -typedef std::vector ConstGridsSPtrVector; } @@ -148,7 +138,7 @@ public: \return \ru Копия объекта. \en The object copy. \~ */ - virtual MbPrimitive & Duplicate( MbRegDuplicate * iReg = c3d_null ) const = 0; + virtual MbPrimitive & Duplicate( MbRegDuplicate * iReg = NULL ) const = 0; /** \brief \ru Преобразовать примитив согласно матрице. \en Transform primitive according to the matrix. \~ @@ -245,13 +235,13 @@ public: bool NearestType( MbeSpaceType sType, MbeTopologyType tType, MbePlaneType pType ) const; /// \ru Получить пространственный объект, для которого построен примитив. \en Get spatial object for which the primitive is constructed. - const MbSpaceItem * SpaceItem() const { return ((parentItem != c3d_null && parentItem->RefType() == rt_SpaceItem) ? (const MbSpaceItem *)parentItem : c3d_null); } + const MbSpaceItem * SpaceItem() const { return ((parentItem != NULL && parentItem->RefType() == rt_SpaceItem) ? (const MbSpaceItem *)parentItem : NULL); } /// \ru Получить двумерный объект, для которого построен примитив. \en Get two-dimensional object for which the primitive is constructed. - const MbPlaneItem * PlaneItem() const { return ((parentItem != c3d_null && parentItem->RefType() == rt_PlaneItem) ? (const MbPlaneItem *)parentItem : c3d_null); } + const MbPlaneItem * PlaneItem() const { return ((parentItem != NULL && parentItem->RefType() == rt_PlaneItem) ? (const MbPlaneItem *)parentItem : NULL); } /// \ru Получить топологический объект, для которого построен примитив. \en Get the topological object for which the primitive is constructed. - const MbTopItem * TopItem() const { return ((parentItem != c3d_null && parentItem->RefType() == rt_TopItem) ? (const MbTopItem *)parentItem : c3d_null); } + const MbTopItem * TopItem() const { return ((parentItem != NULL && parentItem->RefType() == rt_TopItem) ? (const MbTopItem *)parentItem : NULL); } /// \ru Получить объект геометрической модели, для которого построен примитив. \en Get geometric model object for which the primitive is constructed. - const MbItem * Item() const { return ((parentItem != c3d_null && parentItem->RefType() == rt_SpaceItem) ? (static_cast(parentItem)) : c3d_null); } + const MbItem * Item() const { return ((parentItem != NULL && parentItem->RefType() == rt_SpaceItem) ? (static_cast(parentItem)) : NULL); } /// \ru Чтение примитива из потока. \en Reading of primitive from the stream. void PrimitiveRead ( reader & in ); @@ -290,7 +280,7 @@ public: // \ru Общие функции примитива. \en Common functions of the primitive. virtual MbePrimitiveType Type() const; // \ru Тип объекта. \en A type of an object. virtual MbePrimitiveType IsA() const = 0; // \ru Тип объекта. \en A type of an object. - virtual MbApex3D & Duplicate( MbRegDuplicate * iReg = c3d_null ) const = 0; // \ru Создать копию объекта. \en Create a copy of the object. + virtual MbApex3D & Duplicate( MbRegDuplicate * iReg = NULL ) const = 0; // \ru Создать копию объекта. \en Create a copy of the object. virtual void Transform( const MbMatrix3D & matr ) = 0; // \ru Преобразовать согласно матрице. \en Transform according to the matrix. virtual void Move ( const MbVector3D & to ) = 0; // \ru Сдвинуть вдоль вектора. \en Translate along a vector. virtual void Rotate ( const MbAxis3D & axis, double angle ) = 0; // \ru Повернуть вокруг оси на угол. \en Rotate about an axis by an angle. @@ -355,7 +345,7 @@ public: // \ru Общие функции примитива. \en Common functions of the primitive. virtual MbePrimitiveType IsA() const; // \ru Тип объекта. \en A type of an object. - virtual MbExactApex3D & Duplicate( MbRegDuplicate * iReg = c3d_null ) const; // \ru Создать копию объекта. \en Create a copy of the object. + virtual MbExactApex3D & Duplicate( MbRegDuplicate * iReg = NULL ) const; // \ru Создать копию объекта. \en Create a copy of the object. virtual void Transform( const MbMatrix3D & matr ); // \ru Преобразовать согласно матрице. \en Transform according to the matrix. virtual void Move ( const MbVector3D & to ); // \ru Сдвинуть вдоль вектора. \en Translate along a vector. virtual void Rotate ( const MbAxis3D & axis, double angle ); // \ru Повернуть вокруг оси на угол. \en Rotate about an axis by an angle. @@ -421,7 +411,7 @@ public: // \ru Общие функции примитива. \en Common functions of the primitive. virtual MbePrimitiveType IsA() const; // \ru Тип объекта. \en A type of an object. - virtual MbFloatApex3D & Duplicate( MbRegDuplicate * iReg = c3d_null ) const; // \ru Создать копию объекта. \en Create a copy of the object. + virtual MbFloatApex3D & Duplicate( MbRegDuplicate * iReg = NULL ) const; // \ru Создать копию объекта. \en Create a copy of the object. virtual void Transform( const MbMatrix3D & matr ); // \ru Преобразовать согласно матрице. \en Transform according to the matrix. virtual void Move ( const MbVector3D & to ); // \ru Сдвинуть вдоль вектора. \en Translate along a vector. virtual void Rotate ( const MbAxis3D & axis, double angle ); // \ru Повернуть вокруг оси на угол. \en Rotate about an axis by an angle. @@ -492,7 +482,7 @@ public: // \ru Общие функции примитива. \en Common functions of the primitive. virtual MbePrimitiveType Type() const; // \ru Вернуть тип объекта \en Get the object type. virtual MbePrimitiveType IsA() const = 0; // \ru Вернуть тип объекта \en Get the object type. - virtual MbPolygon3D & Duplicate( MbRegDuplicate * iReg = c3d_null ) const = 0; // \ru Создать копию объекта \en Create a copy of the object + virtual MbPolygon3D & Duplicate( MbRegDuplicate * iReg = NULL ) const = 0; // \ru Создать копию объекта \en Create a copy of the object virtual void Transform( const MbMatrix3D & ) = 0; // \ru Преобразовать полигон согласно матрице \en Transform polygon according to the matrix virtual void Move ( const MbVector3D & ) = 0; // \ru Сдвиг полигона \en Translation of the polygon. virtual void Rotate ( const MbAxis3D &, double angle ) = 0; // \ru Поворот полигона вокруг оси \en Rotation of the polygon around an axis @@ -670,7 +660,7 @@ public: \{ */ virtual MbePrimitiveType Type() const; // \ru Тип объекта. \en A type of an object. virtual MbePrimitiveType IsA() const = 0;; // \ru Тип объекта. \en A type of an object. - virtual MbGrid & Duplicate( MbRegDuplicate * iReg = c3d_null ) const = 0; // \ru Создать копию объекта. \en Create a copy of the object. + virtual MbGrid & Duplicate( MbRegDuplicate * iReg = NULL ) const = 0; // \ru Создать копию объекта. \en Create a copy of the object. virtual void Transform( const MbMatrix3D & matr ) = 0; // \ru Преобразовать сетку согласно матрице. \en Transform mesh according to the matrix. virtual void Move ( const MbVector3D & to ) = 0; // \ru Сдвиг сетки. \en Move mesh. virtual void Rotate ( const MbAxis3D & axis, double angle ) = 0; // \ru Поворот сетки вокруг оси. \en Rotation of mesh about an axis. @@ -1009,9 +999,9 @@ public: virtual void Init( const MbGrid & grid ) = 0; /// \ru Выдать адрес начала массива. \en Get the address of the beginning of the array. - const MbTriangle * GetTrianglesAddr() const { return (!triangles.empty() ? &(triangles[0]) : c3d_null); } + const MbTriangle * GetTrianglesAddr() const { return (!triangles.empty() ? &(triangles[0]) : NULL); } /// \ru Выдать адрес начала массива. \en Get the address of the beginning of the array. - const MbQuadrangle * GetQuadranglesAddr() const { return (!quadrangles.empty() ? &(quadrangles[0]) : c3d_null); } + const MbQuadrangle * GetQuadranglesAddr() const { return (!quadrangles.empty() ? &(quadrangles[0]) : NULL); } /// \ru Выдать адрес начала массива. \en Get the address of the beginning of the array. virtual const MbCartPoint3D * GetExactPointsAddr() const = 0; /// \ru Выдать адрес начала массива. \en Get the address of the beginning of the array. diff --git a/C3d/Include/mip_curve_properties.h b/C3d/Include/mip_curve_properties.h index d6a3bad..c7dded8 100644 --- a/C3d/Include/mip_curve_properties.h +++ b/C3d/Include/mip_curve_properties.h @@ -113,9 +113,9 @@ inline void MIProperties::Init() { \ingroup Inertia_Computation */ // --- -MATH_FUNC (void) MassInertiaProperties( const MbCurve * curve, - MIProperties & mp, - double deviateAngle = Math::deviateSag ); +MATH_FUNC (void) MassInertiaProperties( const MbCurve * curve, + MIProperties & mp, + double deviateAngle = Math::deviateSag ); //------------------------------------------------------------------------------ @@ -141,9 +141,9 @@ MATH_FUNC (void) MassInertiaProperties( const MbCurve * curve, */ // --- MATH_FUNC (void) MassInertiaProperties( const RPArray & curves, - const c3d::BoolVector & bodies, - MIProperties & mp, - double deviateAngle = Math::deviateSag ); + const SArray & bodies, + MIProperties & mp, + double deviateAngle = Math::deviateSag ); //------------------------------------------------------------------------------ diff --git a/C3d/Include/mip_solid_mass_inertia.h b/C3d/Include/mip_solid_mass_inertia.h index f1b360a..881f1a9 100644 --- a/C3d/Include/mip_solid_mass_inertia.h +++ b/C3d/Include/mip_solid_mass_inertia.h @@ -332,7 +332,7 @@ private : const MbSolid & solid; ///< \ru Тело. \en A solid. double density; ///< \ru Плотность или удельная масса на единицу площади. \en Density or mass per unit square. MbMatrix3D matrix; ///< \ru Матрица преобразования тела в систему ближайшей сборки (хозяина). \en A matrix of solid transformation to the coordinate system of nearest assembly (owner). - InertiaProperties * properties; ///< \ru Характеристики тела (может быть c3d_null). \en Solid properties (can be c3d_null). + InertiaProperties * properties; ///< \ru Характеристики тела (может быть NULL). \en Solid properties (can be NULL). bool ready; ///< \ru Флаг, показывающий, что характеристики не требуется считать. \en Flag of already calculated properties. public: @@ -395,7 +395,7 @@ public: \en A run progress indicator. For termination of slow computations. \~ */ void CalculateAdditiveValues( double deviateAngle, InertiaProperties & mp, - IfProgressIndicator * progress = c3d_null ) const; + IfProgressIndicator * progress = NULL ) const; /** \} */ // \ru Объявление конструктора копирования и оператора присваивания без реализации, чтобы не было присваивания по умолчанию. \en The declaration without Implementation of the copy constructor and assignment operator to prevent an assignment by default. @@ -416,7 +416,7 @@ private : RPArray assemblies; ///< \ru Подсборки. \en Subassemblies. RPArray solids; ///< \ru Тела сборки. \en Solids in an assembly. MbMatrix3D matrix; ///< \ru Матрица преобразования сборки в систему ближайшей сборки (хозяина). \en A matrix of assembly transformation to the coordinate system of nearest assembly (owner). - InertiaProperties * properties; ///< \ru Характеристики сборки (может быть c3d_null). \en Assembly properties (can be c3d_null). + InertiaProperties * properties; ///< \ru Характеристики сборки (может быть NULL). \en Assembly properties (can be NULL). bool ready; ///< \ru Характеристики не требуется считать. \en Properties already calculated. public: @@ -488,7 +488,7 @@ public: \en A run progress indicator. For termination of slow computations. \~ */ void CalculateAdditiveValues( double deviateAngle, InertiaProperties & mp, - IfProgressIndicator * progress = c3d_null ) const; + IfProgressIndicator * progress = NULL ) const; /** \} */ // \ru Объявление конструктора копирования и оператора присваивания без реализации, чтобы не было присваивания по умолчанию. \en The declaration without Implementation of the copy constructor and assignment operator to prevent an assignment by default. @@ -516,11 +516,11 @@ public: \ingroup Inertia_Computation */ // --- -MATH_FUNC (void) MassInertiaProperties( const MbSolid * solid, - double density, - double deviateAngle, // (0.35 - 0.01) - InertiaProperties & mp, - IfProgressIndicator * progress = c3d_null ); +MATH_FUNC (void) MassInertiaProperties( const MbSolid * solid, + double density, + double deviateAngle, // (0.35 - 0.01) + InertiaProperties & mp, + IfProgressIndicator * progress = NULL ); //------------------------------------------------------------------------------ @@ -540,9 +540,9 @@ MATH_FUNC (void) MassInertiaProperties( const MbSolid * solid, Количество элементов в массиве должно совпадать с количеством тел. \en Matrices of solids transformation to global coordinate system.\n Count of elements in array must be equal to count of solids. \~ - \param[in] mpSolids - \ru Имеющиеся характеристики тел. Может содержать c3d_null.\n + \param[in] mpSolids - \ru Имеющиеся характеристики тел. Может содержать NULL.\n Количество элементов в массиве должно совпадать с количеством тел. - \en Calculated properties of solids. Can contain c3d_null.\n + \en Calculated properties of solids. Can contain NULL.\n Count of elements in array must be equal to count of solids. \~ \param[in] deviateAngle - \ru Параметр управления точностью расчёта - угловое отклонение нормали поверхности или касательных кривой на участке численного интегрирования. \en Tolerance - the angular deviation of surface or curve in the neighboring points on the region of numerical integration. \~ @@ -553,13 +553,13 @@ MATH_FUNC (void) MassInertiaProperties( const MbSolid * solid, \ingroup Inertia_Computation */ // --- -MATH_FUNC (void) MassInertiaProperties( const RPArray & solids, - const SArray & densities, - const SArray & matrs, +MATH_FUNC (void) MassInertiaProperties( const RPArray & solids, + const SArray & densities, + const SArray & matrs, const RPArray & mpSolids, - double deviateAngle, // (0.35 - 0.01) - InertiaProperties & mp, - IfProgressIndicator * progress = c3d_null ); + double deviateAngle, // (0.35 - 0.01) + InertiaProperties & mp, + IfProgressIndicator * progress = NULL ); //------------------------------------------------------------------------------ @@ -580,10 +580,10 @@ MATH_FUNC (void) MassInertiaProperties( const RPArray & solid \ingroup Inertia_Computation */ // --- -MATH_FUNC (void) MassInertiaProperties( const AssemblyMIAttire & assembly, - double deviateAngle, // (0.35 - 0.01) - InertiaProperties & mp, - IfProgressIndicator * progress = c3d_null ); +MATH_FUNC (void) MassInertiaProperties( const AssemblyMIAttire & assembly, + double deviateAngle, // (0.35 - 0.01) + InertiaProperties & mp, + IfProgressIndicator * progress = NULL ); //------------------------------------------------------------------------------ @@ -593,7 +593,7 @@ MATH_FUNC (void) MassInertiaProperties( const AssemblyMIAttire & assembly, \en Calculation mass-inertial properties of polygonal object. \~ \note \ru В многопоточном режиме выполняется параллельно. \en In multithreaded mode runs in parallel. \~ - \param[in] mesh - \ru Полигональный объект. + \param[in] solid - \ru Полигональный объект. \en A polygonal object. \~ \param[in] density - \ru Плотность или удельная масса на единицу площади. \en Density or mass per unit square. \~ @@ -602,9 +602,9 @@ MATH_FUNC (void) MassInertiaProperties( const AssemblyMIAttire & assembly, \ingroup Inertia_Computation */ // --- -MATH_FUNC (void) MassInertiaProperties( const MbMesh * mesh, - double density, - InertiaProperties & mp ); +MATH_FUNC (void) MassInertiaProperties( const MbMesh * mesh, + double density, + InertiaProperties & mp ); //------------------------------------------------------------------------------ @@ -614,13 +614,13 @@ MATH_FUNC (void) MassInertiaProperties( const MbMesh * mesh, \en Calculation of mass-inertial properties of polygonal objects. \~ \note \ru В многопоточном режиме выполняется параллельно. \en In multithreaded mode runs in parallel. \~ - \param[in] meshes - \ru Множество полигональных объектов. + \param[in] solids - \ru Множество полигональных объектов. \en Set of polygonal objects. \~ \param[in] densities - \ru Плотности объектов или удельная масса на единицу площади.\n Количество элементов в массиве должно совпадать с количеством объектов. \en Density of solids or mass per unit square of polygonal objects.\n Count of elements in array must be equal to count of polygonal objects. \~ - \param[in] matrices - \ru Матрицы преобразования полигональных объектов в глобальную систему координат.\n + \param[in] matrs - \ru Матрицы преобразования полигональных объектов в глобальную систему координат.\n Количество элементов в массиве должно совпадать с количеством объектов. \en Matrices of solids transformation to global coordinate system.\n Count of elements in array must be equal to count of polygonal objects. \~ @@ -629,10 +629,10 @@ MATH_FUNC (void) MassInertiaProperties( const MbMesh * mesh, \ingroup Inertia_Computation */ // --- -MATH_FUNC (void) MassInertiaProperties( const std::vector & meshes, - const std::vector & densities, - const std::vector & matrices, - InertiaProperties & mp ); +MATH_FUNC (void) MassInertiaProperties( const std::vector & solids, + const std::vector & densities, + const std::vector & matrix, + InertiaProperties & mp ); #endif // __MIP_SOLID_MASS_INERTIA_H diff --git a/C3d/Include/model.h b/C3d/Include/model.h index 655ef74..32062f1 100644 --- a/C3d/Include/model.h +++ b/C3d/Include/model.h @@ -83,13 +83,13 @@ public : virtual MbeImplicationType ImplicationType() const; /// \ru Создать копию. \en Create a copy. - MbModel & Duplicate( MbRegDuplicate * = c3d_null ) const; + MbModel & Duplicate( MbRegDuplicate * = NULL ) const; /// \ru Преобразовать согласно матрице. \en Transform according to the matrix. - void Transform( const MbMatrix3D &, MbRegTransform * iReg = c3d_null ); + void Transform( const MbMatrix3D &, MbRegTransform * iReg = NULL ); /// \ru Сдвинуть вдоль вектора. \en Translate along a vector. - void Move ( const MbVector3D &, MbRegTransform * iReg = c3d_null ); + void Move ( const MbVector3D &, MbRegTransform * iReg = NULL ); /// \ru Повернуть вокруг оси. \en Rotate about an axis. - void Rotate ( const MbAxis3D &, double angle, MbRegTransform * iReg = c3d_null ); + void Rotate ( const MbAxis3D &, double angle, MbRegTransform * iReg = NULL ); /// \ru Вычислить расстояние до точки. \en Calculate the distance to a point. double DistanceToPoint ( const MbCartPoint3D & ) const; /// \ru Добавь свой габарит в габаритный куб. \en Include your own bounding box into bounding box. @@ -459,11 +459,11 @@ public : \en General-purpose algorithm traversing the model graph in depth. */ void Traverse( ItModelVisitor & ) const; /// \ru Преобразовать селектирование объекты по матрице. \en Transform selected objects by matrix. - void TransformSelected( const MbMatrix3D &, MbRegTransform * = c3d_null ); + void TransformSelected( const MbMatrix3D &, MbRegTransform * = NULL ); /// \ru Сдвинуть выбранные объекты. \en Move selected objects. - void MoveSelected( const MbVector3D &, MbRegTransform * = c3d_null ); + void MoveSelected( const MbVector3D &, MbRegTransform * = NULL ); /// \ru Повернуть выбранные объекты вокруг оси. \en Rotate selected objects around an axis. - void RotateSelected( const MbAxis3D &, double angle, MbRegTransform * = c3d_null ); + void RotateSelected( const MbAxis3D &, double angle, MbRegTransform * = NULL ); /** \brief \ru Отцепить все выбранные объекты. \en Detach all selected objects. \~ @@ -592,7 +592,7 @@ void MbModel::GetItems( Items & items ) const { items.reserve( modelItems.size() ); for ( NameItemArray::const_iterator iter = modelItems.begin(); iter != modelItems.end(); ++iter ) { - if ( iter->second != c3d_null ) + if ( iter->second != NULL ) items.push_back( iter->second ); } } @@ -608,7 +608,7 @@ void MbModel::DetachItems( Items & items ) NameItemArray::const_iterator endItem = modelItems.end(); for ( ; iter != endItem; ++iter ) { MbItem * item = iter->second; - if ( item != c3d_null ) { + if ( item != NULL ) { item->DecRef(); items.push_back( item ); } diff --git a/C3d/Include/model_item.h b/C3d/Include/model_item.h index 9b15f46..f426b35 100644 --- a/C3d/Include/model_item.h +++ b/C3d/Include/model_item.h @@ -118,10 +118,10 @@ public : virtual MbeSpaceType Type() const; // \ru Групповой тип объекта. \en Group type of object. virtual MbeSpaceType Family() const; // \ru Семейство объекта. \en Family of object. virtual MbeImplicationType ImplicationType() const; // \ru Тип контейнера атрибутов - классификатор наследников. \en Type of an attribute container is a classifier of inheritors. - virtual MbSpaceItem & Duplicate ( MbRegDuplicate * = c3d_null ) const = 0; // \ru Создать копию. \en Create a copy. - virtual void Transform( const MbMatrix3D &, MbRegTransform * = c3d_null ) = 0; // \ru Преобразовать согласно матрице. \en Transform according to the matrix. - virtual void Move ( const MbVector3D &, MbRegTransform * = c3d_null ) = 0; // \ru Сдвинуть вдоль вектора. \en Translate along a vector. - virtual void Rotate ( const MbAxis3D &, double angle, MbRegTransform * = c3d_null ) = 0; // \ru Повернуть вокруг оси. \en Rotate about an axis. + virtual MbSpaceItem & Duplicate ( MbRegDuplicate * = NULL ) const = 0; // \ru Создать копию. \en Create a copy. + virtual void Transform( const MbMatrix3D &, MbRegTransform * = NULL ) = 0; // \ru Преобразовать согласно матрице. \en Transform according to the matrix. + virtual void Move ( const MbVector3D &, MbRegTransform * = NULL ) = 0; // \ru Сдвинуть вдоль вектора. \en Translate along a vector. + virtual void Rotate ( const MbAxis3D &, double angle, MbRegTransform * = NULL ) = 0; // \ru Повернуть вокруг оси. \en Rotate about an axis. virtual bool IsSame ( const MbSpaceItem & other, double accuracy = LENGTH_EPSILON ) const = 0; // \ru Являются ли объекты равными? \en Are the objects equal? virtual bool SetEqual ( const MbSpaceItem & init ) = 0; // \ru Сделать объекты равными. \en Make the objects equal. virtual double DistanceToPoint ( const MbCartPoint3D & ) const = 0; // \ru Вычислить расстояние до точки. \en Calculate the distance to a point. @@ -171,8 +171,8 @@ public : \en Create object by the history tree. \~ \param[in] sameShell - \ru Полнота копирования элементов. \en Whether to perform complete copying of elements while constructing. \~ - \param[out] items - \ru Контейнер для складывания элементов невыполненных построений (может быть c3d_null). - \en Container for the elements of not performed constructions (can be c3d_null). \~ + \param[out] items - \ru Контейнер для складывания элементов невыполненных построений (может быть NULL). + \en Container for the elements of not performed constructions (can be NULL). \~ \return \ru Перестроен ли объект. \en Whether an object is constructed. \~ \ingroup Model_Items @@ -229,8 +229,8 @@ public : If 'distance' is less than or equal to zero, then the function "cuts" an object only by one XY plane of local coordinate system.\n Contents of an object that are necessary for creation of cut object and not affected by cutting planes are added to returned cut object without copying.\n \~ - \param[in] cutPlace - \ru Локальная система координат, плоскость XY которой задаёт режущую плоскость. - \en A local coordinate system which XY plane defines a cutting plane. \~ + \param[in] place - \ru Локальная система координат, плоскость XY которой задаёт режущую плоскость. + \en A local coordinate system which XY plane defines a cutting plane. \~ \param[in] distance - \ru Расстояние до параллельной режущей плоскости откладывается в отрицательную сторону оси Z локальной системы. \en Distance to a parallel cutting plane is measured in negative direction of Z-axis of local coordinate system. \~ \result \ru Возвращает новый полигональный объект, лежащий под плоскость XY локальной системы координат на заданном расстоянии. @@ -437,7 +437,7 @@ public : \en Registrator. \~ \ingroup Model_Items */ - virtual void TransformSelected( const MbMatrix3D & matr, MbRegTransform * iReg = c3d_null ); + virtual void TransformSelected( const MbMatrix3D & matr, MbRegTransform * iReg = NULL ); /** \brief \ru Сдвинуть выбранный объект вдоль вектора. \en Move selected object along a vector. \~ @@ -451,7 +451,7 @@ public : \en Registrator. \~ \ingroup Model_Items */ - virtual void MoveSelected( const MbVector3D & to, MbRegTransform * iReg = c3d_null ); + virtual void MoveSelected( const MbVector3D & to, MbRegTransform * iReg = NULL ); /** \brief \ru Повернуть выбранный объект вокруг оси на заданный угол. \en Rotate selected object by a given angle about an axis. \~ @@ -467,7 +467,7 @@ public : \en Registrator. \~ \ingroup Model_Items */ - virtual void RotateSelected( const MbAxis3D & axis, double angle, MbRegTransform * iReg = c3d_null ); + virtual void RotateSelected( const MbAxis3D & axis, double angle, MbRegTransform * iReg = NULL ); /// \ru Дать матрицу преобразования из локальной системы объекта. \en Get transform matrix from local coordinate system of object. virtual bool GetMatrixFrom( MbMatrix3D & from ) const; @@ -559,7 +559,7 @@ bool DeleteCreatorsCopies( ItemsVector & items, double eps = LENGTH_EPSILON ) if ( itemsCnt > 1 ) { for ( size_t i = 0; i < itemsCnt; ++i ) { MbItem * item1 = items[i]; - if ( item1 == c3d_null ) + if ( item1 == NULL ) continue; creators1.clear(); item1->GetCreators( creators1 ); @@ -568,7 +568,7 @@ bool DeleteCreatorsCopies( ItemsVector & items, double eps = LENGTH_EPSILON ) if ( creatorsCnt1 > 0 ) { for ( size_t j = i + 1; j < itemsCnt; ++j ) { MbItem * item2 = items[j]; - if ( item2 == c3d_null ) + if ( item2 == NULL ) continue; creators2.clear(); item2->GetCreators( creators2 ); @@ -578,11 +578,11 @@ bool DeleteCreatorsCopies( ItemsVector & items, double eps = LENGTH_EPSILON ) bool replace = false; for ( size_t k1 = 0; k1 < creatorsCnt1; ++k1 ) { MbCreator * creator1 = creators1[k1]; - if ( creator1 == c3d_null ) + if ( creator1 == NULL ) continue; for ( size_t k2 = k1 + 1; k2 < creatorsCnt2; ++k2 ) { MbCreator * creator2 = creators2[k2]; - if ( creator2 == c3d_null ) + if ( creator2 == NULL ) continue; if ( (creator1 != creator2) && creator1->IsSame( *creator2, eps ) ) { creators2[k2] = creators1[k1]; diff --git a/C3d/Include/model_tree.h b/C3d/Include/model_tree.h index 8eb3674..51430ba 100644 --- a/C3d/Include/model_tree.h +++ b/C3d/Include/model_tree.h @@ -140,7 +140,7 @@ public: virtual const IModelTreeNode * GetModelTreeNode() const { return m_subtree; } // \ru Доступ к информации об исполнении. \en Access to the embodiment info. - virtual const MbItemData& GetEmbodimentData() const { C3D_ASSERT( m_subtree != c3d_null ); return m_subtree->GetData(); } + virtual const MbItemData& GetEmbodimentData() const { C3D_ASSERT( m_subtree != NULL ); return m_subtree->GetData(); } // \ru Построить дерево модели, которое содержится в данном исполнении. // \en Build a tree of a model which is contained in a given embodiment. @@ -197,13 +197,13 @@ public: // \en Build a tree with nodes, selected by filters. In case of embodiment tree, the function works with the first embodiment. virtual std_unique_ptr GetFilteredTree ( const std::vector& filters ) const; - // \ru Построить дерево по заданным узлам. Не применимо для дерева исполнений (в этом случае возвращает c3d_null). - // \en Build a tree for given nodes. Not applicable to embodiment tree (in this case, returns c3d_null). + // \ru Построить дерево по заданным узлам. Не применимо для дерева исполнений (в этом случае возвращает NULL). + // \en Build a tree for given nodes. Not applicable to embodiment tree (in this case, returns NULL). virtual std_unique_ptr GetFilteredTree ( std::vector& nodes ) const; - // \ru Выдать указатель на дерево исполнений. Выдает c3d_null, если не применимо (нет исполнений). - // \en Get pointer to embodiments tree. Return c3d_null if not applicable (no embodiments). - virtual const IEmbodimentTree* GetEmbodimentsTree() const { return GetType() == mtt_Embodiment ? &m_embTree : c3d_null; } + // \ru Выдать указатель на дерево исполнений. Выдает NULL, если не применимо (нет исполнений). + // \en Get pointer to embodiments tree. Return NULL if not applicable (no embodiments). + virtual const IEmbodimentTree* GetEmbodimentsTree() const { return GetType() == mtt_Embodiment ? &m_embTree : NULL; } /// \ru Версия дерева. \en Tree version. virtual VERSION GetVersion() { return m_currentVersion; } @@ -225,7 +225,7 @@ public: /// \param node - a node with data. /// \param added - filled if non-null (true - if a node added, false - a node already exists). /// \return - a pointer to the tree node. - MbTreeNode* AddNode ( const MbTreeNode& node, bool* added = c3d_null ); + MbTreeNode* AddNode ( const MbTreeNode& node, bool* added = NULL ); /// \ru Добавить узел с указанными данными, если узел с такими данными не существует. /// \param node - данные. @@ -235,7 +235,7 @@ public: /// \param node - a data. /// \param added - filled if non-null (true - if a node added, false - a node already exists). /// \return - a pointer to the tree node. - MbTreeNode* AddNode ( const MbItemData& data, bool* added = c3d_null ); + MbTreeNode* AddNode ( const MbItemData& data, bool* added = NULL ); /// \ru Доступ к узлам дерева, упорядоченным по данным. /// \en Access to nodes of the tree, ordered by data. diff --git a/C3d/Include/model_tree_data.h b/C3d/Include/model_tree_data.h index 94c3ec9..5907391 100644 --- a/C3d/Include/model_tree_data.h +++ b/C3d/Include/model_tree_data.h @@ -151,8 +151,8 @@ public: //---------------------------------------------------------------------------------------- -/// \ru Создать объект пользовательских данных для атрибута. Возвращает c3d_null, если данный атрибут не поддерживается деревом модели. -/// \en Create user data object for the attribute. Return c3d_null if this attribute is not supported in the model tree. +/// \ru Создать объект пользовательских данных для атрибута. Возвращает NULL, если данный атрибут не поддерживается деревом модели. +/// \en Create user data object for the attribute. Return NULL if this attribute is not supported in the model tree. //--- MATH_FUNC( ItemDataBase* ) CreateAttributeData( MbAttribute* attr ); @@ -800,8 +800,8 @@ inline writer& operator << ( writer & out, const UserDataMap& itemmap ) while ( !curIter.Empty() ) { MbeItemDataType type = curIter.Key(); ItemDataBase* item = curIter.Value(); - C3D_ASSERT( type < idtCount && item != c3d_null ); - if ( type < idtCount && item != c3d_null ) { + C3D_ASSERT( type < idtCount && item != NULL ); + if ( type < idtCount && item != NULL ) { out << (int)type; // \ru Тип данных. \en A data type. size_t dataSize = item->Size( out ); ::WriteCOUNT( out, dataSize );// \ru Размер данных. \en Data size. diff --git a/C3d/Include/mt_ref_item.h b/C3d/Include/mt_ref_item.h index 4f6d927..d83e083 100644 --- a/C3d/Include/mt_ref_item.h +++ b/C3d/Include/mt_ref_item.h @@ -12,11 +12,6 @@ #include -#if defined (C3D_WINDOWS ) && !defined(ALL_WARNINGS) //_MSC_VER // Set warnings level -#pragma warning(disable: 4275) //AP non dll-interface class '1' used as base for dll-interface class '2' (deriving exported from non-exported) -#endif - - ////////////////////////////////////////////////////////////////////////////////////////// /** \brief \ru Базовый класс для объектов с подсчетом ссылок. @@ -26,7 +21,7 @@ */ ////////////////////////////////////////////////////////////////////////////////////////// -class MtRefItem +class MATH_CLASS MtRefItem { mutable refcount_t useCount; diff --git a/C3d/Include/multiline.h b/C3d/Include/multiline.h index d3f646e..cb8e0b8 100644 --- a/C3d/Include/multiline.h +++ b/C3d/Include/multiline.h @@ -441,7 +441,7 @@ public: // --- class MATH_CLASS MbMultiline : public MbPlaneItem { private: - MbContour * basisCurve; ///< \ru Базовая кривая (БК) (всегда не c3d_null). \en Base curve (BC) (always not c3d_null). + MbContour * basisCurve; ///< \ru Базовая кривая (БК) (всегда не NULL). \en Base curve (BC) (always not NULL). SArray vertices; ///< \ru Массив вершин мультилинии (согласован с вершинами БК). \en Array of vertices of a multiline (agreed with the vertices of the base curve). CSSArray equidRadii; ///< \ru Сортированный массив радиусов эквидистантных кривых. \en Sorted array of radii of equidistant curves. StMLTipParams begTipParams; ///< \ru Параметры законцовки в начале мультилинии (начале БК). \en Parameters of a tip at the beginning of a multiline ( the beginning of base curve). @@ -450,7 +450,7 @@ private: bool isTransparent; ///< \ru "Прозрачная" ли мультилиния. \en Whether the multiline is "transparent". // \ru Объекты, которые составляют мультилинию (рекомендовали не делать их mutable, а писать и читать) \en Objects which constitute a multiline (recommended to read and write and not to make them mutable) // \ru ЭТИ ОБЪЕКТЫ НЕЛЬЗЯ МЕНЯТЬ СНАРУЖИ!!! \en THESE OBJECTS CAN'T BE CHANGED OUTSIDE!!! - PArray curves; ///< \ru Кривые мультилинии (согласован с equidRadii) (всегда не c3d_null). \en Curves of a multiline (agreed with the 'equidRadii') (always not c3d_null). + PArray curves; ///< \ru Кривые мультилинии (согласован с equidRadii) (всегда не NULL). \en Curves of a multiline (agreed with the 'equidRadii') (always not NULL). PArray tipCurves; ///< \ru Законцовки в вершинах мультилинии (согласован с vertices). \en Tips at vertices of a multiline (agreed with 'vertices'). MbContour * begTipCurve; ///< \ru Законцовка в начале мультилинии (начале БК). \en Tip at the beginning of a multiline (beginning of the base curve). MbContour * endTipCurve; ///< \ru Законцовка в конце мультилинии (конце БК). \en Tip at the end of a multiline (end of the base curve). @@ -513,10 +513,10 @@ public: virtual bool IsSame ( const MbPlaneItem & other, double accuracy = LENGTH_EPSILON ) const; // \ru Являются ли объекты равными. \en Determine whether objects are equal. virtual bool IsSimilar ( const MbPlaneItem & item ) const; // \ru Являются ли объекты подобными. \en Determine whether the objects are similar. virtual bool SetEqual ( const MbPlaneItem & item ); // \ru Сделать объекты равными. \en Make the objects equal. - virtual void Transform ( const MbMatrix & matr, MbRegTransform * = c3d_null, const MbSurface * newSurface = c3d_null );// \ru Преобразовать объект согласно матрице. \en Transform an object according to the matrix. - virtual void Move ( const MbVector & to, MbRegTransform * = c3d_null, const MbSurface * newSurface = c3d_null );// \ru Сдвинуть объект вдоль вектора. \en Move an object along a vector. - virtual void Rotate ( const MbCartPoint & pnt, const MbDirection & angle, MbRegTransform * = c3d_null, const MbSurface * newSurface = c3d_null ); // \ru Повернуть вокруг точки на угол. \en Rotate at angle around a point. - virtual MbPlaneItem & Duplicate ( MbRegDuplicate * = c3d_null ) const; // \ru Сделать копию объекта. \en Create a copy of the object. + virtual void Transform ( const MbMatrix & matr, MbRegTransform * = NULL, const MbSurface * newSurface = NULL );// \ru Преобразовать объект согласно матрице. \en Transform an object according to the matrix. + virtual void Move ( const MbVector & to, MbRegTransform * = NULL, const MbSurface * newSurface = NULL );// \ru Сдвинуть объект вдоль вектора. \en Move an object along a vector. + virtual void Rotate ( const MbCartPoint & pnt, const MbDirection & angle, MbRegTransform * = NULL, const MbSurface * newSurface = NULL ); // \ru Повернуть вокруг точки на угол. \en Rotate at angle around a point. + virtual MbPlaneItem & Duplicate ( MbRegDuplicate * = NULL ) const; // \ru Сделать копию объекта. \en Create a copy of the object. virtual void AddYourGabaritTo( MbRect & r ) const; // \ru Добавить свой габарит в присланный габарит. \en Add your own bounding box into the given bounding box. virtual bool IsVisibleInRect ( const MbRect & r, bool exact = false ) const; // \ru Виден ли объект в заданном прям-ке. \en Whether the object is visible in the given rectangle. @@ -1319,7 +1319,7 @@ private: /// \ru Насчитать все кривые и все законцовки в вершинах. \en Calculate all curves and all tips at vertices. void CalculateCurvesAndTipCurves(); /// \ru Насчитать законцовку в начале. \en Calculate tip at the beginning. - void CalculateBegTipCurve ( SArray * changeCurvesNumbers = c3d_null ); + void CalculateBegTipCurve ( SArray * changeCurvesNumbers = NULL ); /// \ru Насчитать законцовку в конце. \en Calculate tip at the end. void CalculateEndTipCurve (); @@ -1576,7 +1576,7 @@ MATH_FUNC (bool) BreakMultilineNParts( const MbMultiline & multiline, size_t par // --- inline bool MbMultiline::IsDegenerate( double lenEps ) const { return ( (minNotDegInd == SYS_MAX_T) || // \ru Значит, и maxNotDegInd == SYS_MAX_T \en So maxNotDegInd == SYS_MAX_T - (basisCurve != c3d_null && basisCurve->IsDegenerate(lenEps)) ); + (basisCurve != NULL && basisCurve->IsDegenerate(lenEps)) ); } diff --git a/C3d/Include/name_check.h b/C3d/Include/name_check.h index ae43341..28212ab 100644 --- a/C3d/Include/name_check.h +++ b/C3d/Include/name_check.h @@ -155,7 +155,7 @@ struct NameIntersectionInfo { const MbName * name; ///< \ru Имя объектов. \en A name of objects. size_t intersections; ///< \ru Количество совпадений. \en The count of coincidences. - NameIntersectionInfo() : name( c3d_null ), intersections( 0 ) {} + NameIntersectionInfo() : name( NULL ), intersections( 0 ) {} }; diff --git a/C3d/Include/name_contour_tree.h b/C3d/Include/name_contour_tree.h index ffcad24..d1d835f 100644 --- a/C3d/Include/name_contour_tree.h +++ b/C3d/Include/name_contour_tree.h @@ -31,7 +31,7 @@ private: bool intersectChildren; // \ru Пересекаются ли внутренние контуры \en Are inner contours intersect public: /// \ru Конструктор. \en Constructor. - MbNamedContoursTree( const MbContour * con = c3d_null, bool o = true ); + MbNamedContoursTree( const MbContour * con = NULL, bool o = true ); /// \ru Деструктор. \en Destructor. ~MbNamedContoursTree(); public: @@ -40,7 +40,7 @@ public: /// \ru Получить количество деревьев. \en Get count of trees. size_t GetChildrenCount() const { return children.Count(); } /// \ru Получить дерево контуров по индексу. \en Get contour tree by an index. - const MbNamedContoursTree * GetTreeContour( size_t index ) const { return (GetChildrenCount() >= index) ? children[index] : c3d_null; } + const MbNamedContoursTree * GetTreeContour( size_t index ) const { return (GetChildrenCount() >= index) ? children[index] : NULL; } /// \ru Проверить группы контуров на не пересечение. \en Check groups of contours for absence of intersection. MbResultType CheckProfiles( bool base ) const; /// \ru Получить указатель на внешний контур. \en Get the pointer to the external contour. @@ -64,8 +64,8 @@ private: \en Get the biggest contour. \~ \details \ru Выдать самый большой контур по длине диагонали габарита. \en Get the biggest contour by bounding box diagonal length. \~ - \return \ru Возвращает указатель на найденный контур или c3d_null. - \en Returns pointer to the found contour or c3d_null. \~ + \return \ru Возвращает указатель на найденный контур или NULL. + \en Returns pointer to the found contour or NULL. \~ \ingroup Names */ // --- diff --git a/C3d/Include/name_item.h b/C3d/Include/name_item.h index 00d0c83..924d8c6 100644 --- a/C3d/Include/name_item.h +++ b/C3d/Include/name_item.h @@ -789,7 +789,7 @@ public: \param[in] copy - \ru Имя копии. \en The name of the copy. \~ */ - MbNamePair( const MbName * copy ) : gageName( c3d_null ), copyName( copy ), copyHash( c3d::SIMPLENAME_MAX ) {} + MbNamePair( const MbName * copy ) : gageName( C3D_NULL_PTR ), copyName( copy ), copyHash( c3d::SIMPLENAME_MAX ) {} /// \ru . \en . /** \brief \ru Конструктор. \en Constructor. \~ @@ -798,13 +798,13 @@ public: \param[in] copy - \ru Хэш имени копии. \en The hash of the name of the copy. \~ */ - MbNamePair( SimpleName copy ) : gageName( c3d_null ), copyName( c3d_null ), copyHash( copy ) {} + MbNamePair( SimpleName copy ) : gageName( C3D_NULL_PTR ), copyName( C3D_NULL_PTR ), copyHash( copy ) {} /// \ru Деструктор. \en Destructor. ~MbNamePair() {} public: /// \ru Обнулить имя оригинала и имя копии. \en Set name of original and of its duplicate to null. - void SetNull() { gageName = c3d_null; copyName = c3d_null; copyHash = c3d::SIMPLENAME_MAX; } + void SetNull() { gageName = C3D_NULL_PTR; copyName = C3D_NULL_PTR; copyHash = c3d::SIMPLENAME_MAX; } /// \ru Оператор сравнения. \en Comparison operator. bool operator == ( const MbNamePair & other ) const; /// \ru Оператор меньше. \en "Less than" operator. @@ -871,8 +871,8 @@ public: */ void AddNameData( const MbName * orig, const MbName * copy ) { - C3D_ASSERT( (orig != c3d_null) && (copy != c3d_null) ); - if ( (orig != c3d_null) && (copy != c3d_null) ) { + C3D_ASSERT( (orig != C3D_NULL_PTR) && (copy != C3D_NULL_PTR) ); + if ( (orig != C3D_NULL_PTR) && (copy != C3D_NULL_PTR) ) { checkList.Add( MbNamePair( orig, copy ) ); } } @@ -973,7 +973,7 @@ public: , version() #ifdef ORIGINAL_MAIN_NAME , original( c3d::SIMPLENAME_MAX ) - , nameList( c3d_null ) + , nameList( C3D_NULL_PTR ) #endif // ORIGINAL_MAIN_NAME { defName.SetMainName( mn ); @@ -992,7 +992,7 @@ public: , version() #ifdef ORIGINAL_MAIN_NAME , original( c3d::SIMPLENAME_MAX ) - , nameList( c3d_null ) + , nameList( C3D_NULL_PTR ) #endif // ORIGINAL_MAIN_NAME { defName.MakeTemplate(); @@ -1155,11 +1155,11 @@ public: MbNameMaker GetOriginalNameMaker() const; /// \ru Удалить ненужные элементы по именам копий. \en Clean up unnecessary pairs by name copies. bool CleanNameList( c3d::ConstNamesVector & delNamesCopies ) const { - return ((nameList != c3d_null) ? nameList->Clean( delNamesCopies ) : false); + return ((nameList != C3D_NULL_PTR) ? nameList->Clean( delNamesCopies ) : false); } /// \ru Заменить имена копий. \en Replace names copies. bool ReplaceNameList( const MbName & newNameCopies, const c3d::ConstNamesVector & oldNamesCopies ) const { - return ((nameList != c3d_null) ? nameList->Replace( newNameCopies, oldNamesCopies ) : false); + return ((nameList != C3D_NULL_PTR) ? nameList->Replace( newNameCopies, oldNamesCopies ) : false); } #endif // ORIGINAL_MAIN_NAME @@ -1498,7 +1498,7 @@ reader & operator >> ( reader & in, MbPath & ref ) if ( in.good() && count ) { ref.SetSize( count, true/*clear*/ ); - if ( (ref.GetAddr() == c3d_null) && (count >= SYS_MAX_UINT32) ) // We could not allocate the required amount of memory + if ( (ref.GetAddr() == NULL) && (count >= SYS_MAX_UINT32) ) // We could not allocate the required amount of memory in.setState( io::outOfMemory ); else { for ( size_t i = 0; i < count && in.good(); ++i ) { diff --git a/C3d/Include/op_duplication_parameter.h b/C3d/Include/op_duplication_parameter.h index 4604831..440a802 100644 --- a/C3d/Include/op_duplication_parameter.h +++ b/C3d/Include/op_duplication_parameter.h @@ -110,21 +110,21 @@ public: /** \brief \ru Преобразовать параметры согласно матрице. \en Transform parameters according to the matrix. \~ */ - virtual void Transform( const MbMatrix3D &, MbRegTransform * = c3d_null ) = 0; + virtual void Transform( const MbMatrix3D &, MbRegTransform * = NULL ) = 0; /** \brief \ru Сдвинуть параметры вдоль вектора. \en Move parameters along a vector. \~ \details \ru Сдвинуть параметры вдоль вектора. \en Move parameters along a vector. \n \~ */ - virtual void Move ( const MbVector3D &, MbRegTransform * = c3d_null ) = 0; + virtual void Move ( const MbVector3D &, MbRegTransform * = NULL ) = 0; /** \brief \ru Повернуть параметры вокруг оси на заданный угол. \en Rotate parameters at a given angle around an axis. \~ \details \ru Повернуть параметры вокруг оси на заданный угол. \en Rotate parameters at a given angle around an axis. \n \~ */ - virtual void Rotate ( const MbAxis3D &, double ang, MbRegTransform * = c3d_null ) = 0; + virtual void Rotate ( const MbAxis3D &, double ang, MbRegTransform * = NULL ) = 0; /** \brief \ru Выдать свойства объекта. \en Get properties of the object. \~ @@ -152,7 +152,7 @@ public: \details \ru Построить копию объекта. \n \en Create a copy of the object. \n \~ */ - virtual DuplicationValues & Duplicate( MbRegDuplicate * = c3d_null ) const = 0; + virtual DuplicationValues & Duplicate( MbRegDuplicate * = NULL ) const = 0; /** \brief \ru Сгенерировать матрицы трансформаций. \en Generate matrices of transformations. \~ @@ -236,7 +236,7 @@ public: */ DuplicationMeshValues( bool isPolar, const MbVector3D & dir1, const double step1, const uint num1, const MbVector3D & dir2, const double step2, const uint num2, - const MbCartPoint3D * center = c3d_null, bool isAlongAxis = false ); + const MbCartPoint3D * center = NULL, bool isAlongAxis = false ); /// \ru Деструктор. \en Destructor. virtual ~DuplicationMeshValues(); @@ -248,11 +248,11 @@ public: /// \ru Тип параметров. \en Type of parameters. virtual MbeDuplicatesType Type() const; /// \ru Преобразовать сетку согласно матрице. \en Transform grid according to the matrix. - virtual void Transform( const MbMatrix3D &, MbRegTransform * = c3d_null ); + virtual void Transform( const MbMatrix3D &, MbRegTransform * = NULL ); /// \ru Сдвинуть сетку вдоль вектора. \en Move grid along a vector. - virtual void Move ( const MbVector3D &, MbRegTransform * = c3d_null ); + virtual void Move ( const MbVector3D &, MbRegTransform * = NULL ); /// \ru Повернуть сетку вокруг оси на заданный угол. \en Rotate grid at a given angle around an axis. - virtual void Rotate ( const MbAxis3D &, double ang, MbRegTransform * = c3d_null ); + virtual void Rotate ( const MbAxis3D &, double ang, MbRegTransform * = NULL ); /// \ru Выдать свойства объекта \en Get properties of the object virtual void GetProperties( MbProperties & ); @@ -263,7 +263,7 @@ public: virtual bool IsSame( const DuplicationValues &, double accuracy ) const; /// \ru Построить копию объекта. \en Create a copy of the object. - virtual DuplicationValues & Duplicate( MbRegDuplicate * = c3d_null ) const; + virtual DuplicationValues & Duplicate( MbRegDuplicate * = NULL ) const; /// \ru Сгенерировать матрицы трансформации. \en Generate matrix of transformation by. virtual void GenerateTransformMatrices( std::vector & ) const; @@ -385,11 +385,11 @@ public: /// \ru Тип параметров. \en Type of parameters. virtual MbeDuplicatesType Type() const; /// \ru Преобразовать объект согласно матрице. \en Transform an object according to the matrix. - virtual void Transform( const MbMatrix3D &, MbRegTransform * = c3d_null ); + virtual void Transform( const MbMatrix3D &, MbRegTransform * = NULL ); /// \ru Сдвинуть объект вдоль вектора. \en Move an object along a vector. - virtual void Move ( const MbVector3D &, MbRegTransform * = c3d_null ); + virtual void Move ( const MbVector3D &, MbRegTransform * = NULL ); /// \ru Повернуть объект вокруг оси на заданный угол. \en Rotate an object at a given angle around an axis. - virtual void Rotate ( const MbAxis3D &, double ang, MbRegTransform * = c3d_null ); + virtual void Rotate ( const MbAxis3D &, double ang, MbRegTransform * = NULL ); /// \ru Выдать свойства объекта \en Get properties of the object virtual void GetProperties( MbProperties & ); @@ -400,7 +400,7 @@ public: virtual bool IsSame( const DuplicationValues &, double accuracy ) const; /// \ru Построить копию объекта. \en Create a copy of the object. - virtual DuplicationValues & Duplicate( MbRegDuplicate * = c3d_null ) const; + virtual DuplicationValues & Duplicate( MbRegDuplicate * = NULL ) const; /// \ru Сгенерировать матрицы трансформации. \en Generate matrix of transformation. virtual void GenerateTransformMatrices( std::vector & ) const; diff --git a/C3d/Include/op_shell_parameter.h b/C3d/Include/op_shell_parameter.h index 52768f6..4e9bbed 100644 --- a/C3d/Include/op_shell_parameter.h +++ b/C3d/Include/op_shell_parameter.h @@ -138,7 +138,7 @@ public: } /// \ru Конструктор копирования. \en Copy-constructor. - SmoothValues( const SmoothValues & other, MbRegDuplicate * iReg = c3d_null ); + SmoothValues( const SmoothValues & other, MbRegDuplicate * iReg = NULL ); /// \ru Деструктор. \en Destructor. virtual ~SmoothValues(){} @@ -146,11 +146,11 @@ public: void Init( const SmoothValues & other ); public: /// \ru Преобразовать объект согласно матрице. \en Transform an object according to the matrix. - virtual void Transform( const MbMatrix3D &, MbRegTransform * ireg = c3d_null ); + virtual void Transform( const MbMatrix3D &, MbRegTransform * ireg = NULL ); /// \ru Сдвинуть объект вдоль вектора. \en Move an object along a vector. - virtual void Move ( const MbVector3D &, MbRegTransform * /*ireg*/ = c3d_null ){} + virtual void Move ( const MbVector3D &, MbRegTransform * /*ireg*/ = NULL ){} /// \ru Повернуть объект вокруг оси на заданный угол. \en Rotate an object at a given angle around an axis. - virtual void Rotate ( const MbAxis3D &, double ang, MbRegTransform * ireg = c3d_null ); + virtual void Rotate ( const MbAxis3D &, double ang, MbRegTransform * ireg = NULL ); /// \ru Установить плоскость, параллельно которой будет выполнена остановка скругления в начале цепочки. \en Set the plane by which parallel will be carry out stop of the fillet at the begin. bool SetStopObjectAtBeg( const MbSurface * object, bool byObject = true ); @@ -202,7 +202,7 @@ public: {} /// \ru Конструктор копирования. \en Copy-constructor. - FullFilletValues( const FullFilletValues & other, MbRegDuplicate * iReg = c3d_null ); + FullFilletValues( const FullFilletValues & other, MbRegDuplicate * iReg = NULL ); /// \ru Деструктор. \en Destructor. ~FullFilletValues(){} @@ -210,11 +210,11 @@ public: /// \ru Функция инициализации. \en Initialization function. void Init( const FullFilletValues & other ); /// \ru Преобразовать объект согласно матрице. \en Transform an object according to the matrix. - void Transform( const MbMatrix3D &, MbRegTransform * ireg = c3d_null ); + void Transform( const MbMatrix3D &, MbRegTransform * ireg = NULL ); /// \ru Сдвинуть объект вдоль вектора. \en Move an object along a vector. - void Move ( const MbVector3D &, MbRegTransform * /*ireg*/ = c3d_null ){} + void Move ( const MbVector3D &, MbRegTransform * /*ireg*/ = NULL ){} /// \ru Повернуть объект вокруг оси на заданный угол. \en Rotate an object at a given angle around an axis. - void Rotate ( const MbAxis3D &, double ang, MbRegTransform * ireg = c3d_null ); + void Rotate ( const MbAxis3D &, double ang, MbRegTransform * ireg = NULL ); /// \ru Оператор присваивания. \en Assignment operator. FullFilletValues & operator = ( const FullFilletValues & other ) { @@ -341,7 +341,7 @@ public: double placeAngle; ///< \ru Угол между осью и нормалью к поверхности (0 <= placeAngle <= M_PI_2). \en Angle between axis and normal to the surface (0 <= placeAngle <= M_PI_2). double azimuthAngle; ///< \ru Угол поворота оси вокруг нормали поверхности (-M_PI2 <= azimuthAngle <= M_PI2). \en Angle of rotation around the surface normal (-M_PI2 <= azimuthAngle <= M_PI2). protected: - MbSurface * surface; ///< \ru Обрабатываемая поверхность (если c3d_null, то считается плоской). \en Processing surface (if c3d_null, then is considered planar). + MbSurface * surface; ///< \ru Обрабатываемая поверхность (если NULL, то считается плоской). \en Processing surface (if NULL, then is considered planar). bool doPhantom; ///< \ru Создавать фантом результата операции. \en Create the phantom of the operation. protected: @@ -365,13 +365,13 @@ public: /// \ru Тип выемки. \en Type of notch. virtual MbeHoleType Type() const = 0; /// \ru Построить копию объекта. \en Create a copy of the object. - virtual HoleValues & Duplicate( MbRegDuplicate * ireg = c3d_null ) const = 0; + virtual HoleValues & Duplicate( MbRegDuplicate * ireg = NULL ) const = 0; /// \ru Преобразовать объект согласно матрице. \en Transform an object according to the matrix. - virtual void Transform( const MbMatrix3D &, MbRegTransform * ireg = c3d_null ) = 0; + virtual void Transform( const MbMatrix3D &, MbRegTransform * ireg = NULL ) = 0; /// \ru Сдвинуть объект вдоль вектора. \en Move an object along a vector. - virtual void Move ( const MbVector3D &, MbRegTransform * ireg = c3d_null ); + virtual void Move ( const MbVector3D &, MbRegTransform * ireg = NULL ); /// \ru Повернуть объект вокруг оси на заданный угол. \en Rotate an object at a given angle around an axis. - virtual void Rotate ( const MbAxis3D &, double ang, MbRegTransform * ireg = c3d_null ); + virtual void Rotate ( const MbAxis3D &, double ang, MbRegTransform * ireg = NULL ); /// \ru Являются ли объекты равными? \en Determine whether an object is equal? virtual bool IsSame( const HoleValues &, double accuracy ) const; @@ -451,7 +451,7 @@ public: // ____________/|| // /| | || // +-+----------+-++ - bt_DoubleCylinder = 6, ///< \ru Двойное цилиндрическое отверстие со скруглением. \en Double cylindrical hole with a fillet. + bt_DoubleCylinder = 6, ///< \ru Двойное цилиндрическое отверстие со скруглением. \en Double cylindrical hole with a fillet. }; public: @@ -498,8 +498,8 @@ public: public: virtual MbeHoleType Type() const; // \ru Тип выемки. \en Type of notch. - virtual HoleValues & Duplicate( MbRegDuplicate * ireg = c3d_null ) const; // \ru Построить копию. \en Create a copy. - virtual void Transform( const MbMatrix3D & matr, MbRegTransform * ireg = c3d_null ); // \ru Преобразовать элемент согласно матрице. \en Transform element according to the matrix. + virtual HoleValues & Duplicate( MbRegDuplicate * ireg = NULL ) const; // \ru Построить копию. \en Create a copy. + virtual void Transform( const MbMatrix3D & matr, MbRegTransform * ireg = NULL ); // \ru Преобразовать элемент согласно матрице. \en Transform element according to the matrix. virtual bool IsSame( const HoleValues &, double accuracy ) const; // \ru Являются ли объекты равными? \en Determine whether an object is equal? virtual void operator = ( const HoleValues & other ); // \ru Оператор присваивания. \en Assignment operator. private: @@ -565,8 +565,8 @@ public: public: virtual MbeHoleType Type() const; // \ru Тип выемки. \en Type of notch. - virtual HoleValues & Duplicate( MbRegDuplicate * ireg = c3d_null ) const; // \ru Построить копию. \en Create a copy. - virtual void Transform( const MbMatrix3D & matr, MbRegTransform * ireg = c3d_null ); // \ru Преобразовать элемент согласно матрице. \en Transform element according to the matrix. + virtual HoleValues & Duplicate( MbRegDuplicate * ireg = NULL ) const; // \ru Построить копию. \en Create a copy. + virtual void Transform( const MbMatrix3D & matr, MbRegTransform * ireg = NULL ); // \ru Преобразовать элемент согласно матрице. \en Transform element according to the matrix. virtual bool IsSame( const HoleValues &, double accuracy ) const; // \ru Являются ли объекты равными? \en Determine whether an object is equal? virtual void operator = ( const HoleValues & other ); // \ru Оператор присваивания. \en Assignment operator. private: @@ -676,8 +676,8 @@ public: public: virtual MbeHoleType Type() const; // \ru Тип выемки. \en Type of notch. - virtual HoleValues & Duplicate( MbRegDuplicate * ireg = c3d_null ) const; // \ru Построить копию. \en Create a copy. - virtual void Transform( const MbMatrix3D & matr, MbRegTransform * ireg = c3d_null ); // \ru Преобразовать элемент согласно матрице. \en Transform element according to the matrix. + virtual HoleValues & Duplicate( MbRegDuplicate * ireg = NULL ) const; // \ru Построить копию. \en Create a copy. + virtual void Transform( const MbMatrix3D & matr, MbRegTransform * ireg = NULL ); // \ru Преобразовать элемент согласно матрице. \en Transform element according to the matrix. virtual bool IsSame( const HoleValues &, double accuracy ) const; // \ru Являются ли объекты равными? \en Determine whether an object is equal? virtual void operator = ( const HoleValues & other ); // \ru Оператор присваивания. \en Assignment operator. private: @@ -1313,7 +1313,7 @@ private: bool vclosed; ///< \ru Признак замкнутости по V. \en Attribute of closedness along V. Array2 points; ///< \ru Множество точек. \en Set of points. double weight; ///< \ru Вес точек в случае одинаковости весов. \en Points weight in the case of equal weights. - Array2 * weights; ///< \ru Веса точек (может быть c3d_null). \en Weights of points (can be c3d_null). + Array2 * weights; ///< \ru Веса точек (может быть NULL). \en Weights of points (can be NULL). bool throughPoints; ///< \ru Строить поверхность, проходящую через точки. \en Build surface passing through points. bool pointsCloud; ///< \ru Облако точек (массив не упорядочен). \en Point cloud (disordered array). MbPlane * cloudPlane; ///< \ru Опорная плоскость облака точек. \en Support plane of point cloud. @@ -1486,11 +1486,11 @@ public: /// \ru Получить массив точек. \en Get array of points. bool GetPoints ( Array2 & pnts ) const { return pnts.Init( points ); } /// \ru Если ли веса? \en Is there weights? - bool IsWeighted() const { return (weights != c3d_null); } + bool IsWeighted() const { return (weights != NULL); } /// \ru Получить массив весов. \en Get array of weights. bool GetWeights( Array2 & wts ) const; /// \ru Получить плоскость проецирования. \en Get the plane of projection. - const MbPlane * GetCloudPlane() const { return (pointsCloud ? cloudPlane : c3d_null);} + const MbPlane * GetCloudPlane() const { return (pointsCloud ? cloudPlane : NULL);} /** \brief \ru Минимально возможный порядок сплайнов в случае облака точек. \en The smallest possible order of splines in the case of point cloud. \~ @@ -1528,7 +1528,7 @@ public: // --- inline bool NurbsSurfaceValues::GetWeights( Array2 & wts ) const { - if ( weights != c3d_null ) { + if ( weights != NULL ) { if ( wts.Init( *weights ) ) return true; } @@ -1602,7 +1602,7 @@ inline bool NurbsSurfaceValues::SetUVPoint( size_t ui, size_t vi, const MbCartPo // --- inline bool NurbsSurfaceValues::GetUVWeight( size_t ui, size_t vi, double & wt ) const { - if ( weights != c3d_null && ui < GetUCount() && vi < GetVCount() ) { + if ( weights != NULL && ui < GetUCount() && vi < GetVCount() ) { wt = (*weights)( vi, ui ); return (wt != UNDEFINED_DBL); //-V550 } @@ -1616,7 +1616,7 @@ inline bool NurbsSurfaceValues::GetUVWeight( size_t ui, size_t vi, double & wt ) // --- inline bool NurbsSurfaceValues::GetCommonWeight( double & wt ) const { - if ( weights == c3d_null && weight != UNDEFINED_DBL ) { //-V550 + if ( weights == NULL && weight != UNDEFINED_DBL ) { //-V550 wt = weight; return true; } @@ -1635,7 +1635,7 @@ inline void NurbsSurfaceValues::SetThroughPoints( bool tp ) DeleteWeights(); weight = 1.0; } - if ( weights == c3d_null && weight == UNDEFINED_DBL ) //-V550 + if ( weights == NULL && weight == UNDEFINED_DBL ) //-V550 weight = 1.0; } @@ -1718,15 +1718,15 @@ public: const RPArray & curvesV, bool vClosed, bool checkSelfInt, bool tess = false, - const RPArray * chainsU = c3d_null, - const RPArray * chainsV = c3d_null, + const RPArray * chainsU = NULL, + const RPArray * chainsV = NULL, MbeMatingType type0 = trt_Position, MbeMatingType type1 = trt_Position, MbeMatingType type2 = trt_Position, MbeMatingType type3 = trt_Position, - const c3d::ConstSurfacesVector * surf0 = c3d_null, // \ru Сопрягаемые поверхности через curvesU[0] \en Mating surfaces through curvesU[0] - const c3d::ConstSurfacesVector * surf1 = c3d_null, // \ru Сопрягаемые поверхности через curvesV[0] \en Mating surfaces through curvesV[0] - const c3d::ConstSurfacesVector * surf2 = c3d_null, // \ru Сопрягаемые поверхности через curvesU[maxU] \en Mating surfaces through curvesU[maxU] - const c3d::ConstSurfacesVector * surf3 = c3d_null, // \ru Сопрягаемые поверхности через curvesV[maxV] \en Mating surfaces through curvesV[maxV] - const MbPoint3D * pnt = c3d_null, + const c3d::ConstSurfacesVector * surf0 = NULL, // \ru Сопрягаемые поверхности через curvesU[0] \en Mating surfaces through curvesU[0] + const c3d::ConstSurfacesVector * surf1 = NULL, // \ru Сопрягаемые поверхности через curvesV[0] \en Mating surfaces through curvesV[0] + const c3d::ConstSurfacesVector * surf2 = NULL, // \ru Сопрягаемые поверхности через curvesU[maxU] \en Mating surfaces through curvesU[maxU] + const c3d::ConstSurfacesVector * surf3 = NULL, // \ru Сопрягаемые поверхности через curvesV[maxV] \en Mating surfaces through curvesV[maxV] + const MbPoint3D * pnt = NULL, bool modify = true, bool direct0 = true, bool direct1 = true, bool direct2 = true, bool direct3 = true ); @@ -1822,9 +1822,9 @@ public: /// \ru Максимальный индекс в массиве кривых по U. \en The maximum index in the array of curves along U. ptrdiff_t GetCurvesUMaxIndex() const { return curvesU.MaxIndex(); } /// \ru Получить кривую по индексу. \en Get the curve by the index. - const MbCurve3D * GetCurveU( size_t k ) const { return ((k < curvesU.Count()) ? curvesU[k] : c3d_null); } + const MbCurve3D * GetCurveU( size_t k ) const { return ((k < curvesU.Count()) ? curvesU[k] : NULL); } /// \ru Получить кривую по индексу. \en Get the curve by the index. - MbCurve3D * SetCurveU( size_t k ) { return ((k < curvesU.Count()) ? curvesU[k] : c3d_null); } + MbCurve3D * SetCurveU( size_t k ) { return ((k < curvesU.Count()) ? curvesU[k] : NULL); } /// \ru Получить кривые по U. \en Get curves along U. void GetCurvesU( RPArray & curves ) const { curves.AddArray(curvesU); } /// \ru Установить кривые по U. \en Set curves along U. @@ -1839,9 +1839,9 @@ public: /// \ru Максимальный индекс в массиве кривых по V. \en The maximum index in the array of curves along V. ptrdiff_t GetCurvesVMaxIndex() const { return curvesV.MaxIndex(); } /// \ru Получить кривую по индексу. \en Get the curve by the index. - const MbCurve3D * GetCurveV( size_t k ) const { return ((k < curvesV.Count()) ? curvesV[k] : c3d_null); } + const MbCurve3D * GetCurveV( size_t k ) const { return ((k < curvesV.Count()) ? curvesV[k] : NULL); } /// \ru Получить кривую по индексу. \en Get the curve by the index. - MbCurve3D * SetCurveV( size_t k ) const { return ((k < curvesV.Count()) ? curvesV[k] : c3d_null); } + MbCurve3D * SetCurveV( size_t k ) const { return ((k < curvesV.Count()) ? curvesV[k] : NULL); } /// \ru Получить кривые по V. \en Get curves along V. void GetCurvesV( RPArray & curves ) const { curves.AddArray(curvesV); } /// \ru Установить кривые по V. \en Set curves along V. @@ -1856,9 +1856,9 @@ public: /// \ru Максимальный индекс в массиве цепочек по U. \en The maximum index in the array of chains along U. ptrdiff_t GetChainsUMaxIndex() const { return chainsU.MaxIndex(); } /// \ru Получить цепочку по индексу. \en Get the chain by the index. - const MbPolyline3D * GetChainU( size_t k ) const { return ( ( k < chainsU.Count() ) ? chainsU[k] : c3d_null ); } + const MbPolyline3D * GetChainU( size_t k ) const { return ( ( k < chainsU.Count() ) ? chainsU[k] : NULL ); } /// \ru Получить цепочку по индексу. \en Get the chain by the index. - MbPolyline3D * SetChainU( size_t k ) { return ( ( k < chainsU.Count() ) ? chainsU[k] : c3d_null ); } + MbPolyline3D * SetChainU( size_t k ) { return ( ( k < chainsU.Count() ) ? chainsU[k] : NULL ); } /// \ru Получить цепочки по U. \en Get chains along U. void GetChainsU( RPArray & chains ) const { chains.AddArray( chainsU ); } /// \ru Установить цепочки по U. \en Set chains along U. @@ -1873,9 +1873,9 @@ public: /// \ru Максимальный индекс в массиве цепочек по V. \en The maximum index in the array of chains along V. ptrdiff_t GetChainsVMaxIndex() const { return chainsV.MaxIndex(); } /// \ru Получить цепочку по индексу. \en Get the chain by the index. - const MbPolyline3D * GetChainV( size_t k ) const { return ( ( k < chainsV.Count() ) ? chainsV[k] : c3d_null ); } + const MbPolyline3D * GetChainV( size_t k ) const { return ( ( k < chainsV.Count() ) ? chainsV[k] : NULL ); } /// \ru Получить цепочку по индексу. \en Get the chain by the index. - MbPolyline3D * SetChainV( size_t k ) { return ( ( k < chainsV.Count() ) ? chainsV[k] : c3d_null ); } + MbPolyline3D * SetChainV( size_t k ) { return ( ( k < chainsV.Count() ) ? chainsV[k] : NULL ); } /// \ru Получить цепочки по V. \en Get chains along V. void GetChainsV( RPArray & chains ) const { chains.AddArray( chainsV ); } /// \ru Установить цепочки по V. \en Set chains along V. @@ -2214,11 +2214,11 @@ public: void InitByShell ( ExtensionType t, LateralKind k, const MbFace * f, const MbSolid * s ); /// \ru Преобразовать объект согласно матрице. \en Transform an object according to the matrix. - void Transform( const MbMatrix3D & matr, MbRegTransform * ireg = c3d_null ); + void Transform( const MbMatrix3D & matr, MbRegTransform * ireg = NULL ); /// \ru Сдвинуть объект вдоль вектора. \en Move an object along a vector. - void Move ( const MbVector3D & to, MbRegTransform * ireg = c3d_null ); + void Move ( const MbVector3D & to, MbRegTransform * ireg = NULL ); /// \ru Повернуть объект вокруг оси на заданный угол. \en Rotate an object at a given angle around an axis. - void Rotate ( const MbAxis3D & axis, double ang, MbRegTransform * ireg = c3d_null ); + void Rotate ( const MbAxis3D & axis, double ang, MbRegTransform * ireg = NULL ); /// \ru Получить оболочку. \en Get the shell. const MbFaceShell * GetShell() const { return shell; } @@ -2287,10 +2287,10 @@ public: , checkSelfInt ( false ) , edgeConnType1 ( false ) , edgeConnType2 ( false ) - , boundDirection11 ( c3d_null ) - , boundDirection12 ( c3d_null ) - , boundDirection21 ( c3d_null ) - , boundDirection22 ( c3d_null ) + , boundDirection11 ( NULL ) + , boundDirection12 ( NULL ) + , boundDirection21 ( NULL ) + , boundDirection22 ( NULL ) {} /// \ru Конструктор по параметрам. \en Constructor by parameters. JoinSurfaceValues( JoinConnType t1, JoinConnType t2, double tens1, double tens2, bool selfInt = false ) @@ -2303,10 +2303,10 @@ public: , checkSelfInt ( selfInt ) , edgeConnType1 ( false ) , edgeConnType2 ( false ) - , boundDirection11 ( c3d_null ) - , boundDirection12 ( c3d_null ) - , boundDirection21 ( c3d_null ) - , boundDirection22 ( c3d_null ) + , boundDirection11 ( NULL ) + , boundDirection12 ( NULL ) + , boundDirection21 ( NULL ) + , boundDirection22 ( NULL ) {} /// \ru Конструктор копирования. \en Copy-constructor. JoinSurfaceValues( const JoinSurfaceValues & other ); @@ -2426,10 +2426,10 @@ public: } } if ( isSame ) { - bool isBoundDir11 = ((other.boundDirection11 != c3d_null) && (boundDirection11 != c3d_null)); - bool isBoundDir12 = ((other.boundDirection12 != c3d_null) && (boundDirection12 != c3d_null)); - bool isBoundDir21 = ((other.boundDirection21 != c3d_null) && (boundDirection21 != c3d_null)); - bool isBoundDir22 = ((other.boundDirection22 != c3d_null) && (boundDirection22 != c3d_null)); + bool isBoundDir11 = ((other.boundDirection11 != NULL) && (boundDirection11 != NULL)); + bool isBoundDir12 = ((other.boundDirection12 != NULL) && (boundDirection12 != NULL)); + bool isBoundDir21 = ((other.boundDirection21 != NULL) && (boundDirection21 != NULL)); + bool isBoundDir22 = ((other.boundDirection22 != NULL) && (boundDirection22 != NULL)); if ( isSame && isBoundDir11 ) isSame = c3d::EqualVectors( *other.boundDirection11, *boundDirection11, accuracy ); @@ -2523,35 +2523,31 @@ struct MATH_CLASS MedianShellValues { public: FilletType filletType; - double position; ///< \ru Параметр смещения срединной оболочки относительно первой грани из пары. По умолчанию равен 50% расстояния между гранями. \en Parameter of shift the median surface from first face in faces pair. By default is 50% from distance between faces in pair. - double dmin; ///< \ru Минимальный параметр эквидистантности. \en Minimal equidistation value. - double dmax; ///< \ru Максимальный параметр эквидистантности. \en Maximal equidistation value. - bool cutByBordes; ///< \ru Флаг подрезки срединной оболочки границами родительской оболочки. \en Flag indicates is need to truncate median shell by parent shell faces. + double position; ///< \ru Параметр смещения срединной оболочки относительно первой грани из пары. По умолчанию равен 50% расстояния между гранями. \en Parameter of shift the median surface from first face in faces pair. By default is 50% from distance between faces in pair. + double dmin; ///< \ru Минимальный параметр эквидистантности. \en Minimal equidistation value. + double dmax; ///< \ru Максимальный параметр эквидистантности. \en Maximal equidistation value. public: /// \ru Конструктор по умолчанию. \en Default constructor. MedianShellValues() - : filletType ( tf_average ) - , position ( 0.5 ) - , dmin ( 0.0 ) - , dmax ( 0.0 ) - , cutByBordes ( false ) + : filletType ( tf_average ) + , position ( 0.5 ) + , dmin ( 0.0 ) + , dmax ( 0.0 ) {} /// \ru Конструктор копирования. \en Copy-constructor. MedianShellValues( const MedianShellValues & other ) - : filletType ( other.filletType ) - , position ( other.position ) - , dmin ( other.dmin ) - , dmax ( other.dmax ) - , cutByBordes ( other.cutByBordes ) + : filletType ( other.filletType ) + , position ( other.position ) + , dmin ( other.dmin ) + , dmax ( other.dmax ) {} /// \ru Конструктор по параметрам. \en Constructor by parameters. - MedianShellValues( double pos, double d1, double d2, bool cut ) - : filletType ( tf_average ) - , position ( pos ) - , dmin ( d1 ) - , dmax ( d2 ) - , cutByBordes ( cut ) + MedianShellValues( double pos, double d1, double d2 ) + : filletType( tf_average ) + , position ( pos ) + , dmin ( d1 ) + , dmax ( d2 ) {} public: @@ -2561,8 +2557,7 @@ public: if ( filletType == obj.filletType && (::fabs(dmin - obj.dmin) < accuracy) && (::fabs(dmax - obj.dmax) < accuracy) && - (::fabs(position - obj.position) < accuracy) && - cutByBordes == obj.cutByBordes ) + (::fabs(position - obj.position) < accuracy) ) return true; return false; } @@ -2580,7 +2575,6 @@ public: position = other.position; dmin = other.dmin; dmax = other.dmax; - cutByBordes = other.cutByBordes; return *this; } @@ -2641,8 +2635,6 @@ public: } /// \ru Получить пару граней по индексу. \en Get pair of faces by index. const c3d::ItemIndexPair & _GetFacePair( size_t index ) const { return facePairs[index]; } - /// \ru Установить пару граней по индексу. \en Set pair of faces by index. - c3d::ItemIndexPair & SetFacePair( size_t index ) { return facePairs[index]; } /// \ru Удалить пару граней из набора. \en Remove pair of faces from set. void RemovePairByIndex( size_t index ) { @@ -3169,11 +3161,11 @@ public: } public: /// \ru Это резка плоским контуром? \en Is cutting by planar contour? - bool IsCuttingByPlanarContour() const { return (cutterData.GetSketchCurvesCount() > 0 && cutterData.GetSketchCurve(0) != c3d_null); } + bool IsCuttingByPlanarContour() const { return (cutterData.GetSketchCurvesCount() > 0 && cutterData.GetSketchCurve(0) != NULL); } /// \ru Это резка поверхностью? \en Is cutting by surface? - bool IsCuttingBySurface() const { return (cutterData.GetSurfacesCount() > 0 && cutterData.GetSurface(0) != c3d_null); } + bool IsCuttingBySurface() const { return (cutterData.GetSurfacesCount() > 0 && cutterData.GetSurface(0) != NULL); } /// \ru Это резка оболочкой? \en Is cutting by shell? - bool IsCuttingBySolid() const { return (cutterData.GetCreatorsCount() > 0 && cutterData.GetCreator(0) != c3d_null) || (cutterData.GetSolidShell() != c3d_null); } + bool IsCuttingBySolid() const { return (cutterData.GetCreatorsCount() > 0 && cutterData.GetCreator(0) != NULL) || (cutterData.GetSolidShell() != NULL); } /// \ru Получить данные секущего объекта. \en Get cutter object(s) data. const MbSplitData & GetCutterData() const { return cutterData; } diff --git a/C3d/Include/op_swept_parameter.h b/C3d/Include/op_swept_parameter.h index f99ff3c..06c1173 100644 --- a/C3d/Include/op_swept_parameter.h +++ b/C3d/Include/op_swept_parameter.h @@ -22,7 +22,6 @@ #include #include #include -#include #include #include @@ -91,7 +90,7 @@ public: /// \ru Конструктор по умолчанию. \en Default constructor. MbSweptData(); /// \ru Конструктор копирования. \en Copy-constructor. - MbSweptData( const MbSweptData &, MbRegDuplicate * ireg = c3d_null ); + MbSweptData( const MbSweptData &, MbRegDuplicate * ireg = NULL ); public: @@ -236,11 +235,11 @@ public: SPtr GetCurve3D( size_t i ) const; /// \ru Есть данные о двумерных кривых на поверхности? \en Is there data of two-dimensional curves on the surface? - bool IsSurfaceCurvesData() const { return ((surface != c3d_null) && !contours.empty()); } + bool IsSurfaceCurvesData() const { return ((surface != NULL) && !contours.empty()); } /// \ru Есть данные о пространственных кривых? \en Is there data of spatial curves? bool IsSpaceCurvesData() const { return !contours3D.empty(); } /// \ru Есть данные о теле? \en Is there data about the solid? - bool IsSolidData() const { return (solid != c3d_null); } + bool IsSolidData() const { return (solid != NULL); } /// \ru Выдать поверхность. \en Get the surface. const MbSurface * GetSurface() const { return surface; } @@ -276,7 +275,7 @@ public: \param[in] iReg - \ru Регистратор. \en Registrator. \~ */ - void Transform( const MbMatrix3D & matr, MbRegTransform * iReg = c3d_null ); + void Transform( const MbMatrix3D & matr, MbRegTransform * iReg = NULL ); /** \brief \ru Сдвинуть объект. \en Move the object. \~ \details \ru Сдвинуть геометрический объект вдоль вектора с использованием регистратора. @@ -286,7 +285,7 @@ public: \param[in] iReg - \ru Регистратор. \en Registrator. \~ */ - void Move ( const MbVector3D & to, MbRegTransform * iReg = c3d_null ); + void Move ( const MbVector3D & to, MbRegTransform * iReg = NULL ); /** \brief \ru Повернуть объект. \en Rotate the object. \~ \details \ru Повернуть объект вокруг оси на заданный угол с использованием регистратора. @@ -298,7 +297,7 @@ public: \param[in] iReg - \ru Регистратор. \en Registrator. \~ */ - void Rotate ( const MbAxis3D & axis, double angle, MbRegTransform * iReg = c3d_null ); + void Rotate ( const MbAxis3D & axis, double angle, MbRegTransform * iReg = NULL ); /** \brief \ru Определить, являются ли объекты равными. \en Determine whether the objects are equal. \~ \details \ru Определить, являются ли объекты равными с заданной точностью. @@ -449,7 +448,7 @@ public: , scalarValue( 0.0 ) , distance ( 0.0 ) , rake ( 0.0 ) - , surface ( c3d_null ) + , surface ( NULL ) , sameSense ( orient_BOTH ) {} @@ -465,7 +464,7 @@ public: , scalarValue( sVal ) , distance ( 0.0 ) , rake ( 0.0 ) - , surface ( c3d_null ) + , surface ( NULL ) , sameSense ( orient_BOTH ) {} @@ -535,8 +534,8 @@ public: (::fabs(other.distance - distance) < accuracy) && (::fabs(other.rake - rake) < accuracy) ) { - bool isSurf1 = (surface != c3d_null); - bool isSurf2 = (other.surface != c3d_null); + bool isSurf1 = (surface != NULL); + bool isSurf2 = (other.surface != NULL); if ( isSurf1 == isSurf2 ) { if ( isSurf1 && isSurf2 ) { @@ -573,7 +572,7 @@ public: \en Wall thickness (offset distance) along the positive direction of the normal of an object (face, surface, plane of the curve). \~ */ - double thickness1; + double thickness1; /** \brief \ru Толщина стенки (величина эквидистанты) в обратном направлении. \en Wall thickness (offset distance) along the backward direction. \~ @@ -582,13 +581,13 @@ public: \en Wall thickness (offset distance) along the negative direction of the normal of an object (face, surface, plane of the curve). \~ */ - double thickness2; + double thickness2; - bool shellClosed; ///< \ru Замкнутость создаваемой оболочки. \en Closedness of created shell. + bool shellClosed; ///< \ru Замкнутость оболочки. \en Closedness of shell. private: - bool checkSelfInt; ///< \ru Флаг проверки самопересечений (вычислительно "тяжелыми" методами). \en Flag for checking of self-intersection (computationally by "heavy" methods). - MbMergingFlags mergeFlags; ///< \ru Управляющие флаги слияния элементов оболочки. \en Control flags of shell items merging. + bool checkSelfInt; ///< \ru Флаг проверки самопересечений (вычислительно "тяжелыми" методами). \en Flag for checking of self-intersection (computationally by "heavy" methods). + bool mergeFaces; ///< \ru Сливать подобные грани (true). \en Whether to merge similar faces (true). public: /// \ru Конструктор по умолчанию. \en Default constructor. @@ -597,7 +596,7 @@ public: , thickness2 ( 0.0 ) , shellClosed ( true ) , checkSelfInt( true ) - , mergeFlags ( ) + , mergeFaces ( true ) {} /// \ru Конструктор по толщинам и замкнутости. \en Constructor by thicknesses and closedness. SweptValues( double t1, double t2, bool c = true ) @@ -605,7 +604,7 @@ public: , thickness2 ( t2 ) , shellClosed ( c ) , checkSelfInt( true ) - , mergeFlags ( ) + , mergeFaces ( true ) {} /// \ru Конструктор копирования. \en Copy-constructor. SweptValues( const SweptValues & other ) @@ -613,7 +612,7 @@ public: , thickness2 ( other.thickness2 ) , shellClosed ( other.shellClosed ) , checkSelfInt( other.checkSelfInt ) - , mergeFlags ( other.mergeFlags ) + , mergeFaces ( other.mergeFaces ) {} /// \ru Деструктор. \en Destructor. virtual ~SweptValues() {} @@ -644,33 +643,21 @@ public: thickness2 = other.thickness2; shellClosed = other.shellClosed; checkSelfInt = other.checkSelfInt; - mergeFlags = other.mergeFlags; + mergeFaces = other.mergeFaces; } /// \ru Получить состояние замкнутости. \en Get the closedness state. bool IsShellClosed() const { return shellClosed; } /// \ru Установит состояние замкнутости. \en Set the closedness state. void SetShellClosed( bool cl ) { shellClosed = cl; } - /// \ru Получить состояние флага проверки самопересечений. \en Get the state of flag of checking self-intersection. bool CheckSelfInt() const { return checkSelfInt; } /// \ru Установить состояние флага проверки самопересечений. \en Set the state of flag of checking self-intersection. void SetCheckSelfInt( bool c ) { checkSelfInt = c; } - - /// \ru Сливать ли подобные грани. \en Whether to merge similar faces. - bool MergeFaces() const { return mergeFlags.MergeFaces(); } - /// \ru Сливать подобные грани. \en Whether to merge similar faces. - void SetMergingFaces( bool mf ) { mergeFlags.SetMergingFaces( mf ); } - - /// \ru Сливать ли подобные ребра. \en Whether to merge similar edges. - bool MergeEdges() const { return mergeFlags.MergeEdges(); } - /// \ru Сливать подобные ребра. \en Whether to merge similar edges. - void SetMergingEdges( bool me ) { mergeFlags.SetMergingEdges( me ); } - - /// \ru Получить управляющие флаги слияния элементов оболочки. \en Get control flags of shell items merging. - const MbMergingFlags & MergingFlags() const { return mergeFlags; } - /// \ru Установить управляющие флаги слияния элементов оболочки. \en Set control flags of shell items merging. - void SetMergingFlags( const MbMergingFlags & f ) { mergeFlags = f; } + /// \ru Сливать подобные грани (true). \en Whether to merge similar faces (true). + bool MergeFaces() const { return mergeFaces; } + /// \ru Сливать подобные грани (true). \en Whether to merge similar faces (true). + void SetMergeFaces( bool mf ) { mergeFaces = mf; } /// \ru Оператор присваивания. \en Assignment operator. void operator = ( const SweptValues & other ) { Init( other ); } @@ -747,7 +734,7 @@ public: virtual bool IsSame( const SweptValues & other, double accuracy ) const { const SweptValuesAndSides * obj = dynamic_cast( &other ); - if ( obj != c3d_null ) { + if ( obj != NULL ) { if ( side1.IsSame( obj->side1, accuracy ) && side2.IsSame( obj->side2, accuracy ) ) { if ( obj->SweptValues::IsSame( *this, accuracy ) ) { return true; @@ -774,7 +761,7 @@ public: \param[in] iReg - \ru Регистратор. \en Registrator. \~ */ - void Transform( const MbMatrix3D & matr, MbRegTransform * iReg = c3d_null ); + void Transform( const MbMatrix3D & matr, MbRegTransform * iReg = NULL ); /** \brief \ru Сдвинуть вдоль вектора. \en Move along a vector. \~ \details \ru Сдвинуть вдоль вектора поверхности в прямом и обратном направлении. @@ -784,7 +771,7 @@ public: \param[in] iReg - \ru Регистратор. \en Registrator. \~ */ - void Move ( const MbVector3D & to, MbRegTransform * iReg = c3d_null ); + void Move ( const MbVector3D & to, MbRegTransform * iReg = NULL ); /** \brief \ru Повернуть вокруг оси. \en Rotate around an axis. \~ \details \ru Повернуть вокруг оси поверхности в прямом и обратном направлении. @@ -796,7 +783,7 @@ public: \param[in] iReg - \ru Регистратор. \en Registrator. \~ */ - void Rotate ( const MbAxis3D & axis, double angle, MbRegTransform * iReg = c3d_null ); + void Rotate ( const MbAxis3D & axis, double angle, MbRegTransform * iReg = NULL ); /** \brief \ru Сделать копии поверхностей. \en Make copies of surfaces. \~ @@ -807,7 +794,7 @@ public: \return \ru true, если хотя бы одна поверхность имелась и сдублирована. \en True if at least one surface is had and copied. \~ */ - bool DuplicateSurfaces( MbRegDuplicate * ireg = c3d_null ); + bool DuplicateSurfaces( MbRegDuplicate * ireg = NULL ); /// \ru Получить поверхность в положительном направлении. \en Get the surface along the positive direction. MbSurface * GetSurface1() const { return side1.GetSurface(); } @@ -872,7 +859,7 @@ public: virtual bool IsSame( const SweptValues & other, double accuracy ) const { const ExtrusionValues * obj = dynamic_cast( &other ); - if ( obj != c3d_null ) { + if ( obj != NULL ) { if ( obj->SweptValuesAndSides::IsSame( *this, accuracy ) ) return true; } @@ -961,7 +948,7 @@ public: virtual bool IsSame( const SweptValues & other, double accuracy ) const { const RevolutionValues * obj = dynamic_cast( &other ); - if ( obj != c3d_null ) { + if ( obj != NULL ) { if ( obj->shape == shape ) { if ( obj->SweptValuesAndSides::IsSame( *this, accuracy ) ) return true; @@ -1016,7 +1003,7 @@ protected: */ int mode; public: - // \ru Данные о функциях изменения образующих кривых вдоль направляющей кривой (могут быть c3d_null). \en Data about changes of generating curves along the guide curve (can be c3d_null). + // \ru Данные о функциях изменения образующих кривых вдоль направляющей кривой (могут быть NULL). \en Data about changes of generating curves along the guide curve (can be NULL). double range; ///< \ru Эквидистантное смещение точек образующей кривой в конце траектории. \en The offset range of generating curve on the end of spine curve. SPtr scaling; ///< \ru Функция масштабирования образующей кривой. \en The function of curve scale. SPtr winding; ///< \ru Функция вращения образующей кривой. \en The function of curve rotation. @@ -1035,9 +1022,9 @@ public: : SweptValues( ) , mode ( eom_KeepingAngle ) , range ( 0.0 ) - , scaling ( c3d_null ) - , winding ( c3d_null ) - , surface ( c3d_null ) + , scaling ( NULL ) + , winding ( NULL ) + , surface ( NULL ) {} /// \ru Конструктор копирования. \en Copy-constructor. EvolutionValues( const EvolutionValues & other ); @@ -1195,7 +1182,7 @@ public: virtual bool IsSame( const SweptValues & other, double accuracy ) const { const LoftedValues * obj = dynamic_cast( &other ); - if ( obj != c3d_null ) { + if ( obj != NULL ) { if ( obj->closed == closed ) { if ( c3d::EqualVectors(vector1, obj->vector1, accuracy) && c3d::EqualVectors(vector2, obj->vector2, accuracy) ) { if ( obj->setNormal1 == setNormal1 && obj->setNormal2 == setNormal2 ) { @@ -1286,7 +1273,7 @@ public: { const RibValues * obj = dynamic_cast( &other ); - if ( obj != c3d_null ) { + if ( obj != NULL ) { if ( obj->side == side ) { if ( ::fabs(obj->angle1 - angle1) < accuracy && ::fabs(obj->angle2 - angle2) < accuracy ) return SweptValues::IsSame( *obj, accuracy ); @@ -1356,7 +1343,7 @@ public: { const SheetRibValues * obj = dynamic_cast( &other ); - if ( obj != c3d_null ) { + if ( obj != NULL ) { if ( (::fabs(radRibConvex - obj->radRibConvex) < accuracy) && (::fabs(radSideConcave - obj->radSideConcave) < accuracy) ) return RibValues::IsSame( *obj, accuracy ); } @@ -1520,8 +1507,7 @@ private: std::vector faces; ///< \ru Опорные грани (могут отсутствовать). \en The reference faces (may be empty). std::vector faceSide; ///< \ru С каких сторон касаться поверхностей при form==cs_Linea (синхронно с faces). \en On which sides to touch surfaces when form==cs_Linea (synchronously with faces). std::vector curves; ///< \ru Направляющие кривые (могут отсутствовать). \en The guide curves (may be empty). - MbCurve3D * track; ///< \ru Кривая, через которую должно пройти сечение (может отсутствовать). \en The curve that the section should pass through (may be c3d_null). - MbFunction * angle; ///< \ru Функция угла наклона (может отсутствовать). \en The function of the angle of inclination (may be c3d_null). + MbFunction * angle; ///< \ru Функция угла наклона (может отсутствовать). \en The function of the angle of inclination (may be NULL). ThreeStates state; ///< \ru Как использовать angle: угол к хорде (ts_neutral), отклонение от касательной поверхности (ts_positive), отклонение от нормали к поверхности (ts_negative). ///< \en How to use angle: angle to chord (ts_neutral), deviation from tangent surface (ts_positive), deviation from normal to surface (ts_negative). public: @@ -1533,8 +1519,7 @@ public: , faces () , faceSide() , curves () - , track ( c3d_null ) - , angle ( c3d_null ) + , angle ( NULL ) , state( ts_neutral ) {} @@ -1550,16 +1535,14 @@ public: \en On which sides to touch surfaces (synchronously with faces). \~ \param[in] cs - \ru Направляющие кривые (могут отсутствовать). \en The guide curves (may be empty). \~ - \param[in] trk - \ru Кривая, через которую должно пройти сечение (может отсутствовать). - \en The curve that the section should pass through (may be c3d_null). \~ - \param[in] ang - \ru Функция угла наклона (может быть c3d_null). - \en The function of the angle of inclination (may be c3d_null). \~ + \param[in] ang - \ru Функция угла наклона (может быть NULL). + \en The function of the angle of inclination (may be NULL). \~ \param[in] st - \ru Как использовать ang. \en How to use ang. \~ */ MbSectionRail( std::vector & edges_, std::vector & eSides, std::vector & faces_, std::vector & fSides, - std::vector & cs, MbCurve3D * trk, + std::vector & cs, MbFunction * ang, ThreeStates st ); /// \ru Конструктор копирования. \en Copy-constructor. MbSectionRail( const MbSectionRail & other ); @@ -1581,7 +1564,7 @@ public: size_t GetEdgesCount() const { return edges.size(); } size_t GetEdgeSideCount() const { return edgeSide.size(); } /// \ru Выдать направляющее ребро. \en Get guide edge. - MbCurveEdge * SetEdge( size_t i ) { return ( i < edges.size() ) ? edges[i] : c3d_null; } + MbCurveEdge * SetEdge( size_t i ) { return ( i < edges.size() ) ? edges[i] : NULL; } /// \ru Добавить в данные поверхность. \en Add surface to data. \~ void AddFace( MbFace & _face, bool side ); @@ -1594,7 +1577,7 @@ public: size_t GetFacesCount() const { return faces.size(); } size_t GetFaceSideCount() const { return faceSide.size(); } /// \ru Выдать направляющую грань. \en Get guide face. - MbFace * SetFace( size_t i ) { return ( i < faces.size() ) ? faces[i] : c3d_null; } + MbFace * SetFace( size_t i ) { return ( i < faces.size() ) ? faces[i] : NULL; } /// \ru Добавить в данные кривую. \en Add curve to data. \~ void AddCurve( MbCurve3D & _curve ); @@ -1604,30 +1587,24 @@ public: void GetCurves( std::vector & crs ) const; /// \ru Выдать количество дополнительных направляющих кривых. \en Get additional guide curves count. size_t GetCurvesCount() const { return curves.size(); } - /// \ru Выдать дополнительную направляющую кривую. \en Get additional guide curve. - MbCurve3D * SetCurve( size_t i ) { return ( i < curves.size() ) ? curves[i] : c3d_null; } - - /// \ru Добавить в данные кривую. \en Add curve to data. \~ - void SetTrack( MbCurve3D & trk ); - /// \ru Выдать кривую, через которую должно пройти сечение. \en Get the curve that the section should pass through. - const MbCurve3D * GetTrack() const { return track; } - MbCurve3D * SetTrack() { return track; } + MbCurve3D * SetCurve( size_t i ) { return ( i < curves.size() ) ? curves[i] : NULL; } /// \ru Установить функцию управления сечением. \en Set section control function. - void SetAngle( MbFunction & an, ThreeStates ts ); + void SetAngle( MbFunction & an ); /// \ru Выдать функцию управления сечением (радиус или дискриминант). \en Get section control function (radius or discriminant). const MbFunction * GetAngle() const { return angle; } MbFunction * SetAngle() { return angle; } - /// \ru К чему задан угол функции: к хорде, к поверхности, к нормали поверхности. \en What is the angle of the function set to: to the chord, to the surface, to the surface normal. - ThreeStates GetState() const { return state; } - void SetState( ThreeStates st ) { state = st; } + + /// \ru Выдать образующую кривую. \en Get forming curve. + const ThreeStates GetState() const { return state; } + void SetState( ThreeStates st ) { state = st; } /// \ru Преобразовать объект. \en Transform the object. \~ - void Transform( const MbMatrix3D & matr, MbRegTransform * iReg = c3d_null ); + void Transform( const MbMatrix3D & matr, MbRegTransform * iReg = NULL ); /// \ru Сдвинуть объект. \en Move the object. \~ - void Move ( const MbVector3D & to, MbRegTransform * iReg = c3d_null ); + void Move ( const MbVector3D & to, MbRegTransform * iReg = NULL ); /// \ru Повернуть объект. \en Rotate the object. \~ - void Rotate ( const MbAxis3D & axis, double angle, MbRegTransform * iReg = c3d_null ); + void Rotate ( const MbAxis3D & axis, double angle, MbRegTransform * iReg = NULL ); /// \ru Определить, являются ли объекты равными? \en Determine whether an object is equal? bool IsSame( const MbSectionRail & other, double accuracy ) const; /// \ru Определить, являются ли объекты подобными. \en Determine whether the objects are similar. \~ @@ -1659,10 +1636,9 @@ public: struct MATH_CLASS MbSectionRule { public: - MbFunction * discr; ///< \ru Функция управления сечением (дискриминант или радиус, может быть c3d_null). \en Section control function (discriminant or radius). - MbCurve3D * track; ///< \ru Кривая, через которую должно пройти сечение. \en The curve that the section should pass through. - MbSurface * touch; ///< \ru Поверхность, которой должно касаться сечение. \en The surface that the section should touch. - MbFaceShell * shell; ///< \ru Оболочка, которой должно касаться сечение. \en The shell that the section should touch. + MbFunction * function; ///< \ru Функция управления сечением (радиус или дискриминант, может быть NULL). \en Section control function (radius or discriminant). + MbCurve3D * curve; ///< \ru Кривая, через которую должно пройти сечение. \en The curve that the section should pass through. + MbSurface * surface; ///< \ru Поверхность, которой должно касаться сечение. \en The surface that the section should touch. public: /// \ru Конструктор по умолчанию. \en Empty constructor. @@ -1673,8 +1649,6 @@ public: MbSectionRule( MbCurve3D * cur ); /// \ru Конструктор по поверхности. \en The constructor by surface. MbSectionRule( MbSurface * sur ); - /// \ru Конструктор по оболочке. \en The constructor by shell. - MbSectionRule( MbFaceShell * sur ); /// \ru Конструктор копирования. \en Copy-constructor. MbSectionRule( const MbSectionRule & other ); /// \ru Конструктор копирования. \en Copy-constructor. @@ -1685,29 +1659,25 @@ public: public: /// \ru Выдать функцию управления сечением. \en Get section control function. - const MbFunction * GetFunction() const { return discr; } + const MbFunction * GetFunction() const { return function; } /// \ru Установить функцию управления сечением. \en Set section control function. void SetFunction( MbFunction & f ); void SetFunction( double f ); /// \ru Выдать кривую управления сечением. \en Get section control curve. - const MbCurve3D * GetCurve() const { return track; } + const MbCurve3D * GetCurve() const { return curve; } /// \ru Установить кривую управления сечением. \en Set section control curve. void SetCurve( MbCurve3D & c ); /// \ru Выдать поверхность управления сечением. \en Get section control surface. - const MbSurface * GetSurface() const { return touch; } + const MbSurface * GetSurface() const { return surface; } /// \ru Установить поверхность управления сечением. \en Set section control surface. void SetSurface( MbSurface & s ); - /// \ru Выдать оболочку управления сечением. \en Get section control shell. - const MbFaceShell * GetShell() const { return shell; } - /// \ru Установить оболочку управления сечением. \en Set section control shell. - void SetShell( MbFaceShell & s ); /// \ru Преобразовать объект. \en Transform the object. \~ - void Transform( const MbMatrix3D & matr, MbRegTransform * iReg = c3d_null ); + void Transform( const MbMatrix3D & matr, MbRegTransform * iReg = NULL ); /// \ru Сдвинуть объект. \en Move the object. \~ - void Move ( const MbVector3D & to, MbRegTransform * iReg = c3d_null ); + void Move ( const MbVector3D & to, MbRegTransform * iReg = NULL ); /// \ru Повернуть объект. \en Rotate the object. \~ - void Rotate ( const MbAxis3D & axis, double angle, MbRegTransform * iReg = c3d_null ); + void Rotate ( const MbAxis3D & axis, double angle, MbRegTransform * iReg = NULL ); /// \ru Определить, являются ли объекты равными? \en Determine whether an object is equal? bool IsSame( const MbSectionRule & other, double accuracy ) const; /// \ru Определить, являются ли объекты подобными. \en Determine whether the objects are similar. \~ @@ -1744,32 +1714,32 @@ public: class MATH_CLASS MbSectionData { private: - MbCurve3D * spine; ///< \ru Опорная кривая. \en The reference curve. - MbeSectionShape form; ///< \ru Форма сечения поверхности. \en The surface cross-section shape. - MbSectionRail rail1; ///< \ru Данные начального края сечения. \en The data of the begining of section. - MbSectionRail rail2; ///< \ru Данные конечного края сечения. \en The data of the end of section. - MbCurve3D * apexCurve; ///< \ru Кривая вершин (может отсутствовать). \en The apex curve (may be c3d_null). - MbSectionRule descript; ///< \ru Функция управления сечением поверхности (радиус или дискриминант, может быть c3d_null). \en The section control function (radius or discriminant). - MbPolyCurve * pattern; ///< \ru Образующая кривая при form==cs_Shape (для других форм c3d_null). \en Forming curve for form==cs_Shape (c3d_null on other case). - double uMin; ///< \ru Минимальное значение первого параметра. \en Minimal value of the first parameter. - double uMax; ///< \ru Максимальное значение первого параметра. \en Maximal value of the first parameter. - double buildSag; ///< \ru Угловое отклонение при движении по кривым и поверхностям. \en Angular deviation while moving along curves and surfaces. - double accuracy; ///< \ru Точность построения толерантных объектов. \en An accuracy of building tolerant objects. + MbCurve3D * spine; ///< \ru Опорная кривая. \en The reference curve. + MbeSectionShape form; ///< \ru Форма сечения поверхности. \en The surface cross-section shape. + MbSectionRail rail1; ///< \ru Данные начального края сечения. \en The data of the begining of section. + MbSectionRail rail2; ///< \ru Данные конечного края сечения. \en The data of the end of section. + MbCurve3D * curve; ///< \ru Кривая вершин (может отсутствовать). \en The apex curve (may be NULL). + MbSectionRule descript; ///< \ru Функция управления сечением поверхности (радиус или дискриминант, может быть NULL). \en The section control function (radius or discriminant). + MbPolyCurve * pattern; ///< \ru Образующая кривая при form==cs_Shape (для других форм NULL). \en Forming curve for form==cs_Shape (NULL on other case). + double uMin; ///< \ru Минимальное значение первого параметра. \en Minimal value of the first parameter. + double uMax; ///< \ru Максимальное значение первого параметра. \en Maximal value of the first parameter. + double buildSag; ///< \ru Угловое отклонение при движении по кривым и поверхностям. \en Angular deviation while moving along curves and surfaces. + double accuracy; ///< \ru Точность построения толерантных объектов. \en An accuracy of building tolerant objects. public: /// \ru Конструктор по умолчанию. \en Empty constructor. MbSectionData() - : spine ( c3d_null ) - , form ( cs_Round ) - , rail1 () - , rail2 () - , apexCurve( c3d_null ) - , descript () - , pattern ( c3d_null ) - , uMin ( 0.0 ) - , uMax ( 1.0 ) - , buildSag ( Math::deviateSag ) - , accuracy ( Math::metricPrecision ) + : spine ( NULL ) + , form ( cs_Round ) + , rail1 () + , rail2 () + , curve ( NULL ) + , descript() + , pattern ( NULL ) + , uMin ( 0.0 ) + , uMax ( 1.0 ) + , buildSag( Math::deviateSag ) + , accuracy( Math::metricPrecision ) {} /** \brief \ru Конструктор по параметрам. @@ -1782,12 +1752,12 @@ public: \en The data of the begining of section. \~ \param[in] r2 - \ru Данные конечного края сечения. \en The data of the end of section. \~ - \param[in] ap - \ru Кривая вершин (может быть c3d_null). + \param[in] ap - \ru Кривая вершин (может быть NULL). \en The apex curve (may be empty). \~ - \param[in] desc - \ru Функция управления сечением (может быть c3d_null). - \en Section control function (may be c3d_null). \~ - \param[in] patt - \ru Образующая кривая (может быть c3d_null). - \en Forming curve (may be c3d_null). \~ + \param[in] desc - \ru Функция управления сечением (может быть NULL). + \en Section control function (may be NULL). \~ + \param[in] patt - \ru Образующая кривая (может быть NULL). + \en Forming curve (may be NULL). \~ */ MbSectionData( MbCurve3D & sp, MbeSectionShape f, @@ -1807,7 +1777,7 @@ public: /// \ru Установить опорную кривую. \en Set reference curve. void SetSpine( MbCurve3D & s ); - //< \ru Установить вектор направления опорной кривой (если spine==c3d_null). \en Set the direction vector of the reference curve (if spine= = c3d_null). + //< \ru Установить вектор направления опорной кривой (если spine==NULL). \en Set the direction vector of the reference curve (if spine= = NULL). void SetSpine( const MbVector3D & a ); /// \ru Выдать опорную кривую. \en Get reference curve. const MbCurve3D * GetSpine() const { return spine; } @@ -1884,23 +1854,10 @@ public: /// \ru Выдать направляющую кривую. \en Get guide curve. MbCurve3D * SetCurve2( size_t i ) { return rail2.SetCurve( i ); } - /// \ru Добавить в данные кривую, через которую должно пройти сечение. \en Add curve that the section should pass through. \~ - void SetTrack1( MbCurve3D & tr ) { rail1.SetTrack( tr ); } - /// \ru Добавить в данные кривую, через которую должно пройти сечение. \en Add curve that the section should pass through. \~ - void SetTrack2( MbCurve3D & tr ) { rail2.SetTrack( tr ); } - /// \ru Выдать кривую, через которую должно пройти сечение. \en Get the curve that the section should pass through. \~ - const MbCurve3D * GetTrack1() const { return rail1.GetTrack(); } - /// \ru Выдать кривую, через которую должно пройти сечение. \en Get the curve that the section should pass through. \~ - const MbCurve3D * GetTrack2() const { return rail2.GetTrack(); } - /// \ru Выдать кривую, через которую должно пройти сечение. \en Get the curve that the section should pass through. \~ - MbCurve3D * SetTrack1() { return rail1.SetTrack(); } - /// \ru Выдать кривую, через которую должно пройти сечение. \en Get the curve that the section should pass through. \~ - MbCurve3D * SetTrack2() { return rail2.SetTrack(); } - - /// \ru Добавить в данные функцию. \en Add functions to data. \~ - void SetAngle1( MbFunction & ang, ThreeStates ts ) { rail1.SetAngle( ang, ts ); } - /// \ru Добавить в данные функцию. \en Add functions to data. \~ - void SetAngle2( MbFunction & ang, ThreeStates ts ) { rail2.SetAngle( ang, ts ); } + /// \ru Добавить в данные функции. \en Add functions to data. \~ + void SetAngle1( MbFunction & ang ) { rail1.SetAngle( ang ); } + /// \ru Добавить в данные функции. \en Add functions to data. \~ + void SetAngle2( MbFunction & ang ) { rail2.SetAngle( ang ); } /// \ru Выдать функции углов наклона. \en Get angle functions. const MbFunction * GetAngle1() const { return rail1.GetAngle(); } /// \ru Выдать функции углов наклона. \en Get angle functions. @@ -1910,35 +1867,22 @@ public: /// \ru Выдать функцию угла наклона. \en Get angle function. MbFunction * SetAngle2() { return rail2.SetAngle(); } - /// \ru К чему задан угол функции: к хорде, к поверхности, к нормали поверхности. \en What is the angle of the function set to: to the chord, to the surface, to the surface normal. - ThreeStates GetState1() const { return rail1.GetState(); } - ThreeStates GetState2() const { return rail2.GetState(); } - /// \ru Как отсчитывать угол функции: от хорде, от поверхности, от нормали поверхности. \en How to count the angle of the function: from the chord, from the surface, from the surface normal. - void SetState1( ThreeStates st ) { rail1.SetState( st ); } - void SetState2( ThreeStates st ) { rail2.SetState( st ); } - - /// \ru Добавить в данные кривую вершин. \en Set apex curve. \~ - void SetApexCurve( MbCurve3D & curv ); - /// \ru Выдать кривую вершин. \en Get apex curve. - MbCurve3D * SetApexCurve() { return apexCurve; } - /// \ru Выдать кривую вершин. \en Get apex curve. - const MbCurve3D * GetApexCurve() const { return apexCurve; } + /// \ru Добавить в данные кривую. \en Set curve. \~ + void SetCurve( MbCurve3D & curv ); + /// \ru Выдать направляющую кривую. \en Get guide curve. + MbCurve3D * SetCurve() { return curve; } + /// \ru Выдать дополнительные направляющие кривые. \en Get additional guide curves. + const MbCurve3D * GetCurve() const { return curve; } /// \ru Выдать данные управления сечением. \en Get section control data. const MbSectionRule & GetSectionRule() const { return descript; } MbSectionRule & SetSectionRule() { return descript; } /// \ru Выдать функцию управления сечением (радиус или дискриминант). \en Get section control function (radius or discriminant). - const MbFunction * GetFunction() const { return descript.discr; } - MbFunction * SetFunction() { return descript.discr; } + const MbFunction * GetFunction() const { return descript.function; } + MbFunction * SetFunction() { return descript.function; } /// \ru Установить функцию управления сечением. \en Set section control function. void SetFunction( MbFunction & f ) { descript.SetFunction( f ); } void SetFunction( double f ) { descript.SetFunction( f ); } - /// \ru Выдать кривую управления сечением. \en Get section control curve. - const MbCurve3D * GetDescriptCurve() const { return descript.GetCurve(); } - /// \ru Выдать поверхность управления сечением. \en Get section control surface. - const MbSurface * GetDescriptSurface() const { return descript.GetSurface(); } - /// \ru Выдать оболочку управления сечением. \en Get section control shell. - const MbFaceShell * GetDescriptShell() const { return descript.GetShell(); } /// \ru Выдать образующую кривую. \en Get forming curve. const MbPolyCurve * GetPattern() const { return pattern; } @@ -1959,11 +1903,11 @@ public: void SetAccuracy( double acc ); /// \ru Преобразовать объект. \en Transform the object. \~ - void Transform( const MbMatrix3D & matr, MbRegTransform * iReg = c3d_null ); + void Transform( const MbMatrix3D & matr, MbRegTransform * iReg = NULL ); /// \ru Сдвинуть объект. \en Move the object. \~ - void Move ( const MbVector3D & to, MbRegTransform * iReg = c3d_null ); + void Move ( const MbVector3D & to, MbRegTransform * iReg = NULL ); /// \ru Повернуть объект. \en Rotate the object. \~ - void Rotate ( const MbAxis3D & axis, double angle, MbRegTransform * iReg = c3d_null ); + void Rotate ( const MbAxis3D & axis, double angle, MbRegTransform * iReg = NULL ); /// \ru Определить, являются ли объекты равными? \en Determine whether an object is equal? bool IsSame( const MbSectionData & other, double acc ) const; /// \ru Определить, являются ли объекты подобными. \en Determine whether the objects are similar. \~ diff --git a/C3d/Include/pars_equation_tree.h b/C3d/Include/pars_equation_tree.h index 7287fdd..a3aab3a 100644 --- a/C3d/Include/pars_equation_tree.h +++ b/C3d/Include/pars_equation_tree.h @@ -75,7 +75,7 @@ struct CharacterPointInfo equPoint_DerBreak1 ///< \ru Разрыв производной. \en Derivative discontinuity. }; - const BTreeNode * m_tree; ///< \ru Узел дерева. Не равен c3d_null. \en Node of a tree. Not equal to c3d_null. + const BTreeNode * m_tree; ///< \ru Узел дерева. Не равен NULL. \en Node of a tree. Not equal to NULL. EquCharacterPointType m_type; ///< \ru Тип характерной точки. \en Type of a characteristic point. double m_ph; ///< \ru Значение параметра функции. \en The value of the function parameter. double m_period; ///< \ru Период функции. \en A period of a function. @@ -653,8 +653,8 @@ IMPL_PERSISTENT_OPS( TreeIntervalNode ) // --- class MATH_CLASS IntervalConstNode : public TreeIntervalNode { - BTreeNode * m_firstValue; ///< \ru Первое значение (всегда не c3d_null). \en First value (always not c3d_null). - BTreeNode * m_secondValue; ///< \ru Второе значение (всегда не c3d_null). \en Second value (always not c3d_null). + BTreeNode * m_firstValue; ///< \ru Первое значение (всегда не NULL). \en First value (always not NULL). + BTreeNode * m_secondValue; ///< \ru Второе значение (всегда не NULL). \en Second value (always not NULL). public: @@ -752,7 +752,7 @@ IMPL_PERSISTENT_OPS( IntervalConstNode ) // --- class MATH_CLASS IntervalIdentNode : public TreeIntervalNode { - ItIntervalTreeVariable * m_ident; ///< \ru Всегда не c3d_null. \en Always not c3d_null. + ItIntervalTreeVariable * m_ident; ///< \ru Всегда не NULL. \en Always not NULL. public: /** \brief \ru Конструктор. @@ -867,7 +867,7 @@ public: \details \ru Получить вложенный узел по индексу.\n \en Get a child node by an index.\n \~ */ - virtual BTreeNode * GetSubNode( size_t /*i*/ ) { return c3d_null; } + virtual BTreeNode * GetSubNode( size_t /*i*/ ) { return NULL; } virtual bool GetDefRange(DefRange &, ItTreeVariable &, bool /*stopOnBreak*/ ) const { return true; } @@ -981,7 +981,7 @@ public : \{ */ /// \ru Дать вложенный узел по индексу. \en Get a child node by an index. - virtual BTreeNode * GetSubNode( size_t /*i*/ ) { return c3d_null; } + virtual BTreeNode * GetSubNode( size_t /*i*/ ) { return NULL; } virtual bool GetDefRange( DefRange &, ItTreeVariable &, bool /*stopOnBreak*/ ) const{ return true; } diff --git a/C3d/Include/pars_user_function.h b/C3d/Include/pars_user_function.h index 4c82ef1..1f7e73a 100644 --- a/C3d/Include/pars_user_function.h +++ b/C3d/Include/pars_user_function.h @@ -96,7 +96,7 @@ public: /// \ru Получить массив параметров. \en Get array of parameters. void GetPars ( RPArray & pars ) const; /// \ru Получить аргумент по индексу. \en Get argument by index. - ItTreeVariable * GetPar( size_t i ) const { return i < m_vars.Count() ? m_vars[i] : c3d_null; } + ItTreeVariable * GetPar( size_t i ) const { return i < m_vars.Count() ? m_vars[i] : NULL; } /// \ru Подготовить объект к записи. \en Prepare an object for writing. void WritingBeginEnd( bool begin ) { RegisterVars( begin ? registrable : noRegistrable ); } /// \ru Оператор присваивания. \en Assignment operator. diff --git a/C3d/Include/part_solid.h b/C3d/Include/part_solid.h index 4613b43..b8e0251 100644 --- a/C3d/Include/part_solid.h +++ b/C3d/Include/part_solid.h @@ -431,7 +431,7 @@ public: {} public: /// \ru Проверить данные на корректность. \en Check data for correctness. - bool IsValid() const { return (part != c3d_null && ind > -1 && id != SYS_MAX_UINT32); } + bool IsValid() const { return (part != NULL && ind > -1 && id != SYS_MAX_UINT32); } private: /// \ru Конструктор без параметров. \en Constructor without parameters. MbPartSolidData(); diff --git a/C3d/Include/plane_instance.h b/C3d/Include/plane_instance.h index 83a55a8..b385b7d 100644 --- a/C3d/Include/plane_instance.h +++ b/C3d/Include/plane_instance.h @@ -66,10 +66,10 @@ public : // \ru Общие функции геометрического объекта. \en Common functions of a geometric object. virtual MbeSpaceType IsA() const; // \ru Тип объекта. \en A type of an object. - virtual MbSpaceItem & Duplicate( MbRegDuplicate * iReg = c3d_null ) const; // \ru Создать копию. \en Create a copy. - virtual void Transform( const MbMatrix3D &, MbRegTransform * = c3d_null ); // \ru Преобразовать согласно матрице. \en Transform according to the matrix. - virtual void Move ( const MbVector3D &, MbRegTransform * = c3d_null ); // \ru Сдвинуть вдоль вектора. \en Translate along a vector. - virtual void Rotate ( const MbAxis3D &, double angle, MbRegTransform * = c3d_null ); // \ru Повернуть вокруг оси. \en Rotate about an axis. + virtual MbSpaceItem & Duplicate( MbRegDuplicate * iReg = NULL ) const; // \ru Создать копию. \en Create a copy. + virtual void Transform( const MbMatrix3D &, MbRegTransform * = NULL ); // \ru Преобразовать согласно матрице. \en Transform according to the matrix. + virtual void Move ( const MbVector3D &, MbRegTransform * = NULL ); // \ru Сдвинуть вдоль вектора. \en Translate along a vector. + virtual void Rotate ( const MbAxis3D &, double angle, MbRegTransform * = NULL ); // \ru Повернуть вокруг оси. \en Rotate about an axis. virtual bool IsSame ( const MbSpaceItem &, double accuracy = LENGTH_EPSILON ) const; // \ru Являются ли объекты равными? \en Are the objects equal? virtual bool IsSimilar( const MbSpaceItem & ) const; // \ru Являются ли объекты подобными? \en Are the objects similar? virtual bool SetEqual ( const MbSpaceItem & ); // \ru Сделать объекты равными. \en Make the objects equal. @@ -104,7 +104,7 @@ public : MbPlaneItem * SetPlaneItem( size_t ind = 0 ); /// \ru Заменить двумерный геометрический объект. \en Replace two-dimensional geometric object. bool SetPlaneItem( MbPlaneItem * init, size_t ind = 0 ); - /// \ru Добавить двумерный геометрический объект. \en Add two-dimensional geometric object. The method returns the index of added or existing object in MbPlaneInstance (the method returns SYS_MAX_T if the object is c3d_null). + /// \ru Добавить двумерный геометрический объект. \en Add two-dimensional geometric object. The method returns the index of added or existing object in MbPlaneInstance (the method returns SYS_MAX_T if the object is NULL). size_t AddPlaneItem( MbPlaneItem * init ); /// \ru Метод возвращает индекс двумерного геометрического объекта. \en The method returns the index of two-dimensional geometric object in MbPlaneInstance (the method returns SYS_MAX_T if the object was not finded). size_t GetIndex( MbPlaneItem * init ); @@ -114,13 +114,13 @@ public : MbPlacement3D & SetPlacement() { return place; } /// \ru Преобразовать двумерный объект согласно матрице. \en Transform two-dimensional object according to the matrix. - void Transform( const MbMatrix &, MbRegTransform * iReg = c3d_null ); + void Transform( const MbMatrix &, MbRegTransform * iReg = NULL ); /// \ru Сдвинуть двумерный объект вдоль вектора. \en Translate two-dimensional object along a vector. - void Move ( const MbVector &, MbRegTransform * iReg = c3d_null ); + void Move ( const MbVector &, MbRegTransform * iReg = NULL ); /// \ru Повернуть двумерный объект вокруг точки на заданный угол. \en Rotate two-dimensional object at a given angle around an axis. - void Rotate ( const MbCartPoint & pnt, const MbDirection & angle, MbRegTransform * iReg = c3d_null ); + void Rotate ( const MbCartPoint & pnt, const MbDirection & angle, MbRegTransform * iReg = NULL ); /// \ru Повернуть двумерный объект вокруг точки на заданный угол. \en Rotate two-dimensional object at a given angle around an axis. - void Rotate ( const MbCartPoint & pnt, double angle, MbRegTransform * iReg = c3d_null ); + void Rotate ( const MbCartPoint & pnt, double angle, MbRegTransform * iReg = NULL ); /// \ru Удалить все объекты эскиза. \en Delete all the sketch items. void DeleteItems(); @@ -168,7 +168,7 @@ inline MbPlaneInstance::MbPlaneInstance( const MbPlacement3D & p, const PlaneIte planeItems.reserve( addCnt ); for ( size_t k = 0; k < addCnt; ++k ) { const MbPlaneItem * planeItem = inits[k]; - if ( planeItem != c3d_null ) { + if ( planeItem != NULL ) { planeItem->AddRef(); planeItems.push_back( const_cast( planeItem ) ); } @@ -187,7 +187,7 @@ void MbPlaneInstance::GetItems( PlaneItems & items ) const items.reserve( items.size() + addCnt ); SPtr item_i; for ( size_t i = 0; i < addCnt; ++i ) { - if ( planeItems[i] != c3d_null ) { + if ( planeItems[i] != NULL ) { item_i = planeItems[i]; items.push_back( item_i ); } diff --git a/C3d/Include/plane_item.h b/C3d/Include/plane_item.h index 8447db5..a4e3fb7 100644 --- a/C3d/Include/plane_item.h +++ b/C3d/Include/plane_item.h @@ -143,7 +143,7 @@ public : \return \ru Копия объекта. \en Copy of the object. \~ */ - virtual MbPlaneItem & Duplicate( MbRegDuplicate * iReg = c3d_null ) const = 0; + virtual MbPlaneItem & Duplicate( MbRegDuplicate * iReg = NULL ) const = 0; /** \brief \ru Преобразовать согласно матрице. \en Transform according to the matrix. \~ @@ -174,7 +174,7 @@ public : For transformation of projection curve. It isn't considered if the surface is planar. \~ */ - virtual void Transform( const MbMatrix & matr, MbRegTransform * iReg = c3d_null, const MbSurface * newSurface = c3d_null ) = 0; + virtual void Transform( const MbMatrix & matr, MbRegTransform * iReg = NULL, const MbSurface * newSurface = NULL ) = 0; /** \brief \ru Сдвинуть вдоль вектора. \en Translate along a vector. \~ @@ -205,7 +205,7 @@ public : For transformation of projection curve. It isn't considered if the surface is planar. \~ */ - virtual void Move ( const MbVector & to, MbRegTransform * iReg = c3d_null, const MbSurface * newSurface = c3d_null ) = 0; + virtual void Move ( const MbVector & to, MbRegTransform * iReg = NULL, const MbSurface * newSurface = NULL ) = 0; /** \brief \ru Повернуть вокруг точки. \en Rotate about a point. \~ @@ -239,7 +239,7 @@ public : It isn't considered if the surface is planar. \~ */ virtual void Rotate( const MbCartPoint & pnt, const MbDirection & angle, - MbRegTransform * iReg = c3d_null, const MbSurface * newSurface = c3d_null ) = 0; + MbRegTransform * iReg = NULL, const MbSurface * newSurface = NULL ) = 0; /** \brief \ru Повернуть вокруг точки. \en Rotate about a point. \~ @@ -261,7 +261,7 @@ public : It isn't considered if the surface is planar. \~ */ void Rotate( const MbCartPoint & pnt, double angle, - MbRegTransform * iReg = c3d_null, const MbSurface * newSurface = c3d_null ); + MbRegTransform * iReg = NULL, const MbSurface * newSurface = NULL ); /** \brief \ru Определить, являются ли объекты равными. \en Determine whether objects are equal. \~ diff --git a/C3d/Include/point3d.h b/C3d/Include/point3d.h index 7bb9d1b..0f0479a 100644 --- a/C3d/Include/point3d.h +++ b/C3d/Include/point3d.h @@ -49,10 +49,10 @@ public: virtual MbeSpaceType IsA() const; // \ru Тип объекта. \en A type of an object. virtual MbeSpaceType Type() const; // \ru Групповой тип объекта. \en Group type of object. virtual MbeSpaceType Family() const; // \ru Семейство объекта. \en Family of object. - virtual MbSpaceItem & Duplicate( MbRegDuplicate * = c3d_null ) const; // \ru Создать копию. \en Create a copy. - virtual void Transform( const MbMatrix3D &, MbRegTransform * = c3d_null ); // \ru Преобразовать согласно матрице. \en Transform according to the matrix. - virtual void Move ( const MbVector3D &, MbRegTransform * = c3d_null ); // \ru Сдвинуть вдоль вектора. \en Translate along a vector. - virtual void Rotate ( const MbAxis3D &, double angle, MbRegTransform * = c3d_null ); // \ru Повернуть вокруг оси. \en Rotate about an axis. + virtual MbSpaceItem & Duplicate( MbRegDuplicate * = NULL ) const; // \ru Создать копию. \en Create a copy. + virtual void Transform( const MbMatrix3D &, MbRegTransform * = NULL ); // \ru Преобразовать согласно матрице. \en Transform according to the matrix. + virtual void Move ( const MbVector3D &, MbRegTransform * = NULL ); // \ru Сдвинуть вдоль вектора. \en Translate along a vector. + virtual void Rotate ( const MbAxis3D &, double angle, MbRegTransform * = NULL ); // \ru Повернуть вокруг оси. \en Rotate about an axis. virtual bool IsSame ( const MbSpaceItem & other, double accuracy = LENGTH_EPSILON ) const; // \ru Являются ли объекты равными? \en Are the objects equal? virtual bool SetEqual ( const MbSpaceItem & init ); // \ru Сделать объекты равным. \en Make the objects equal. virtual double DistanceToPoint ( const MbCartPoint3D & ) const; // \ru Вычислить расстояние до точки. \en Calculate the distance to a point. diff --git a/C3d/Include/point_frame.h b/C3d/Include/point_frame.h index f1c18ff..e930442 100644 --- a/C3d/Include/point_frame.h +++ b/C3d/Include/point_frame.h @@ -72,7 +72,7 @@ public: size_t vertsCnt = verts.size(); vertices.reserve( vertsCnt ); for ( size_t k = 0; k < vertsCnt; ++k ) { - if ( verts[k] != c3d_null ) + if ( verts[k] != NULL ) AddVertex( const_cast( *verts[k] ), same ); } } @@ -96,10 +96,10 @@ public: // \ru Общие функции геометрического объекта \en Common functions of a geometric object virtual MbeSpaceType IsA() const; // \ru Тип объекта. \en A type of an object. virtual MbeSpaceType Type() const; // \ru Групповой тип объекта. \en Group type of object. - virtual MbSpaceItem & Duplicate( MbRegDuplicate * = c3d_null ) const; // \ru Создать копию. \en Create a copy. - virtual void Transform( const MbMatrix3D &, MbRegTransform * = c3d_null ); // \ru Преобразовать согласно матрице. \en Transform according to the matrix. - virtual void Move ( const MbVector3D &, MbRegTransform * = c3d_null ); // \ru Сдвинуть вдоль вектора. \en Translate along a vector. - virtual void Rotate ( const MbAxis3D &, double angle, MbRegTransform * = c3d_null ); // \ru Повернуть вокруг оси. \en Rotate about an axis. + virtual MbSpaceItem & Duplicate( MbRegDuplicate * = NULL ) const; // \ru Создать копию. \en Create a copy. + virtual void Transform( const MbMatrix3D &, MbRegTransform * = NULL ); // \ru Преобразовать согласно матрице. \en Transform according to the matrix. + virtual void Move ( const MbVector3D &, MbRegTransform * = NULL ); // \ru Сдвинуть вдоль вектора. \en Translate along a vector. + virtual void Rotate ( const MbAxis3D &, double angle, MbRegTransform * = NULL ); // \ru Повернуть вокруг оси. \en Rotate about an axis. virtual bool IsSame ( const MbSpaceItem &, double accuracy = LENGTH_EPSILON ) const; // \ru Являются ли объекты равными? \en Are the objects equal? virtual bool IsSimilar( const MbSpaceItem & ) const; // \ru Являются ли объекты подобными? \en Are the objects similar? virtual bool SetEqual ( const MbSpaceItem & ); // \ru Сделать объекты равным. \en Make the objects equal. @@ -128,9 +128,9 @@ public: /// \ru Выдать количество вершин. \en Get count of vertices. size_t GetVerticesCount() const { return vertices.size(); } /// \ru Получить вершину по индексу. \en Get vertex by an index. - const MbVertex * GetVertex( size_t k ) const { return ((k < vertices.size()) ? vertices[k] : c3d_null ); } + const MbVertex * GetVertex( size_t k ) const { return ((k < vertices.size()) ? vertices[k] : NULL ); } /// \ru Получить вершину по индексу для возможного редактирования. \en Get vertex by an index for the possible editing. - MbVertex * SetVertex( size_t k ) { return ((k < vertices.size()) ? vertices[k] : c3d_null ); } + MbVertex * SetVertex( size_t k ) { return ((k < vertices.size()) ? vertices[k] : NULL ); } /// \ru Получить вершины. \en Get vertices. template diff --git a/C3d/Include/position_data.h b/C3d/Include/position_data.h index 180873b..9e729a0 100644 --- a/C3d/Include/position_data.h +++ b/C3d/Include/position_data.h @@ -170,7 +170,7 @@ public: /// \ru Установить замкнутость. \en Set closedness. void SetClosed( bool c ) { closed = c; } - const MbCurveEdge * Edge ( size_t i ) const { return ( i < edges.Count() ) ? edges[i] : c3d_null; } + const MbCurveEdge * Edge ( size_t i ) const { return ( i < edges.Count() ) ? edges[i] : NULL; } const bool Sense( size_t i ) const { return ( i < sense.Count() ) ? sense[i] : false; } size_t Count() const { return edges.Count(); } /// \ru Оператор присваивания. \en Assignment operator. diff --git a/C3d/Include/reference_item.h b/C3d/Include/reference_item.h index a6c4401..f8f459c 100644 --- a/C3d/Include/reference_item.h +++ b/C3d/Include/reference_item.h @@ -191,9 +191,9 @@ template MbSerialItem::~MbSerialItem() template inline void DeleteMatItem( Type *& item ) { - if ( item != c3d_null ) { + if ( item != NULL ) { delete item; - item = c3d_null; + item = NULL; } } @@ -244,8 +244,8 @@ Type & DuplicateIfUsed( Type & item, RegType * iReg ) template Type * DuplicateIfUsed( SPtr & item ) { - if ( item == c3d_null ) - return c3d_null; + if ( item == NULL ) + return NULL; Type * resItem = item.get(); if ( item->GetUseCount() > 1 ) // \ru Если оригинал, то делаем копию. \en If there is original, then make a copy. resItem = static_cast( &item->Duplicate() ); @@ -260,8 +260,8 @@ Type * DuplicateIfUsed( SPtr & item ) template Type * DuplicateIfUsed( SPtr & item, RegType * iReg ) { - if ( item == c3d_null ) - return c3d_null; + if ( item == NULL ) + return NULL; Type * resItem = item.get(); if ( item->GetUseCount() > 1 ) // \ru Если оригинал, то делаем копию. \en If there is original, then make a copy. resItem = static_cast( &item->Duplicate( iReg ) ); @@ -275,10 +275,10 @@ Type * DuplicateIfUsed( SPtr & item, RegType * iReg ) template void DeleteItem( Type *& item ) { - if ( item != c3d_null ) { + if ( item != NULL ) { if ( item->GetUseCount() < 1 ) delete item; - item = c3d_null; + item = NULL; } } @@ -288,9 +288,9 @@ void DeleteItem( Type *& item ) template void ReleaseItem( Type *& item ) { - if ( item != c3d_null ) { + if ( item != NULL ) { item->Release(); - item = c3d_null; + item = NULL; } } @@ -300,7 +300,7 @@ void ReleaseItem( Type *& item ) template void AddRefItem( const Type * item ) { - if ( item != c3d_null ) + if ( item != NULL ) item->AddRef(); } @@ -310,7 +310,7 @@ void AddRefItem( const Type * item ) template void DecRefItem( const Type * item ) { - if ( item != c3d_null ) + if ( item != NULL ) item->DecRef(); } @@ -318,11 +318,11 @@ void DecRefItem( const Type * item ) //------------------------------------------------------------------------------ /// \ru Захватить объекты. \en Catch objects. // --- -template -void AddRefItems( const ItemsVector & items ) +template +void AddRefItems( const Vector & items ) { for ( size_t k = 0, itemsCnt = items.size(); k < itemsCnt; ++k ) { - if ( items[k] != c3d_null ) + if ( items[k] != NULL ) items[k]->AddRef(); } } @@ -331,11 +331,11 @@ void AddRefItems( const ItemsVector & items ) //------------------------------------------------------------------------------ /// \ru Отпустить объекты без удаления. \en Detach objects without removing. // --- -template -void DecRefItems( const ItemsVector & items ) +template +void DecRefItems( const Vector & items ) { for ( size_t k = 0, itemsCnt = items.size(); k < itemsCnt; ++k ) { - if ( items[k] != c3d_null ) + if ( items[k] != NULL ) items[k]->DecRef(); } } @@ -344,8 +344,8 @@ void DecRefItems( const ItemsVector & items ) //------------------------------------------------------------------------------ /// \ru Удалить никому не нужные объекты. \en Remove unnecessary objects. // --- -template -void DeleteItems( ItemsVector & items ) +template +void DeleteItems( Vector & items ) { for ( size_t k = 0, itemsCnt = items.size(); k < itemsCnt; ++k ) ::DeleteItem( items[k] ); @@ -356,8 +356,8 @@ void DeleteItems( ItemsVector & items ) //------------------------------------------------------------------------------ /// \ru Отпустить объекты с возможным удалением. \en Detach objects with possible removing. // --- -template -void ReleaseItems( ItemsVector & items ) +template +void ReleaseItems( Vector & items ) { for ( size_t k = 0, itemsCnt = items.size(); k < itemsCnt; ++k ) ::ReleaseItem( items[k] ); @@ -368,24 +368,8 @@ void ReleaseItems( ItemsVector & items ) //------------------------------------------------------------------------------ /// \ru Удалить никому не нужные объекты. \en Remove unnecessary objects. // --- -template -void DeleteItems( ItemsVector & items, SArray & coItems ) -{ - size_t itemsCnt = items.size(); - if ( itemsCnt > 0 ) { - for ( size_t k = 0; k < itemsCnt; ++k ) - ::DeleteItem( items[k] ); - items.clear(); - coItems.clear(); - } -} - - -//------------------------------------------------------------------------------ -/// \ru Удалить никому не нужные объекты. \en Remove unnecessary objects. -// --- -template -void DeleteItems( ItemsVector & items, std::vector & coItems ) +template +void DeleteItems( Vector & items, SArray & coItems ) { size_t itemsCnt = items.size(); if ( itemsCnt > 0 ) { @@ -400,24 +384,8 @@ void DeleteItems( ItemsVector & items, std::vector & coItems ) //------------------------------------------------------------------------------ /// \ru Отпустить объекты с возможным удалением. \en Detach objects with possible removing. // --- -template -void ReleaseItems( ItemsVector & items, SArray & coItems ) -{ - size_t itemsCnt = items.size(); - if ( itemsCnt > 0 ) { - for ( size_t k = 0; k < itemsCnt; ++k ) - ::ReleaseItem( items[k] ); - items.clear(); - coItems.clear(); - } -} - - -//------------------------------------------------------------------------------ -/// \ru Отпустить объекты с возможным удалением. \en Detach objects with possible removing. -// --- -template -void ReleaseItems( ItemsVector & items, std::vector & coItems ) +template +void ReleaseItems( Vector & items, SArray & coItems ) { size_t itemsCnt = items.size(); if ( itemsCnt > 0 ) { @@ -438,7 +406,7 @@ void AddRefItems( const TypeVector & srcItems, bool same, RPArray & dstIte if ( (srcItems.size() > 0) && reinterpret_cast( &srcItems ) != reinterpret_cast( &dstItems ) ) { dstItems.reserve( dstItems.size() + srcItems.size() ); for ( size_t k = 0, cnt = srcItems.size(); k < cnt; ++k ) { - if ( srcItems[k] != c3d_null ) { + if ( srcItems[k] != NULL ) { Type * srcItem = &const_cast(*srcItems[k]); Type * dstItem = same ? srcItem : static_cast( &srcItem->Duplicate() ); dstItem->AddRef(); @@ -458,7 +426,7 @@ void AddRefItems( const TypeVector & srcItems, bool same, std::vector< SPtr 0) && reinterpret_cast(&srcItems) != reinterpret_cast(&dstItems) ) { dstItems.reserve( dstItems.size() + srcItems.size() ); for ( size_t k = 0, cnt = srcItems.size(); k < cnt; k++ ) { - if ( srcItems[k] != c3d_null ) { + if ( srcItems[k] != NULL ) { Type * srcItem = &const_cast(*srcItems[k]); SPtr dstItem; dstItem = same ? srcItem : static_cast( &srcItem->Duplicate() ); @@ -478,7 +446,7 @@ void AddRefItems( const TypeVector & srcItems, bool same, std::vector & if ( (srcItems.size() > 0) && reinterpret_cast( &srcItems ) != reinterpret_cast( &dstItems ) ) { dstItems.reserve( dstItems.size() + srcItems.size() ); for ( size_t k = 0, cnt = srcItems.size(); k < cnt; ++k ) { - if ( srcItems[k] != c3d_null ) { + if ( srcItems[k] != NULL ) { Type * srcItem = &const_cast(*srcItems[k]); Type * dstItem = same ? srcItem : static_cast( &srcItem->Duplicate() ); dstItem->AddRef(); @@ -498,7 +466,7 @@ void AddRefRegItems( const TypeVector & srcItems, bool same, RPArray & dst if ( (srcItems.size() > 0) && reinterpret_cast(&srcItems) != reinterpret_cast(&dstItems) ) { dstItems.reserve( dstItems.size() + srcItems.size() ); for ( size_t k = 0, cnt = srcItems.size(); k < cnt; ++k ) { - if ( srcItems[k] != c3d_null ) { + if ( srcItems[k] != NULL ) { Type * srcItem = &const_cast(*srcItems[k]); Type * dstItem = same ? srcItem : static_cast( &srcItem->Duplicate( iReg ) ); dstItem->AddRef(); @@ -518,7 +486,7 @@ void AddRefRegItems( const TypeVector & srcItems, bool same, std::vector< SPtr 0) && reinterpret_cast(&srcItems) != reinterpret_cast(&dstItems) ) { dstItems.reserve( dstItems.size() + srcItems.size() ); for ( size_t k = 0, cnt = srcItems.size(); k < cnt; ++k ) { - if ( srcItems[k] != c3d_null ) { + if ( srcItems[k] != NULL ) { Type * srcItem = &const_cast(*srcItems[k]); SPtr dstItem; dstItem = same ? srcItem : static_cast( &srcItem->Duplicate( iReg ) ); @@ -538,7 +506,7 @@ void AddRefRegItems( const TypeVector & srcItems, bool same, std::vector if ( (srcItems.size() > 0) && reinterpret_cast(&srcItems) != reinterpret_cast(&dstItems) ) { dstItems.reserve( dstItems.size() + srcItems.size() ); for ( size_t k = 0, cnt = srcItems.size(); k < cnt; ++k ) { - if ( srcItems[k] != c3d_null ) { + if ( srcItems[k] != NULL ) { Type * srcItem = &const_cast(*srcItems[k]); Type * dstItem = same ? srcItem : static_cast( &srcItem->Duplicate( iReg ) ); dstItem->AddRef(); @@ -555,9 +523,9 @@ void AddRefRegItems( const TypeVector & srcItems, bool same, std::vector template bool IsItemSame( const Item * item1, const Item * item2, double accuracy ) { - if ( (item1 == c3d_null) && (item2 == c3d_null) ) + if ( (item1 == NULL) && (item2 == NULL) ) return true; - else if ( (item1 != c3d_null) && (item2 != c3d_null) && item1->IsSame( *item2, accuracy ) ) + else if ( (item1 != NULL) && (item2 != NULL) && item1->IsSame( *item2, accuracy ) ) return true; return false; } @@ -575,7 +543,7 @@ bool AreItemsSame( const Vector & items1, const Vector & items2, double accuracy if ( cnt == items2.size() ) { areEqual = true; for ( size_t k = 0; k < cnt; ++k ) { - if ( (items1[k] == c3d_null) || (items2[k] == c3d_null) || !items1[k]->IsSame( *items2[k], accuracy ) ) { + if ( (items1[k] == NULL) || (items2[k] == NULL) || !items1[k]->IsSame( *items2[k], accuracy ) ) { areEqual = false; break; } @@ -621,7 +589,7 @@ bool AreItemsSimilar( const Vector & items1, const Vector & items2 ) if ( cnt == items2.size() ) { areEqual = true; for ( size_t k = 0; k < cnt; ++k ) { - if ( (items1[k] == c3d_null) || (items2[k] == c3d_null) || !items1[k]->IsSimilar( *items2[k] ) ) { + if ( (items1[k] == NULL) || (items2[k] == NULL) || !items1[k]->IsSimilar( *items2[k] ) ) { areEqual = false; break; } @@ -646,7 +614,7 @@ bool SetItemsEqual( const Vector & srcItems, Vector & dstItems ) if ( setEqual ) { for ( size_t k = 0; k < cnt; ++k ) { - if ( srcItems[k] == c3d_null || dstItems[k] == c3d_null || !dstItems[k]->SetEqual( *srcItems[k] ) ) { + if ( srcItems[k] == NULL || dstItems[k] == NULL || !dstItems[k]->SetEqual( *srcItems[k] ) ) { setEqual = false; break; } @@ -668,7 +636,7 @@ void DuplicateItems( const TypeVector & srcItems, RegType * iReg, bool same, RPA dstItems.Reserve( srcItems.size() ); for ( size_t k = 0, cnt = srcItems.size(); k < cnt; ++k ) { Type * srcItem = srcItems[k]; - if ( srcItem != c3d_null ) { + if ( srcItem != NULL ) { Type * dstItem = same ? srcItem : static_cast( &srcItem->Duplicate( iReg ) ); dstItems.push_back( dstItem ); } @@ -686,7 +654,7 @@ void DuplicateItems( const TypeVector & srcItems, RegType * iReg, bool same, std dstItems.reserve( dstItems.size() + srcItems.size() ); for ( size_t k = 0, cnt = srcItems.size(); k < cnt; ++k ) { Type * srcItem = srcItems[k]; - if ( srcItem != c3d_null ) { + if ( srcItem != NULL ) { SPtr dstItem; dstItem = same ? srcItem : static_cast( &srcItem->Duplicate( iReg ) ); dstItems.push_back( dstItem ); @@ -705,7 +673,7 @@ void DuplicateItems( const TypeVector & srcItems, RegType * iReg, bool same, std dstItems.reserve( dstItems.size() + srcItems.size() ); for ( size_t k = 0, cnt = srcItems.size(); k < cnt; ++k ) { Type * srcItem = srcItems[k]; - if ( srcItem != c3d_null ) { + if ( srcItem != NULL ) { Type * dstItem = same ? srcItem : static_cast( &srcItem->Duplicate( iReg ) ); dstItems.push_back( dstItem ); } @@ -720,7 +688,7 @@ template void TransformItems( Array & items, const Matrix & matr, RegType * iReg ) { for ( size_t k = 0, cnt = items.size(); k < cnt; ++k ) { - if ( items[k] != c3d_null ) + if ( items[k] != NULL ) items[k]->Transform( matr, iReg ); } } @@ -743,7 +711,7 @@ template void MoveItems( Array & items, const Vector & to, RegType * iReg ) { for ( size_t k = 0, cnt = items.size(); k < cnt; ++k ) { - if ( items[k] != c3d_null ) + if ( items[k] != NULL ) items[k]->Move( to, iReg ); } } @@ -766,7 +734,7 @@ template void RotateItems( Array & items, const Axis & axis, double angle, RegType * iReg ) { for ( size_t k = 0, cnt = items.size(); k < cnt; ++k ) { - if ( items[k] != c3d_null ) + if ( items[k] != NULL ) items[k]->Rotate( axis, angle, iReg ); } } @@ -791,7 +759,7 @@ void WriteRefItems( const Vector & items, Writer & out ) size_t k, cnt = items.size(); for ( k = 0; k < cnt; ++k ) { - if ( items[k] == c3d_null ) + if ( items[k] == NULL ) cnt--; } @@ -799,7 +767,7 @@ void WriteRefItems( const Vector & items, Writer & out ) if ( out.good() ) { for ( k = 0; k < cnt; ++k ) { - if ( items[k] != c3d_null ) { + if ( items[k] != NULL ) { items[k]->PrepareWrite(); out << &(*items[k]); } @@ -817,7 +785,7 @@ void WriteRefItems( const std::vector< SPtr > & items, Writer & out ) size_t k, cnt = items.size(); for ( k = 0; k < cnt; ++k ) { - if ( items[k] == c3d_null ) + if ( items[k] == NULL ) cnt--; } @@ -825,7 +793,7 @@ void WriteRefItems( const std::vector< SPtr > & items, Writer & out ) if ( out.good() ) { for ( k = 0; k < cnt; ++k ) { - if ( items[k] != c3d_null ) { + if ( items[k] != NULL ) { items[k]->PrepareWrite(); out << items[k].get(); } @@ -846,9 +814,9 @@ void ReadRefItems( Reader & in, RPArray & items ) items.reserve( items.size() + cnt ); for ( size_t i = 0; i < cnt; ++i ) { - Type * item = c3d_null; + Type * item = NULL; in >> item; - if ( item != c3d_null ) { + if ( item != NULL ) { items.push_back( item ); item->AddRef(); } @@ -867,9 +835,9 @@ void ReadRefItems( Reader & in, std::vector & items ) if ( in.good() && cnt > 0 ) { for ( size_t i = 0; i < cnt; ++i ) { - Type * item = c3d_null; + Type * item = NULL; in >> item; - if ( item != c3d_null ) { + if ( item != NULL ) { items.push_back( item ); item->AddRef(); } @@ -888,9 +856,9 @@ void ReadRefItems( Reader & in, std::vector< SPtr > & items ) if ( in.good() && cnt > 0 ) { for ( size_t i = 0; i < cnt; ++i ) { - Type * item = c3d_null; + Type * item = NULL; in >> item; - if ( item != c3d_null ) + if ( item != NULL ) items.push_back( SPtr(item) ); } } @@ -1029,7 +997,7 @@ inline Type * DetachItem( SPtr & itemOwner ) template void ReplaceByCopy( Type *& item ) { - if ( item != c3d_null ) { + if ( item != NULL ) { Type * temp = (Type *)&item->Duplicate(); ::DeleteItem( item ); item = temp; diff --git a/C3d/Include/region.h b/C3d/Include/region.h index 995dc57..cc0c05c 100644 --- a/C3d/Include/region.h +++ b/C3d/Include/region.h @@ -51,7 +51,7 @@ public: MbRegion( const SPtr &, bool same ); ///< \ru Регион с одним внешним контуром. \en Region with one external contour. MbRegion( const RPArray &, bool same ); ///< \ru Регион с несколькими контурами. \en Region with several contours. MbRegion( const std::vector< SPtr > &, bool same ); ///< \ru Регион с несколькими контурами. \en Region with several contours. - MbRegion( const MbRegion &, bool same, MbRegDuplicate * iReg = c3d_null ); ///< \ru Конструктор копии. \en Copy-constructor. + MbRegion( const MbRegion &, bool same, MbRegDuplicate * iReg = NULL ); ///< \ru Конструктор копии. \en Copy-constructor. public: virtual ~MbRegion(); @@ -63,10 +63,10 @@ public: virtual MbePlaneType IsA() const; // \ru Тип объекта. \en A type of an object. virtual MbePlaneType Type() const; // \ru Групповой тип объекта. \en Group type of object. virtual MbePlaneType Family() const; // \ru Семейство объекта. \en Family of object. - virtual MbPlaneItem & Duplicate( MbRegDuplicate * = c3d_null ) const; // \ru Сделать копию. \en Create a copy - virtual void Transform( const MbMatrix &, MbRegTransform * = c3d_null, const MbSurface * newSurface = c3d_null ); // \ru Преобразовать согласно матрице. \en Transform according to the matrix. - virtual void Move ( const MbVector &, MbRegTransform * = c3d_null, const MbSurface * newSurface = c3d_null ); // \ru Сдвинуть вдоль вектора. \en Move along a vector. - virtual void Rotate ( const MbCartPoint &, const MbDirection & angle, MbRegTransform * iReg = c3d_null, const MbSurface * newSurface = c3d_null ); + virtual MbPlaneItem & Duplicate( MbRegDuplicate * = NULL ) const; // \ru Сделать копию. \en Create a copy + virtual void Transform( const MbMatrix &, MbRegTransform * = NULL, const MbSurface * newSurface = NULL ); // \ru Преобразовать согласно матрице. \en Transform according to the matrix. + virtual void Move ( const MbVector &, MbRegTransform * = NULL, const MbSurface * newSurface = NULL ); // \ru Сдвинуть вдоль вектора. \en Move along a vector. + virtual void Rotate ( const MbCartPoint &, const MbDirection & angle, MbRegTransform * iReg = NULL, const MbSurface * newSurface = NULL ); virtual bool IsSame ( const MbPlaneItem &, double accuracy = LENGTH_EPSILON ) const; // \ru Являются ли объекты равными? \en Determine whether objects are equal. virtual bool SetEqual ( const MbPlaneItem & ); // \ru Сделать объекты равным. \en Make objects equal. virtual void AddYourGabaritTo( MbRect & ) const; // \ru Добавить свой габарит в присланный габарит. \en Add your own bounding box into the sent bounding box. @@ -276,7 +276,7 @@ private: // --- MATH_FUNC (bool) CreateBooleanResultRegions( RPArray & contours1, RPArray & contours2, const MbRegionBooleanParams & operParams, RPArray & regions, - MbResultType * resInfo = c3d_null ); + MbResultType * resInfo = NULL ); //------------------------------------------------------------------------------- @@ -301,7 +301,7 @@ MATH_FUNC (bool) CreateBooleanResultRegions( RPArray & contours1, RPA // --- MATH_FUNC (bool) CreateBooleanResultRegions( MbRegion & region1, MbRegion & region2, const MbRegionBooleanParams & operParams, RPArray & regions, - MbResultType * resInfo = c3d_null ); + MbResultType * resInfo = NULL ); //------------------------------------------------------------------------------- diff --git a/C3d/Include/sheet_metal_param.h b/C3d/Include/sheet_metal_param.h index b897307..a62a2bd 100644 --- a/C3d/Include/sheet_metal_param.h +++ b/C3d/Include/sheet_metal_param.h @@ -36,19 +36,6 @@ enum MbeReleaseType { }; -//------------------------------------------------------------------------------ -/** \brief \ru Тип создаваемой части штамповки. - \en The type of stamping part being created. \~ - \ingroup Sheet_Metal_Modeling -*/ -// --- -enum MbeStampingCreatedType { - sct_add, ///< \ru Добавляемая часть штамповки. \en Added part of the stamping. - sct_substact, ///< \ru Вычитаемая часть штамповки. \en Substracted part of the stamping. - sct_all ///< \ru Вcя штамповка вместе с телом. \en All stamping with the body. -}; - - //------------------------------------------------------------------------------ /** \brief \ru Параметры сгиба. \en The bend parameters. \~ @@ -209,7 +196,7 @@ public: MbSurface *s = side1.GetSurface(); MbSweptWay w = side1.way; double d = side1.distance; - if (s!=c3d_null) + if (s!=NULL) s->AddRef(); side1.SetSurface( side2.GetSurface() ); side1.way = side2.way; @@ -217,7 +204,7 @@ public: side2.SetSurface( s ); side2.way = w; side2.distance = d; - if (s!=c3d_null) + if (s!=NULL) s->DecRef(); } /** \} */ @@ -1358,10 +1345,10 @@ struct MATH_CLASS MbRuledSolidValues { MbRuledSolidValues() : placement1 ( ), contour1 ( ), - breaks1 ( c3d_null ), - placement2 ( c3d_null ), - contour2 ( c3d_null ), - breaks2 ( c3d_null ), + breaks1 ( NULL ), + placement2 ( NULL ), + contour2 ( NULL ), + breaks2 ( NULL ), thickness ( 0.0 ), radius ( 0.0 ), slopeAngle ( 0.0 ), @@ -1375,16 +1362,16 @@ struct MATH_CLASS MbRuledSolidValues { cylindricBends ( false ), joinByVertices ( true ), surfDistance ( 0.0 ), - surface ( c3d_null ) { + surface ( NULL ) { } /// \ru Конструктор копирования. \en Copy-constructor. MbRuledSolidValues( const MbRuledSolidValues & other ) : placement1 ( other.placement1 ), contour1 (), - breaks1 ( (other.breaks1 != c3d_null) ? new SArray(*other.breaks1) : c3d_null ), - placement2 ( (other.placement2 != c3d_null) ? new MbPlacement3D(*other.placement2) : c3d_null ), - contour2 ( (other.contour2 != c3d_null) ? new MbContour() : c3d_null ), - breaks2 ( (other.breaks2 != c3d_null) ? new SArray(*other.breaks2) : c3d_null ), + breaks1 ( (other.breaks1 != NULL) ? new SArray(*other.breaks1) : NULL ), + placement2 ( (other.placement2 != NULL) ? new MbPlacement3D(*other.placement2) : NULL ), + contour2 ( (other.contour2 != NULL) ? new MbContour() : NULL ), + breaks2 ( (other.breaks2 != NULL) ? new SArray(*other.breaks2) : NULL ), thickness ( other.thickness ), radius ( other.radius ), slopeAngle ( other.slopeAngle ), @@ -1398,9 +1385,9 @@ struct MATH_CLASS MbRuledSolidValues { cylindricBends ( other.cylindricBends ), joinByVertices ( other.joinByVertices ), surfDistance ( other.surfDistance ), - surface ( (other.surface != c3d_null) ? static_cast(&other.surface->Duplicate()) : c3d_null ) { + surface ( (other.surface != NULL) ? static_cast(&other.surface->Duplicate()) : NULL ) { contour1.Init( other.contour1 ); - if ( contour2 != c3d_null && other.contour2 != c3d_null ) + if ( contour2 != NULL && other.contour2 != NULL ) contour2->Init( *other.contour2 ); } /// \ru Конструктор по конкретным параметрам. \en Constructor by specific parameters. @@ -1412,10 +1399,10 @@ struct MATH_CLASS MbRuledSolidValues { const double surfDist, const MbSurface * surf ) : placement1( place1 ), contour1(), - breaks1( (brks1 != c3d_null) ? new SArray(*brks1) : c3d_null ), - placement2( (place2 != c3d_null) ? new MbPlacement3D(*place2) : c3d_null ), - contour2( (cntr2 != c3d_null) ? new MbContour() : c3d_null ), - breaks2( (brks2 != c3d_null) ? new SArray(*brks2) : c3d_null ), + breaks1( (brks1 != NULL) ? new SArray(*brks1) : NULL ), + placement2( (place2 != NULL) ? new MbPlacement3D(*place2) : NULL ), + contour2( (cntr2 != NULL) ? new MbContour() : NULL ), + breaks2( (brks2 != NULL) ? new SArray(*brks2) : NULL ), thickness( thick ), radius( rad ), slopeAngle( sAngle ), @@ -1429,9 +1416,9 @@ struct MATH_CLASS MbRuledSolidValues { cylindricBends( cylBends ), joinByVertices( joinByVert ), surfDistance( surfDist ), - surface( (surf != c3d_null) ? static_cast(&surf->Duplicate()) : c3d_null ) { + surface( (surf != NULL) ? static_cast(&surf->Duplicate()) : NULL ) { contour1.Init( cntr1 ); - if ( (contour2 != c3d_null) && (cntr2 != c3d_null) ) + if ( (contour2 != NULL) && (cntr2 != NULL) ) contour2->Init( *cntr2 ); } @@ -1440,40 +1427,40 @@ struct MATH_CLASS MbRuledSolidValues { placement1.Init( other.placement1 ); contour1.Init( other.contour1 ); - if ( other.breaks1 != c3d_null ) { - if ( breaks1 != c3d_null ) + if ( other.breaks1 != NULL ) { + if ( breaks1 != NULL ) ((SArray &)*breaks1) = *other.breaks1; else breaks1 = new SArray( *other.breaks1 ); } else - breaks1 = c3d_null; + breaks1 = NULL; - if ( other.placement2 != c3d_null ) { - if ( placement2 != c3d_null ) + if ( other.placement2 != NULL ) { + if ( placement2 != NULL ) placement2->Init( *other.placement2 ); else placement2 = new MbPlacement3D( *other.placement2 ); } else - placement2 = c3d_null; + placement2 = NULL; - if ( other.contour2 != c3d_null ) { - if ( contour2 == c3d_null ) + if ( other.contour2 != NULL ) { + if ( contour2 == NULL ) contour2 = new MbContour(); contour2->Init( *other.contour2 ); } else - contour2 = c3d_null; + contour2 = NULL; - if ( other.breaks2 != c3d_null ) { - if ( breaks2 != c3d_null ) + if ( other.breaks2 != NULL ) { + if ( breaks2 != NULL ) ((SArray &)*breaks2) = *other.breaks2; else breaks2 = new SArray( *other.breaks2 ); } else - breaks1 = c3d_null; + breaks1 = NULL; thickness = other.thickness; radius = other.radius; @@ -1489,10 +1476,10 @@ struct MATH_CLASS MbRuledSolidValues { joinByVertices = other.joinByVertices; surfDistance = other.surfDistance; - if ( other.surface != c3d_null ) + if ( other.surface != NULL ) surface = static_cast( &other.surface->Duplicate() ); else - surface = c3d_null; + surface = NULL; } /// \ru Инициализировать контуры. \en Initialize contours. @@ -1501,40 +1488,40 @@ struct MATH_CLASS MbRuledSolidValues { placement1.Init( place1 ); contour1.Init( cntr1 ); - if ( brks1 != c3d_null ) { - if ( breaks1 != c3d_null ) + if ( brks1 != NULL ) { + if ( breaks1 != NULL ) ((SArray &)*breaks1) = *brks1; else breaks1 = new SArray( *brks1 ); } else - breaks1 = c3d_null; + breaks1 = NULL; - if ( place2 != c3d_null ) { - if ( placement2 != c3d_null ) + if ( place2 != NULL ) { + if ( placement2 != NULL ) placement2->Init( *place2 ); else placement2 = new MbPlacement3D( *place2 ); } else - placement2 = c3d_null; + placement2 = NULL; - if ( cntr2 != c3d_null ) { - if ( contour2 == c3d_null ) + if ( cntr2 != NULL ) { + if ( contour2 == NULL ) contour2 = new MbContour(); contour2->Init( *cntr2 ); } else - contour2 = c3d_null; + contour2 = NULL; - if ( brks2 != c3d_null ) { - if ( breaks2 != c3d_null ) + if ( brks2 != NULL ) { + if ( breaks2 != NULL ) ((SArray &)*breaks2) = *brks2; else breaks2 = new SArray( *brks2 ); } else - breaks1 = c3d_null; + breaks1 = NULL; } /// \ru Оператор присваивания. \en Assignment operator. @@ -1564,16 +1551,16 @@ struct MATH_CLASS MbRuledSolidValues { ::fabs( gapShift - other.gapShift ) < accuracy && ::fabs( surfDistance - other.surfDistance ) < accuracy ) { - bool isBreaks1 = breaks1 != c3d_null; - bool isOtherBreaks1 = other.breaks1 != c3d_null; - bool isPlacement2 = placement2 != c3d_null; - bool isOtherPlacement2 = other.placement2 != c3d_null; - bool isContour2 = contour2 != c3d_null; - bool isOtherContour2 = other.contour2 != c3d_null; - bool isBreaks2 = breaks2 != c3d_null; - bool isOtherBreaks2 = other.breaks2 != c3d_null; - bool isSurf = surface != c3d_null; - bool isOtherSurf = other.surface != c3d_null; + bool isBreaks1 = breaks1 != NULL; + bool isOtherBreaks1 = other.breaks1 != NULL; + bool isPlacement2 = placement2 != NULL; + bool isOtherPlacement2 = other.placement2 != NULL; + bool isContour2 = contour2 != NULL; + bool isOtherContour2 = other.contour2 != NULL; + bool isBreaks2 = breaks2 != NULL; + bool isOtherBreaks2 = other.breaks2 != NULL; + bool isSurf = surface != NULL; + bool isOtherSurf = other.surface != NULL; if ( isBreaks1 == isOtherBreaks1 && isPlacement2 == isOtherPlacement2 && @@ -1779,13 +1766,13 @@ public: size_t i, cnt; for ( i = 0, cnt = innerFaces.Count(); i < cnt && isSame; i++ ) - if ( innerFaces[i] == c3d_null || other.innerFaces[i] == c3d_null || !innerFaces[i]->IsSame( *other.innerFaces[i], accuracy ) ) { + if ( innerFaces[i] == NULL || other.innerFaces[i] == NULL || !innerFaces[i]->IsSame( *other.innerFaces[i], accuracy ) ) { isSame = false; break; } for ( i = 0, cnt = outerFaces.Count(); i < cnt && isSame; i++ ) - if ( outerFaces[i] == c3d_null || other.outerFaces[i] == c3d_null || !outerFaces[i]->IsSame( *other.outerFaces[i], accuracy ) ) { + if ( outerFaces[i] == NULL || other.outerFaces[i] == NULL || !outerFaces[i]->IsSame( *other.outerFaces[i], accuracy ) ) { isSame = false; break; } @@ -1916,33 +1903,29 @@ private: struct MATH_CLASS MbToolStampingValues { double punchFilletRadius; ///< \ru Радиус скругления основания со стороны пуансона (отрицательное значение запрещает скругление). \en Punch fillet radius of base (negative value prohibits fillet). double dieFilletRadius; ///< \ru Радиус скругления основания со стороны матрицы (отрицательное значение запрещает скругление). \en Die fillet radius of base (negative value prohibits fillet). - double toolFilletRadius; ///< \ru Радиус скругления негладких ребер инструмента (отрицательное значение запрещает скругление). \en Fillet radius of sharp edges of tool (negative value prohibits fillet). double stampThickness; ///< \ru Толщина формованной части. \en Thickness of a stamped part. - bool filletToolEdges; ///< \ru Флаг скругления острых ребер инструмента. \en Flag of fillet sharp edges of tool solid. + bool constantThickness; ///< \ru Флаг постоянной толщины на штамповке. \en Constant thickness flag. /// \ru Конструктор по умолчанию. \en Default constructor. MbToolStampingValues() : punchFilletRadius( 0.0 ), dieFilletRadius ( 0.0 ), - toolFilletRadius ( 0.0 ), stampThickness ( 0.0 ), - filletToolEdges ( true ) + constantThickness( true ) {} /// \ru Конструктор копирования. \en Copy-constructor. MbToolStampingValues( const MbToolStampingValues & other ) : punchFilletRadius( other.punchFilletRadius ), dieFilletRadius ( other.dieFilletRadius ), - toolFilletRadius ( other.toolFilletRadius ), stampThickness ( other.stampThickness ), - filletToolEdges ( other.filletToolEdges ) + constantThickness( other.constantThickness ) {} /// \ru Конструктор по конкретным параметрам. \en Constructor by specific parameters. - MbToolStampingValues( double punchRad, double dieRad, double toolRad, double thick, bool filletTool ) : + MbToolStampingValues( double punchRad, double dieRad, double thick, bool constThick ) : punchFilletRadius( punchRad ), dieFilletRadius ( dieRad ), - toolFilletRadius ( toolRad ), stampThickness ( thick ), - filletToolEdges ( filletTool ) + constantThickness( constThick ) {} /// \ru Оператор присваивания. \en Assignment operator. @@ -1951,9 +1934,8 @@ struct MATH_CLASS MbToolStampingValues { void Init( const MbToolStampingValues & other ) { punchFilletRadius = other.punchFilletRadius; dieFilletRadius = other.dieFilletRadius; - toolFilletRadius = other.toolFilletRadius; stampThickness = other.stampThickness; - filletToolEdges = other.filletToolEdges; + constantThickness = other.constantThickness; } ///\ru Являются ли объекты равными? \en Determine whether an object is equal? @@ -1962,9 +1944,8 @@ struct MATH_CLASS MbToolStampingValues { if ( ::fabs(punchFilletRadius - other.punchFilletRadius) < accuracy && ::fabs(dieFilletRadius - other.dieFilletRadius) < accuracy && - ::fabs(toolFilletRadius - other.toolFilletRadius) < accuracy && ::fabs(stampThickness - other.stampThickness) < accuracy && - filletToolEdges == other.filletToolEdges ) + constantThickness == other.constantThickness ) isSame = true; return isSame; diff --git a/C3d/Include/solid.h b/C3d/Include/solid.h index fb52955..4461bdc 100644 --- a/C3d/Include/solid.h +++ b/C3d/Include/solid.h @@ -143,10 +143,10 @@ public : // \ru Общие функции геометрического объекта. \en Common functions of a geometric object. virtual MbeSpaceType IsA() const; // \ru Тип объекта. \en A type of an object. - virtual MbSpaceItem & Duplicate( MbRegDuplicate * iReg = c3d_null ) const; // \ru Создать копию. \en Create a copy. - virtual void Transform( const MbMatrix3D &, MbRegTransform * iReg = c3d_null ); // \ru Преобразовать согласно матрице. \en Transform according to the matrix. - virtual void Move ( const MbVector3D &, MbRegTransform * iReg = c3d_null ); // \ru Сдвинуть вдоль вектора. \en Move along a vector. - virtual void Rotate ( const MbAxis3D &, double angle, MbRegTransform * iReg = c3d_null ); // \ru Повернуть вокруг оси. \en Rotate around an axis. + virtual MbSpaceItem & Duplicate( MbRegDuplicate * iReg = NULL ) const; // \ru Создать копию. \en Create a copy. + virtual void Transform( const MbMatrix3D &, MbRegTransform * iReg = NULL ); // \ru Преобразовать согласно матрице. \en Transform according to the matrix. + virtual void Move ( const MbVector3D &, MbRegTransform * iReg = NULL ); // \ru Сдвинуть вдоль вектора. \en Move along a vector. + virtual void Rotate ( const MbAxis3D &, double angle, MbRegTransform * iReg = NULL ); // \ru Повернуть вокруг оси. \en Rotate around an axis. virtual bool IsSame ( const MbSpaceItem &, double accuracy = LENGTH_EPSILON ) const; // \ru Являются ли объекты равными? \en Determine whether objects are equal. virtual bool IsSimilar( const MbSpaceItem & ) const; // \ru Являются ли объекты подобными? \en Determine whether objects are similar. virtual bool SetEqual ( const MbSpaceItem & ); // \ru Сделать объекты равными. \en Make the objects equal. @@ -244,19 +244,19 @@ public : size_t GetFacesCount() const; /// \ru Заполнить контейнер вершинами тела. \en Fill container by solid vertices. template - void GetVertices( VerticesVector & vertices ) const { if ( outer != c3d_null ) { outer->GetVertices( vertices ); } } + void GetVertices( VerticesVector & vertices ) const { if ( outer != NULL ) { outer->GetVertices( vertices ); } } /// \ru Заполнить контейнер ориентированными ребрами тела. \en Fill container by oriented edges of the solid. template - void GetEdges( EdgesVector & edges ) const { if ( outer != c3d_null ) { outer->GetEdges( edges ); } } + void GetEdges( EdgesVector & edges ) const { if ( outer != NULL ) { outer->GetEdges( edges ); } } /// \ru Заполнить контейнеры вершинами и ребрами тела. \en Fill containers by vertices and edges of the solid. template - void GetItems( VerticesVector & vertices, EdgesVector & edges ) const { if ( outer != c3d_null ) { outer->GetItems( vertices, edges ); } } + void GetItems( VerticesVector & vertices, EdgesVector & edges ) const { if ( outer != NULL ) { outer->GetItems( vertices, edges ); } } /// \ru Заполнить контейнер гранями тела. \en Fill container by solid faces. template - void GetFaces ( FacesVector & faces ) const { if ( outer != c3d_null ) { outer->GetFaces( faces ); } } + void GetFaces ( FacesVector & faces ) const { if ( outer != NULL ) { outer->GetFaces( faces ); } } /// \ru Заполнить контейнер гранями тела. \en Fill container by solid faces. template - void GetFacesSet( FacesSet & faces ) const { if ( outer != c3d_null ) { outer->GetFacesSet( faces ); } } + void GetFacesSet( FacesSet & faces ) const { if ( outer != NULL ) { outer->GetFacesSet( faces ); } } /// \ru Заполнить контейнер вершинами, ребрами и гранями тела. \en Fill container by vertices, edges and faces of the solid. void GetItems ( RPArray & ) const; diff --git a/C3d/Include/space_instance.h b/C3d/Include/space_instance.h index 11d7d35..63ba5d0 100644 --- a/C3d/Include/space_instance.h +++ b/C3d/Include/space_instance.h @@ -73,10 +73,10 @@ public : // \ru Общие функции геометрического объекта. \en Common functions of a geometric object. virtual MbeSpaceType IsA() const; // \ru Тип объекта. \en A type of an object. - virtual MbSpaceItem & Duplicate( MbRegDuplicate * iReg = c3d_null ) const; // \ru Создать копию. \en Create a copy. - virtual void Transform( const MbMatrix3D &, MbRegTransform * iReg = c3d_null ); // \ru Преобразовать согласно матрице. \en Transform according to the matrix. - virtual void Move ( const MbVector3D &, MbRegTransform * iReg = c3d_null ); // \ru Сдвинуть вдоль вектора. \en Translate along a vector. - virtual void Rotate ( const MbAxis3D &, double angle, MbRegTransform * iReg = c3d_null ); // \ru Повернуть вокруг оси. \en Rotate about an axis. + virtual MbSpaceItem & Duplicate( MbRegDuplicate * iReg = NULL ) const; // \ru Создать копию. \en Create a copy. + virtual void Transform( const MbMatrix3D &, MbRegTransform * iReg = NULL ); // \ru Преобразовать согласно матрице. \en Transform according to the matrix. + virtual void Move ( const MbVector3D &, MbRegTransform * iReg = NULL ); // \ru Сдвинуть вдоль вектора. \en Translate along a vector. + virtual void Rotate ( const MbAxis3D &, double angle, MbRegTransform * iReg = NULL ); // \ru Повернуть вокруг оси. \en Rotate about an axis. virtual bool IsSame ( const MbSpaceItem & other, double accuracy = LENGTH_EPSILON ) const; // \ru Являются ли объекты равными? \en Are the objects equal? virtual bool IsSimilar( const MbSpaceItem & init ) const; // \ru Являются ли объекты подобными? \en Are the objects similar? virtual bool SetEqual ( const MbSpaceItem & init ); // \ru Сделать объекты равными. \en Make the objects equal. diff --git a/C3d/Include/space_item.h b/C3d/Include/space_item.h index 4b76de1..3b014ad 100644 --- a/C3d/Include/space_item.h +++ b/C3d/Include/space_item.h @@ -246,7 +246,7 @@ public : \return \ru Копия объекта. \en A copy of the object. */ - virtual MbSpaceItem & Duplicate( MbRegDuplicate * iReg = c3d_null ) const = 0; + virtual MbSpaceItem & Duplicate( MbRegDuplicate * iReg = NULL ) const = 0; /** \brief \ru Преобразовать объект согласно матрице. \en Convert the object according to the matrix. \~ @@ -269,7 +269,7 @@ public : \param[in] iReg - \ru Регистратор. \en Registrator. */ - virtual void Transform( const MbMatrix3D & matr, MbRegTransform * iReg = c3d_null ) = 0; + virtual void Transform( const MbMatrix3D & matr, MbRegTransform * iReg = NULL ) = 0; /** \brief \ru Сдвинуть объект вдоль вектора. \en Move an object along a vector. \~ @@ -292,7 +292,7 @@ public : \param[in] iReg - \ru Регистратор. \en Registrator. */ - virtual void Move ( const MbVector3D & to, MbRegTransform * iReg = c3d_null ) = 0; + virtual void Move ( const MbVector3D & to, MbRegTransform * iReg = NULL ) = 0; /** \brief \ru Повернуть объект вокруг оси на заданный угол. \en Rotate an object around an axis at a given angle. \~ @@ -317,7 +317,7 @@ public : \param[in] iReg - \ru Регистратор. \en Registrator. */ - virtual void Rotate ( const MbAxis3D & axis, double angle, MbRegTransform * iReg = c3d_null ) = 0; + virtual void Rotate ( const MbAxis3D & axis, double angle, MbRegTransform * iReg = NULL ) = 0; /** \brief \ru Определить, являются ли объекты равными. \en Determine whether an object is equal. \~ diff --git a/C3d/Include/surf_chamfer_surface.h b/C3d/Include/surf_chamfer_surface.h index 5d0d08f..07fe82a 100644 --- a/C3d/Include/surf_chamfer_surface.h +++ b/C3d/Include/surf_chamfer_surface.h @@ -110,13 +110,13 @@ public: \en \name Common functions of a geometric object \{ */ virtual MbeSpaceType IsA() const; // \ru Тип элемента \en A type of element - virtual MbSpaceItem & Duplicate( MbRegDuplicate * = c3d_null ) const; // \ru Cделать копию элемента. \en Make a copy of the element. + virtual MbSpaceItem & Duplicate( MbRegDuplicate * = NULL ) const; // \ru Cделать копию элемента. \en Make a copy of the element. virtual bool IsSame ( const MbSpaceItem & other, double accuracy = LENGTH_EPSILON ) const; // \ru Является ли объект копией. \en Whether the object is a copy. virtual bool SetEqual ( const MbSpaceItem & ); // \ru Cделать равным. \en Make equal. virtual bool IsSimilar( const MbSpaceItem & ) const; // \ru Являются ли объекты подобными. \en Determine whether the objects are similar. - virtual void Transform( const MbMatrix3D &, MbRegTransform * = c3d_null ); // \ru Преобразовать элемент согласно матрице. \en Transform element according to the matrix. - virtual void Move ( const MbVector3D &, MbRegTransform * = c3d_null ); // \ru Сдвиг. \en Move. - virtual void Rotate ( const MbAxis3D &, double angle, MbRegTransform * = c3d_null ); // \ru Повернуть вокруг оси. \en Rotate around an axis. + virtual void Transform( const MbMatrix3D &, MbRegTransform * = NULL ); // \ru Преобразовать элемент согласно матрице. \en Transform element according to the matrix. + virtual void Move ( const MbVector3D &, MbRegTransform * = NULL ); // \ru Сдвиг. \en Move. + virtual void Rotate ( const MbAxis3D &, double angle, MbRegTransform * = NULL ); // \ru Повернуть вокруг оси. \en Rotate around an axis. virtual void GetProperties( MbProperties &properties ); // \ru Выдать свойства объекта. \en Get properties of the object. virtual void SetProperties( const MbProperties &properties ); // \ru Записать свойства объекта. \en Set properties of the object. @@ -199,7 +199,7 @@ public: virtual double GetSmoothRadius() const; // \ru Дать радиус. \en Get radius. virtual void GetDistances( double u, double &d1, double &d2 ) const; // \ru Дать радиусы со знаком. \en Get radii with a sign. virtual double GetDistance( bool s ) const; // \ru Дать радиус со знаком. \en Get radius with a sign. - virtual bool IsPlanar( double accuracy = METRIC_EPSILON ) const; // \ru Является ли поверхность плоской. \en Whether a surface is planar. + virtual bool IsPlanar() const; // \ru Является ли поверхность плоской. \en Whether a surface is planar. // \ru Подобные ли поверхности для объединения (слива). \en Whether the surfaces to union (joining) are similar. virtual bool IsSimilarToSurface( const MbSurface & surf, VERSION version, double precision = METRIC_PRECISION ) const; // \ru Дать двумерную матрицу преобразования из своей параметрической области в параметрическую область surf. \en Get two-dimensional matrix of transformation from its parametric domain to the parametric domain of surf. diff --git a/C3d/Include/surf_channel_surface.h b/C3d/Include/surf_channel_surface.h index fb42c21..1cc3bad 100644 --- a/C3d/Include/surf_channel_surface.h +++ b/C3d/Include/surf_channel_surface.h @@ -163,7 +163,7 @@ public: \en \name Common functions of a geometric object \{ */ virtual MbeSpaceType IsA() const; // \ru Тип элемента. \en A type of element. - virtual MbSpaceItem & Duplicate( MbRegDuplicate * = c3d_null ) const; // \ru Сделать копию элемента. \en Create a copy of the element. + virtual MbSpaceItem & Duplicate( MbRegDuplicate * = NULL ) const; // \ru Сделать копию элемента. \en Create a copy of the element. virtual bool IsSame ( const MbSpaceItem & other, double accuracy = LENGTH_EPSILON ) const; // \ru Является ли объект копией. \en Whether the object is a copy. virtual bool SetEqual ( const MbSpaceItem & ); // \ru Сделать равным. \en Make equal. virtual bool IsSimilar( const MbSpaceItem & ) const; // \ru Являются ли объекты подобными. \en Determine whether the objects are similar. diff --git a/C3d/Include/surf_cone_surface.h b/C3d/Include/surf_cone_surface.h index 197e6b0..6a982c8 100644 --- a/C3d/Include/surf_cone_surface.h +++ b/C3d/Include/surf_cone_surface.h @@ -174,10 +174,10 @@ public: \en \name Common functions of a geometric object \{ */ virtual MbeSpaceType IsA () const; // \ru Тип элемента \en A type of element - virtual MbSpaceItem & Duplicate( MbRegDuplicate * = c3d_null ) const; // \ru Сделать копию элемента. \en Create a copy of the element. + virtual MbSpaceItem & Duplicate( MbRegDuplicate * = NULL ) const; // \ru Сделать копию элемента. \en Create a copy of the element. virtual bool IsSame ( const MbSpaceItem & other, double accuracy = LENGTH_EPSILON ) const; // \ru Равны ли объекты. \en Whether the objects are equal. virtual bool SetEqual ( const MbSpaceItem & init ); // \ru Сделать равным. \en Make equal. - virtual void Transform( const MbMatrix3D & matr, MbRegTransform * = c3d_null ); // \ru Преобразовать элемент согласно матрице. \en Transform element according to the matrix. + virtual void Transform( const MbMatrix3D & matr, MbRegTransform * = NULL ); // \ru Преобразовать элемент согласно матрице. \en Transform element according to the matrix. virtual void GetProperties( MbProperties & properties ); // \ru Выдать свойства объекта. \en Get properties of the object. virtual void SetProperties( const MbProperties & properties ); // \ru Записать свойства объекта. \en Set properties of the object. @@ -279,7 +279,7 @@ public: virtual MbCurve3D * CurveUV( const MbLineSegment &, bool bApprox = true ) const; // \ru Пространственная копия линии по параметрической линии. \en Spatial copy of line by parametric line. // \ru Найти все проекции точки на поверхность вдоль вектора в любом из двух направлений. \en Find all a point projection onto the surface along a vector in either of two directions. - virtual void DirectPointProjection( const MbCartPoint3D & p, const MbVector3D & vect, SArray & uv, bool ext, MbRect2D * uvRange = c3d_null ) const; + virtual void DirectPointProjection( const MbCartPoint3D & p, const MbVector3D & vect, SArray & uv, bool ext, MbRect2D * uvRange = NULL ) const; // \ru Пересечение с кривой. \en Intersection with curve. virtual void CurveIntersection( const MbCurve3D & curv, SArray & uv, SArray & tt, bool ext0, bool ext, bool touchInclude = false ) const; @@ -333,7 +333,7 @@ public: /** \ru \name Функции элементарных поверхностей \en \name Functions of elementary surfaces \{ */ - virtual bool GetPointProjection( const MbCartPoint3D & p, bool init, double & u, double & v, bool ext, MbRect2D * uvRange = c3d_null ) const; + virtual bool GetPointProjection( const MbCartPoint3D & p, bool init, double & u, double & v, bool ext, MbRect2D * uvRange = NULL ) const; /** \} */ /** \ru \name Функции конической поверхности \en \name Functions of conical surface diff --git a/C3d/Include/surf_coons_surface.h b/C3d/Include/surf_coons_surface.h index eb30cc0..fe1a28d 100644 --- a/C3d/Include/surf_coons_surface.h +++ b/C3d/Include/surf_coons_surface.h @@ -23,9 +23,9 @@ class MATH_CLASS MbCurve; //------------------------------------------------------------------------------ /** \brief \ru Способ расчёта поверхности Кунса. - \en Type of calculation of Coons surface. \~ + \en Type of calculation of Coons surface. \~ \details \ru Способ расчёта поверхности Кунса. \n - \en Type of calculation of Coons surface. \n \~ + \en Type of calculation of Coons surface. \n \~ \ingroup Surfaces */ // --- @@ -36,35 +36,6 @@ enum MbeCoonsSurfaceCalcType { }; -//------------------------------------------------------------------------------ -/** \brief \ru Производные по uv в вершинах. - \en Derivative by uv at vertices. \~ - \details \ru Производные по uv в вершинах. \n - \en Derivative by uv at vertices. \n \~ -*/ -// --- -struct CoonsDerivesUV { - MbVector3D firstUV0[COONS_COUNT]; ///< \ru Производные в началах кривых производных. \en Derivatives in the beginning curves of derivatives. - MbVector3D firstUV1[COONS_COUNT]; ///< \ru Производные в концая кривых производных. \en Derivatives at the ends of derivative curves. - - /// \ru Конструктор. \en Constructor. - CoonsDerivesUV() - { - SetZero(); - } - - /// \ru Обнулить координаты векторов. \en Set coordinates of vectors to zero. - void SetZero() { - for ( size_t i = 0; i < COONS_COUNT; ++i ) { - firstUV0[i].SetZero(); - firstUV1[i].SetZero(); - } - } - - OBVIOUS_PRIVATE_COPY( CoonsDerivesUV ) -}; - - //------------------------------------------------------------------------------ /** \brief \ru Поверхность Кунса на четырех кривых. \en Coons surface on four curves. \~ @@ -125,7 +96,6 @@ private: bool poleVMin; ///< \ru Полюс в начале. \en Pole at the beginning. bool poleVMax; ///< \ru Полюс в конце. \en Pole at the end. MbeCoonsSurfaceCalcType calcType; ///< \ru Версия реализации определяет способ расчёта поверхности. \en Version of implementation determines a type of calculation of surface. - DPtr derivesUV; ///< \ru Производные в началах и концах кривых производных. \en Derivatives in the beginning and ends curves of derivatives. //------------------------------------------------------------------------------ /** \brief \ru Вспомогательные данные. @@ -138,9 +108,7 @@ private: public: DPtr mp; ///< \ru Дополнительные временные данные для ускорения вычислений. \en Additional temporary data to speed up computations. MbCoonsSurfaceAuxiliaryData(); - MbCoonsSurfaceAuxiliaryData( const MbCoonsSurfaceAuxiliaryData & init ); virtual ~MbCoonsSurfaceAuxiliaryData(); - MbCoonsSurfaceAuxiliaryData & operator = ( const MbCoonsSurfaceAuxiliaryData & init ); }; mutable CacheManager cache; @@ -194,13 +162,13 @@ public: \en \name Common functions of a geometric object \{ */ virtual MbeSpaceType IsA() const; // \ru Тип элемента \en A type of element - virtual MbSpaceItem & Duplicate( MbRegDuplicate * = c3d_null ) const; // \ru Cделать копию элемента \en Make a copy of element + virtual MbSpaceItem & Duplicate( MbRegDuplicate * = NULL ) const; // \ru Cделать копию элемента \en Make a copy of element virtual bool IsSame( const MbSpaceItem & other, double accuracy = LENGTH_EPSILON ) const; // \ru Является ли объект копией. \en Whether the object is a copy. virtual bool SetEqual( const MbSpaceItem & init ); // \ru Сделать равным \en Make equal virtual bool IsSimilar( const MbSpaceItem & init ) const; // \ru Являются ли объекты подобными \en Whether the objects are similar - virtual void Transform( const MbMatrix3D & matr, MbRegTransform * = c3d_null ); // \ru Преобразовать элемент согласно матрице \en Transform element according to the matrix - virtual void Move( const MbVector3D & to, MbRegTransform * = c3d_null ); // \ru Сдвиг \en Translation - virtual void Rotate( const MbAxis3D & axis, double angle, MbRegTransform * = c3d_null ); // \ru Повернуть вокруг оси \en Rotate around an axis + virtual void Transform( const MbMatrix3D & matr, MbRegTransform * = NULL ); // \ru Преобразовать элемент согласно матрице \en Transform element according to the matrix + virtual void Move( const MbVector3D & to, MbRegTransform * = NULL ); // \ru Сдвиг \en Translation + virtual void Rotate( const MbAxis3D & axis, double angle, MbRegTransform * = NULL ); // \ru Повернуть вокруг оси \en Rotate around an axis virtual void GetProperties( MbProperties & ); // \ru Выдать свойства объекта \en Get properties of the object virtual void SetProperties( const MbProperties & ); // \ru Записать свойства объекта \en Set properties of the object @@ -316,11 +284,9 @@ public: const MbCurve3D & GetDerCurve3() const { return *curve3U; } /// \ru Получить кривую по индексу. \en Get curve by an index. const MbCurve3D * GetCurve( size_t ind ) const; - /// \ru Получить количество кривых. \en Get count of curves. size_t GetCurvesCount() const { return COONS_COUNT; } //-V112 const MbCartPoint3D * GetVertex() const { return vertex; } ///< \ru Выдать вершины P0, P1, P2. \en Get vertices P0, P1, P2. - MbeCoonsSurfaceCalcType GetCalcType() const { return calcType; } ///< \ru Выдать способ расчёта поверхности. \en Get surface calculation type. /** \} */ double GetT0Min() const { return t0min; } ///< \ru Минимальное значение параметра на кривой 0. \en Minimal value of parameter on curve 0. double GetT0Max() const { return t0max; } ///< \ru Максимальное значение параметра на кривой 0. \en Maximal value of parameter on curve 0. @@ -339,8 +305,8 @@ public: \en Index of the curve. \~ \param[out] sense - \ru Флаг совпадения направленности кривой с рисунком, приведенным выше. \en Flag that indicates the coincidence of the curve with the picture shown above.\~ - \return - \ru Указатель на кривую или c3d_null. - \en Pointer to the curve or c3d_null. \~ + \return - \ru Указатель на кривую или NULL. + \en Pointer to the curve or NULL. \~ */ const MbCurve3D * GetExactCurve( size_t k, bool & sense ) const; @@ -356,7 +322,7 @@ public: private: void operator = ( const MbCoonsPatchSurface & ); // \ru Не реализовано. \en Not implemented. void Setup(); - void SetupUVDerives(); + // void SetVertexUV( double u, double v ) const; void CheckParams( double & u, double & v, bool ext = false ) const; // \ru Проверить и изменить при необходимости параметры. \en Check and correct parameters. void CalculateTwist( double u, double v ) const; // \ru Определение местных координат. \en Determination of local coordinates. @@ -446,6 +412,33 @@ inline void MbCoonsPatchSurface::ParamThird ( double /*w*/, double * t ) const { } +//------------------------------------------------------------------------------ +// \ru Добавить матрицу поверхности. \en Add the matrix of the surface. +// --- +inline void MbCoonsPatchSurface::AddMatrix( double u, double v, double * uu, double * vv, MbVector3D & p ) const { + + MbCartPoint3D twist[COONS_COUNT]; + + if ( calcType == cst_GregoryPatchType ) { + // SetVertexUV( u, v ); + CalculateTwist( u, v ); + + MbCoonsSurfaceAuxiliaryData * loccache = cache(); + for ( size_t i = 0; i < COONS_COUNT; ++i ) + twist[i] = loccache->mp->twist[i]; + } + else { + for ( size_t i = 0; i < COONS_COUNT; ++i ) + twist[i] = vertexUV[i]; + } + + p.Add( vertex[0], -uu[0] * vv[0], vertex[1], -uu[1] * vv[0], vertex[2], -uu[1] * vv[1], vertex[3], -uu[0] * vv[1] ); + p.Add( vertexU[0], -uu[2] * vv[0], vertexU[1], -uu[3] * vv[0], vertexU[2], -uu[3] * vv[1], vertexU[3], -uu[2] * vv[1] ); + p.Add( vertexV[0], -uu[0] * vv[2], vertexV[1], -uu[1] * vv[2], vertexV[2], -uu[1] * vv[3], vertexV[3], -uu[0] * vv[3] ); + p.Add( twist[0], -uu[2] * vv[2], twist[1], -uu[3] * vv[2], twist[2], -uu[3] * vv[3], twist[3], -uu[2] * vv[3] ); +} + + //------------------------------------------------------------------------------ // \ru Получить кривую по индексу \en Get curve by an index // --- @@ -459,8 +452,146 @@ inline const MbCurve3D * MbCoonsPatchSurface::GetCurve( size_t ind ) const case 2 : { return curve2; } case 3 : { return curve3; } } - return c3d_null; + return NULL; } +//////////////////////////////////////////////////////////////////////////////// +// +// Вспомогательные объекты бикубической поверхности Кунса. +// Auxiliary objects for bicubic Coons surface. +// +//////////////////////////////////////////////////////////////////////////////// + + +//------------------------------------------------------------------------------ +// \ru Кривая производных, обслуживающая точную бикубическую поверхность Кунса, построенная кривой на поверхности. +// \en The curve of derivatives serving the exact bicubic Coons surface, constructed by a curve on the surface. \~ +// --- +class MATH_CLASS MbCoonsDerivative : public MbCurve3D { +protected : + MbSurfaceCurve * curve; ///< \ru Кривая на поверхности (всегда не NULL). \en Curve on surface (always not NULL). + double param1; ///< \ru Параметр первой точки кривой. \en The first point parameter of curve. + double param2; ///< \ru Параметр второй точки кривой. \en The second point parameter of curve. + MbVector rail1; ///< \ru Вектор для вычисления поперечной производной в первой точке кривой. \en The vector for calculation of the transverse derivative in first point of curve. + MbVector rail2; ///< \ru Вектор для вычисления поперечной производной во второй точке кривой. \en The vector for calculation of the transverse derivative in second point of curve. + double turner; ///< \ru Угол поворота векторов на единицу изменения параметра. \en The angle of rotation of vectors per unit of parameter change. + + //------------------------------------------------------------------------------ + /** \brief \ru Вспомогательные данные. + \en Auxiliary data. \~ + \details \ru Вспомогательные данные служат для ускорения работы объекта. + \en Auxiliary data are used for fast calculations. \n \~ + */ + // --- + class MbCoonsDerivativeAuxiliaryData: public AuxiliaryData { + public: + double t; ///< \ru Параметр. \en Parameter. + MbCartPoint3D point; ///< \ru Точка. \en Point. + MbVector3D first; ///< \ru Первая производная. \en First derivative. + MbVector3D second; ///< \ru Вторая производная. \en Second derivative. + MbVector3D third; ///< \ru Третья производная. \en Third derivative. + + MbCoonsDerivativeAuxiliaryData(); + MbCoonsDerivativeAuxiliaryData( const MbCoonsDerivativeAuxiliaryData & ); + virtual ~MbCoonsDerivativeAuxiliaryData(); + + void Init(); + void Init( const MbCoonsDerivativeAuxiliaryData & ); + void Move( const MbVector3D & ); + }; + + mutable CacheManager cache; + +public : + /// \ru Конструктор кривой на поверхности. \en Constructor of curve on surface. + MbCoonsDerivative( MbSurfaceCurve & c, double t1, const MbVector & r1, double t2, const MbVector & r2 ); +protected: + /// \ru Конструктор копирования. \en Copy-constructor. + MbCoonsDerivative( const MbCoonsDerivative &, MbRegDuplicate * ); +private: + MbCoonsDerivative( const MbCoonsDerivative & ); // \ru Не реализовано!!! \en Not implemented!!! + +public : + virtual ~MbCoonsDerivative(); + +public: + /// \ru Реализация функции, инициирующей посещение объекта. \en Implementation of a function initializing a visit of an object. + VISITING_CLASS( MbCoonsDerivative ); + + /** \ru \name Общие функции геометрического объекта. + \en \name Common functions of a geometric object. + \{ */ + + virtual MbeSpaceType IsA() const; // \ru Дать тип элемента. \en Get element type. + virtual MbSpaceItem & Duplicate( MbRegDuplicate * = NULL ) const; // \ru Сделать копию элемента. \en Create a copy of the element. + virtual bool IsSame ( const MbSpaceItem & other, double accuracy = LENGTH_EPSILON ) const; // \ru Определить, являются ли объекты одинаковыми. \en Determine whether objects are equal. + virtual bool SetEqual ( const MbSpaceItem & ); // \ru Сделать равным. \en Make equal. + virtual bool IsSimilar( const MbSpaceItem & ) const; // \ru Определить, являются ли объекты подобными. \en Determine whether the objects are similar. + virtual void Transform( const MbMatrix3D &, MbRegTransform * = NULL ); // \ru Преобразовать элемент согласно матрице. \en Transform element according to the matrix. + virtual void Move ( const MbVector3D &, MbRegTransform * = NULL ); // \ru Сдвинуть вдоль вектора. \en Move along a vector. + virtual void Rotate ( const MbAxis3D &, double angle, MbRegTransform * = NULL ); // \ru Повернуть вокруг оси. \en Rotate about an axis. + /// \ru Перевести все временные (mutable) данные объекта в неопределённое (исходное) состояние. \en Translate all the time (mutable) data objects in an inconsistent (initial) state. + virtual void Refresh(); + + virtual void GetProperties( MbProperties & ); // \ru Выдать свойства объекта. \en Get properties of the object. + virtual void SetProperties( const MbProperties & ); // \ru Записать свойства объекта. \en Set properties of the object. + + /** \} */ + /** \ru \name Общие функции кривой. + \en \name Common functions of curve. + \{ */ + + virtual double GetTMin() const; // \ru Вернуть минимальное значение параметра. \en Get the minimum value of parameter. + virtual double GetTMax() const; // \ru Вернуть максимальное значение параметра. \en Get the maximum value of parameter. + virtual bool IsClosed() const; // \ru Проверить замкнутость кривой. \en Check for curve closedness. + virtual double GetPeriod() const; // \ru Вернуть период периодической кривой. \en Get period of a periodic curve. + + // \ru Функции для работы в области определения. \en Functions for working in the definition domain. + virtual void PointOn ( double & t, MbCartPoint3D & ) const; // \ru Вычислить точку на кривой. \en Calculate a point on the curve. + virtual void FirstDer ( double & t, MbVector3D & ) const; // \ru Вычислить первую производную. \en Calculate the first derivative. + virtual void SecondDer( double & t, MbVector3D & ) const; // \ru Вычислить вторую производную. \en Calculate the second derivative. + virtual void ThirdDer ( double & t, MbVector3D & ) const; // \ru Вычислить третью производную по t. \en Calculate the third derivative by t. + // \ru Функции для работы вне области определения. \en Functions for working outside of definition domain. + virtual void _PointOn ( double t, MbCartPoint3D & ) const; // \ru Вычислить точку на расширенной кривой. \en Calculate a point on the extended curve. + virtual void _FirstDer ( double t, MbVector3D & ) const; // \ru Вычислить первую производную. \en Calculate the first derivative. + virtual void _SecondDer( double t, MbVector3D & ) const; // \ru Вычислить вторую производную. \en Calculate the second derivative. + virtual void _ThirdDer ( double t, MbVector3D & ) const; // \ru Вычислить третью производную по t. \en Calculate the third derivative by t. + // \ru Вычислить значения точки и производных для заданного параметра. \en Calculate point and derivatives of object for given parameter. \~ + virtual void Explore ( double & t, bool ext, + MbCartPoint3D & pnt, MbVector3D & fir, MbVector3D * sec, MbVector3D * thir ) const; + + virtual void Inverse( MbRegTransform * iReg = NULL ); // \ru Изменить направление. \en Change the direction. + + virtual double Step ( double t, double sag ) const; // \ru Вычисление шага по стрелке прогиба. \en Calculation of parameter step by the sag. + virtual double DeviationStep( double t, double angle ) const; // \ru Вычисление шага по углу отклонения нормали. \en Calculation of parameter step by the deviation angle. + + virtual void ChangeCarrier ( const MbSpaceItem & item, MbSpaceItem & init ); // \ru Изменить носитель. \en Change the carrier. + virtual bool ChangeCarrierBorne( const MbSpaceItem &, MbSpaceItem &, const MbMatrix & matr ); // \ru Изменить носимые элементы. \en Change a carrier elements. + + /** \} */ + + /// \ru Вычислить нормаль к поверхности. \en Calculate surface normal. + void SurfaceNormal( double & t, MbVector3D & n ) const { curve->SurfaceNormal( t, n ); } + /// \ru Заменить кривую. \en Replace curve. + bool ChangeCurve( MbSurfaceCurve & ); + /// \ru Дать кривую. \en Get curve. + const MbSurfaceCurve * GetSurfaceCurve() const { return curve; } + /// \ru Дать кривую. \en Get curve. + MbSurfaceCurve * SetSurfaceCurve() { return curve; } + +protected: + void CheckParam ( double & t ) const; // \ru Проверить и изменить при необходимости параметр. \en Check and correct parameter. + +private: + // \ru Объявить оператор приравнивания по ссылке. \en Declare operator of assignment by reference. + void operator = ( const MbCoonsDerivative & ); // \ru Не реализовано!!! \en Not implemented!!! + + DECLARE_PERSISTENT_CLASS_NEW_DEL( MbCoonsDerivative ) + +}; + +IMPL_PERSISTENT_OPS( MbCoonsDerivative ) + + #endif // __SURF_COONS_SURFACE_H diff --git a/C3d/Include/surf_coons_surface_.h b/C3d/Include/surf_coons_surface_.h index efa3def..cc07336 100644 --- a/C3d/Include/surf_coons_surface_.h +++ b/C3d/Include/surf_coons_surface_.h @@ -43,7 +43,7 @@ private: MbCartPoint3D twistVVV[COONS_COUNT]; // Производная по VVV. public: - /// \ru Конструктор. \en Constructor. + // Конструктор. MbCoonsWorkingData() : calcU ( UNDEFINED_DBL ) , calcV ( UNDEFINED_DBL ) @@ -61,30 +61,9 @@ public: twistVVV[i].SetZero(); } } - - /// \ru Конструктор копирования. \en Copy-constructor. - MbCoonsWorkingData( const MbCoonsWorkingData & init ) - : calcU( init.calcU ) - , calcV( init.calcV ) - { - for ( size_t i = 0; i < COONS_COUNT; ++i ) { - twist[i] = init. twist[i] ; - twistU[i] = init. twistU[i] ; - twistV[i] = init. twistV[i] ; - twistUU[i] = init. twistUU[i] ; - twistUV[i] = init. twistUV[i] ; - twistVV[i] = init. twistVV[i] ; - twistUUU[i] = init. twistUUU[i]; - twistUUV[i] = init. twistUUV[i]; - twistUVV[i] = init. twistUVV[i]; - twistVVV[i] = init. twistVVV[i]; - } - } - // Деструктор. ~MbCoonsWorkingData() {} - /// \ru Обнулить координаты. \en Set coordinates to zero. void SetZeroVectors() { for ( size_t i = 0; i < COONS_COUNT; ++i ) { twist[i] .SetZero(); @@ -100,42 +79,7 @@ public: } } - /// \ru Присвоить значение другого объекта. \en Assign a value of another object. - MbCoonsWorkingData & operator = ( const MbCoonsWorkingData & init ) { - calcU = init.calcU; - calcV = init.calcV; - for ( size_t i = 0; i < COONS_COUNT; ++i ) { - twist[i] = init.twist[i]; - twistU[i] = init.twistU[i]; - twistV[i] = init.twistV[i]; - twistUU[i] = init.twistUU[i]; - twistUV[i] = init.twistUV[i]; - twistVV[i] = init.twistVV[i]; - twistUUU[i] = init.twistUUU[i]; - twistUUV[i] = init.twistUUV[i]; - twistUVV[i] = init.twistUVV[i]; - twistVVV[i] = init.twistVVV[i]; - } - return *this; - } - - /// \ru Проверить объекты на равенство. \en Check objects for equality. - bool operator == ( const MbCoonsWorkingData & init ) { - bool res = calcU == init.calcU && calcV == init.calcV; - for ( size_t i = 0; i < COONS_COUNT && res; ++i ) { - res &= twist[i] == init.twist[i]; - res &= twistU[i] == init.twistU[i]; - res &= twistV[i] == init.twistV[i]; - res &= twistUU[i] == init.twistUU[i]; - res &= twistUV[i] == init.twistUV[i]; - res &= twistVV[i] == init.twistVV[i]; - res &= twistUUU[i] == init.twistUUU[i]; - res &= twistUUV[i] == init.twistUUV[i]; - res &= twistUVV[i] == init.twistUVV[i]; - res &= twistVVV[i] == init.twistVVV[i]; - } - return res; - } + OBVIOUS_PRIVATE_COPY( MbCoonsWorkingData ) }; diff --git a/C3d/Include/surf_corner_surface.h b/C3d/Include/surf_corner_surface.h index 002424e..33b2518 100644 --- a/C3d/Include/surf_corner_surface.h +++ b/C3d/Include/surf_corner_surface.h @@ -90,13 +90,13 @@ public: \en \name Common functions of a geometric object \{ */ virtual MbeSpaceType IsA() const; // \ru Тип элемента \en A type of element - virtual MbSpaceItem & Duplicate( MbRegDuplicate * = c3d_null ) const; // \ru Cделать копию элемента \en Make a copy of element + virtual MbSpaceItem & Duplicate( MbRegDuplicate * = NULL ) const; // \ru Cделать копию элемента \en Make a copy of element virtual bool IsSame( const MbSpaceItem & other, double accuracy = LENGTH_EPSILON ) const; // \ru Является ли объект копией. \en Whether the object is a copy. virtual bool SetEqual( const MbSpaceItem & init ); // \ru Сделать равным \en Make equal virtual bool IsSimilar( const MbSpaceItem & init ) const; // \ru Являются ли объекты подобными \en Whether the objects are similar - virtual void Transform( const MbMatrix3D & matr, MbRegTransform * = c3d_null ); // \ru Преобразовать элемент согласно матрице \en Transform element according to the matrix - virtual void Move( const MbVector3D & to, MbRegTransform * = c3d_null ); // \ru Сдвиг \en Translation - virtual void Rotate( const MbAxis3D & axis, double angle, MbRegTransform * = c3d_null ); // \ru Повернуть вокруг оси \en Rotate around an axis + virtual void Transform( const MbMatrix3D & matr, MbRegTransform * = NULL ); // \ru Преобразовать элемент согласно матрице \en Transform element according to the matrix + virtual void Move( const MbVector3D & to, MbRegTransform * = NULL ); // \ru Сдвиг \en Translation + virtual void Rotate( const MbAxis3D & axis, double angle, MbRegTransform * = NULL ); // \ru Повернуть вокруг оси \en Rotate around an axis virtual void CalculateSurfaceWire( const MbStepData & stepData, size_t beg, MbMesh & mesh, size_t uMeshCount = c3d::WIRE_MAX, size_t vMeshCount = c3d::WIRE_MAX ) const; @@ -307,7 +307,7 @@ inline const MbCurve3D * MbCornerSurface::GetCurve( size_t ind ) const case 1 : { return curve1; } case 2 : { return curve2; } } - return c3d_null; + return NULL; } diff --git a/C3d/Include/surf_cover_surface.h b/C3d/Include/surf_cover_surface.h index 6f1910a..94b3e23 100644 --- a/C3d/Include/surf_cover_surface.h +++ b/C3d/Include/surf_cover_surface.h @@ -97,13 +97,13 @@ public: \en \name Common functions of a geometric object \{ */ virtual MbeSpaceType IsA() const; // \ru Тип элемента \en A type of element - virtual MbSpaceItem & Duplicate( MbRegDuplicate * = c3d_null ) const; // \ru Cделать копию элемента \en Make a copy of element + virtual MbSpaceItem & Duplicate( MbRegDuplicate * = NULL ) const; // \ru Cделать копию элемента \en Make a copy of element virtual bool IsSame( const MbSpaceItem & other, double accuracy = LENGTH_EPSILON ) const; // \ru Является ли объект копией. \en Whether the object is a copy. virtual bool SetEqual( const MbSpaceItem & init ); // \ru Сделать равным \en Make equal virtual bool IsSimilar( const MbSpaceItem & init ) const; // \ru Являются ли объекты подобными \en Whether the objects are similar - virtual void Transform( const MbMatrix3D & matr, MbRegTransform * = c3d_null ); // \ru Преобразовать элемент согласно матрице \en Transform element according to the matrix - virtual void Move( const MbVector3D & to, MbRegTransform * = c3d_null ); // \ru Сдвиг \en Translation - virtual void Rotate( const MbAxis3D & axis, double angle, MbRegTransform * = c3d_null ); // \ru Повернуть вокруг оси \en Rotate around an axis + virtual void Transform( const MbMatrix3D & matr, MbRegTransform * = NULL ); // \ru Преобразовать элемент согласно матрице \en Transform element according to the matrix + virtual void Move( const MbVector3D & to, MbRegTransform * = NULL ); // \ru Сдвиг \en Translation + virtual void Rotate( const MbAxis3D & axis, double angle, MbRegTransform * = NULL ); // \ru Повернуть вокруг оси \en Rotate around an axis virtual void GetProperties( MbProperties & properties ); // \ru Выдать свойства объекта \en Get properties of the object virtual void SetProperties( const MbProperties & properties ); // \ru Записать свойства объекта \en Set properties of the object @@ -238,8 +238,8 @@ public: \en Index of the curve. \~ \param[out] sense - \ru Флаг совпадения направленности кривой с рисунком, приведенным выше. \en Flag that indicates the coincidence of the curve with the picture shown above.\~ - \return - \ru Указатель на кривую или c3d_null. - \en Pointer to the curve or c3d_null. \~ + \return - \ru Указатель на кривую или NULL. + \en Pointer to the curve or NULL. \~ */ const MbCurve3D * GetExactCurve( size_t k, bool &sense ) const; @@ -293,7 +293,7 @@ inline const MbCurve3D * MbCoverSurface::GetCurve( size_t ind ) const case 2 : { return curve2; } case 3 : { return curve3; } } - return c3d_null; + return NULL; } diff --git a/C3d/Include/surf_curve_bounded_surface.h b/C3d/Include/surf_curve_bounded_surface.h index bdada2f..2b7bb35 100644 --- a/C3d/Include/surf_curve_bounded_surface.h +++ b/C3d/Include/surf_curve_bounded_surface.h @@ -120,7 +120,7 @@ public : /// \ru Конструктор для поверхности c габаритом при чтении грани. \en Constructor for surface with bounding box at face reading. MbCurveBoundedSurface( MbSurface & initSurface, c3d::PlaneContoursSPtrVector & initCurves, MbCube & gab ); /// \ru Конструктор по контурам, берет за базовую поверхность поверхность первого контура. \en Constructor by contours, uses the surface of first contour as base surface. - MbCurveBoundedSurface( MbContourOnSurface & init1, MbContourOnSurface * init2 = c3d_null ); + MbCurveBoundedSurface( MbContourOnSurface & init1, MbContourOnSurface * init2 = NULL ); /// \ru Конструктор-копия на новую базовую поверхность. \en Copy-constructor for new base surface. MbCurveBoundedSurface( const MbCurveBoundedSurface & init, MbSurface & newBaseSurface, bool calculateGabarit = true ); @@ -141,13 +141,13 @@ public : \en \name Common functions of a geometric object \{ */ virtual MbeSpaceType IsA() const; // \ru Тип элемента. \en A type of element. - virtual MbSpaceItem & Duplicate( MbRegDuplicate * = c3d_null ) const; // \ru Сделать копию элемента. \en Create a copy of the element. + virtual MbSpaceItem & Duplicate( MbRegDuplicate * = NULL ) const; // \ru Сделать копию элемента. \en Create a copy of the element. virtual bool IsSame ( const MbSpaceItem & other, double accuracy = LENGTH_EPSILON ) const; // \ru Является ли объект копией. \en Whether the object is a copy. virtual bool SetEqual ( const MbSpaceItem & ); // \ru Сделать равным. \en Make equal. virtual bool IsSimilar( const MbSpaceItem & ) const; // \ru Являются ли объекты подобными. \en Determine whether the objects are similar. - virtual void Transform( const MbMatrix3D &, MbRegTransform * = c3d_null ); // \ru Преобразовать элемент согласно матрице. \en Transform element according to the matrix. - virtual void Move ( const MbVector3D &, MbRegTransform * = c3d_null ); // \ru Сдвинуть объект вдоль вектора. \en Move an object along a vector. - virtual void Rotate ( const MbAxis3D &, double angle, MbRegTransform * = c3d_null ); // \ru Повернуть вокруг оси. \en Rotate around an axis. + virtual void Transform( const MbMatrix3D &, MbRegTransform * = NULL ); // \ru Преобразовать элемент согласно матрице. \en Transform element according to the matrix. + virtual void Move ( const MbVector3D &, MbRegTransform * = NULL ); // \ru Сдвинуть объект вдоль вектора. \en Move an object along a vector. + virtual void Rotate ( const MbAxis3D &, double angle, MbRegTransform * = NULL ); // \ru Повернуть вокруг оси. \en Rotate around an axis. virtual double DistanceToPoint( const MbCartPoint3D & ) const; // \ru Вычислить расстояние до точки. \en Calculate the distance to a point. virtual void Refresh(); // \ru Сбросить все временные данные. \en Reset all temporary data. virtual void CalculateMesh( const MbStepData & stepData, const MbFormNote & note, MbMesh & mesh ) const; // \ru Построить полигональную копию mesh. \en Build polygonal copy mesh. @@ -269,7 +269,7 @@ public : virtual double CurvatureV ( double u, double v ) const; // \ru Kривизна линии v. \en Curvature of v-line. virtual bool IsSameBase( const MbSurface & ) const; // \ru Является ли базовая поверхность копией базовой поверхности данного объекта. \en Whether the base surface is a duplicate of base surface of current object. - virtual bool IsPlanar( double accuracy = METRIC_EPSILON ) const; // \ru Является ли поверхность плоской. \en Whether the surface is planar. + virtual bool IsPlanar() const; // \ru Является ли поверхность плоской. \en Whether the surface is planar. virtual double GetRadius() const; // \ru Дать физический радиус объекта или ноль, если это невозможно. \en Get the physical radius of the object or null if it impossible. virtual double GetFilletRadius( const MbCartPoint3D & ) const; // \ru Является ли поверхность скруглением. \en Whether the surface is fillet. virtual MbeParamDir GetFilletDirection() const; // \ru Направление поверхности скругления. \en Direction of fillet surface. @@ -306,9 +306,9 @@ public : size_t SegmentIntersection( const MbCurve & pCurve, SArray & curveParams, double epsilon = Math::metricEpsilon ) const; // \ru Найти ближайшую проекцию точки на поверхность. \en Find the nearest projection of a point onto the surface. - virtual bool NearPointProjection( const MbCartPoint3D & p, double & u, double & v, bool ext, MbRect2D * uvRange = c3d_null ) const; // \ru Ближайшая проекция точки на поверхность. \en The nearest point projection onto the surface. + virtual bool NearPointProjection( const MbCartPoint3D & p, double & u, double & v, bool ext, MbRect2D * uvRange = NULL ) const; // \ru Ближайшая проекция точки на поверхность. \en The nearest point projection onto the surface. // \ru Найти все проекции точки на поверхность вдоль вектора в любом из двух направлений. \en Find all a point projection onto the surface along a vector in either of two directions. - virtual void DirectPointProjection( const MbCartPoint3D & p, const MbVector3D & vect, SArray & uv, bool ext, MbRect2D * uvRange = c3d_null ) const; + virtual void DirectPointProjection( const MbCartPoint3D & p, const MbVector3D & vect, SArray & uv, bool ext, MbRect2D * uvRange = NULL ) const; // \ru Вce точки пересечения поверхности и кривой. \en All the points of intersection of a surface and a curve. virtual void CurveIntersection( const MbCurve3D & curv, SArray & uv, SArray & tt, bool ext0, bool ext, bool touchInclude = false ) const; @@ -500,7 +500,7 @@ public : \details \ru Дать контур, ограничивающий поверхность, по его индексу. С проверкой индекса. \en Get contour bounding surface by its index. With index checking. \~ */ - const MbContourOnSurface * GetCurve ( size_t ind ) const { return ( ind < curves.Count() ) ? curves[ind] : c3d_null; } + const MbContourOnSurface * GetCurve ( size_t ind ) const { return ( ind < curves.Count() ) ? curves[ind] : NULL; } /** \brief \ru Дать контур, ограничивающий поверхность, по его индексу. \en Get contour bounding surface by its index. \~ \details \ru Дать контур, ограничивающий поверхность, по его индексу. Без проверки индекса. @@ -514,7 +514,7 @@ public : \details \ru Дать контур, ограничивающий поверхность, по его индексу. С проверкой индекса. \en Get contour bounding surface by its index. With index checking. \~ */ - MbContourOnSurface * SetCurve ( size_t ind ) { return ( ind < curves.Count() ) ? curves[ind] : c3d_null; } + MbContourOnSurface * SetCurve ( size_t ind ) { return ( ind < curves.Count() ) ? curves[ind] : NULL; } /** \brief \ru Дать контур, ограничивающий поверхность, по его индексу. \en Get contour bounding surface by its index. \~ \details \ru Дать контур, ограничивающий поверхность, по его индексу. Без проверки индекса. diff --git a/C3d/Include/surf_cylinder_surface.h b/C3d/Include/surf_cylinder_surface.h index af8a112..a77edfb 100644 --- a/C3d/Include/surf_cylinder_surface.h +++ b/C3d/Include/surf_cylinder_surface.h @@ -151,10 +151,10 @@ public: \en \name Common functions of a geometric object \{ */ virtual MbeSpaceType IsA() const; // \ru Тип элемента. \en A type of element. - virtual MbSpaceItem & Duplicate( MbRegDuplicate * = c3d_null ) const; // \ru Сделать копию элемента. \en Create a copy of the element. + virtual MbSpaceItem & Duplicate( MbRegDuplicate * = NULL ) const; // \ru Сделать копию элемента. \en Create a copy of the element. virtual bool IsSame ( const MbSpaceItem & other, double accuracy = LENGTH_EPSILON ) const; // \ru Равны ли объекты. \en Whether the objects are equal. virtual bool SetEqual ( const MbSpaceItem & ); // \ru Сделать равным. \en Make equal. - virtual void Transform( const MbMatrix3D & matr, MbRegTransform * = c3d_null ); // \ru Преобразовать элемент согласно матрице. \en Transform element according to the matrix. + virtual void Transform( const MbMatrix3D & matr, MbRegTransform * = NULL ); // \ru Преобразовать элемент согласно матрице. \en Transform element according to the matrix. virtual void GetProperties( MbProperties & properties ); // \ru Выдать свойства объекта. \en Get properties of the object. virtual void SetProperties( const MbProperties & properties ); // \ru Записать свойства объекта. \en Set properties of the object. @@ -254,7 +254,7 @@ public: virtual MbCurve3D * CurveUV( const MbLineSegment &, bool bApprox = true ) const; // \ru Пространственная копия линии по параметрической линии. \en Spatial copy of line by parametric line. // \ru Найти все проекции точки на поверхность вдоль вектора в любом из двух направлений. \en Find all a point projection onto the surface along a vector in either of two directions. - virtual void DirectPointProjection( const MbCartPoint3D & p, const MbVector3D & vect, SArray & uv, bool ext, MbRect2D * uvRange = c3d_null ) const; + virtual void DirectPointProjection( const MbCartPoint3D & p, const MbVector3D & vect, SArray & uv, bool ext, MbRect2D * uvRange = NULL ) const; // \ru Пересечение с кривой. \en Intersection with curve. virtual void CurveIntersection( const MbCurve3D & curv, SArray & uv, SArray & tt, bool ext0, bool ext, bool touchInclude = false ) const; @@ -316,7 +316,7 @@ public: /** \ru \name Функции элементарных поверхностей \en \name Functions of elementary surfaces \{ */ - virtual bool GetPointProjection( const MbCartPoint3D & p, bool init, double & u, double & v, bool ext, MbRect2D * uvRange = c3d_null ) const; + virtual bool GetPointProjection( const MbCartPoint3D & p, bool init, double & u, double & v, bool ext, MbRect2D * uvRange = NULL ) const; /** \} */ /** \ru \name Функции цилиндрической поверхности \en \name Functions of the cylindrical surface diff --git a/C3d/Include/surf_elementary_surface.h b/C3d/Include/surf_elementary_surface.h index ba593e9..a5fe3df 100644 --- a/C3d/Include/surf_elementary_surface.h +++ b/C3d/Include/surf_elementary_surface.h @@ -59,12 +59,12 @@ public: \{ */ virtual MbeSpaceType IsA () const = 0; // \ru Тип элемента. \en A type of element. virtual MbeSpaceType Type() const; // \ru Тип элемента. \en A type of element. - virtual MbSpaceItem & Duplicate( MbRegDuplicate * = c3d_null ) const = 0; // \ru Сделать копию элемента. \en Create a copy of the element. + virtual MbSpaceItem & Duplicate( MbRegDuplicate * = NULL ) const = 0; // \ru Сделать копию элемента. \en Create a copy of the element. virtual bool IsSame ( const MbSpaceItem & other, double accuracy = LENGTH_EPSILON ) const = 0; // \ru Являются ли объекты равными. \en Determine whether objects are equal. virtual bool SetEqual ( const MbSpaceItem & ) = 0; // \ru Сделать равным. \en Make equal. - virtual void Transform( const MbMatrix3D & matr, MbRegTransform * = c3d_null ); // \ru Преобразовать элемент согласно матрице. \en Transform element according to the matrix. - virtual void Move ( const MbVector3D & to, MbRegTransform * = c3d_null ); // \ru Сдвиг. \en Move. - virtual void Rotate ( const MbAxis3D & axis, double angle, MbRegTransform * = c3d_null ); // \ru Повернуть вокруг оси. \en Rotate around an axis. + virtual void Transform( const MbMatrix3D & matr, MbRegTransform * = NULL ); // \ru Преобразовать элемент согласно матрице. \en Transform element according to the matrix. + virtual void Move ( const MbVector3D & to, MbRegTransform * = NULL ); // \ru Сдвиг. \en Move. + virtual void Rotate ( const MbAxis3D & axis, double angle, MbRegTransform * = NULL ); // \ru Повернуть вокруг оси. \en Rotate around an axis. virtual double DistanceToPoint( const MbCartPoint3D & to ) const; // \ru Вычислить расстояние до точки. \en Calculate the distance to a point. virtual void GetProperties( MbProperties & properties ) = 0; // \ru Выдать свойства объекта. \en Get properties of the object. @@ -140,7 +140,7 @@ public: // \ru Ближайшая проекция точки на поверхность \en Nearest point projection onto the surface virtual MbeNewtonResult PointProjectionNewton( const MbCartPoint3D & p, size_t iterLimit, double & u, double & v, bool ext ) const; // \ru Функция для нахождения проекции точки на поверхность. \en Function for searching the point projection onto the surface. - virtual bool NearPointProjection( const MbCartPoint3D & p, double & u, double & v, bool ext, MbRect2D * uvRange = c3d_null ) const; // \ru Ближайшая проекция точки на поверхность. \en The nearest point projection onto the surface. + virtual bool NearPointProjection( const MbCartPoint3D & p, double & u, double & v, bool ext, MbRect2D * uvRange = NULL ) const; // \ru Ближайшая проекция точки на поверхность. \en The nearest point projection onto the surface. virtual bool IsRectangular() const; // \ru Если true производные по u и v ортогональны. \en If true, then derivatives by u and v are orthogonal. virtual void SetLimit( double u1, double v1, double u2, double v2 ) = 0; @@ -168,7 +168,7 @@ public: \return \ru true в случае успеха операции \en True if the operation succeeded \~ */ - virtual bool GetPointProjection( const MbCartPoint3D & p, bool init, double & u, double & v, bool ext, MbRect2D * uvRange = c3d_null ) const = 0; + virtual bool GetPointProjection( const MbCartPoint3D & p, bool init, double & u, double & v, bool ext, MbRect2D * uvRange = NULL ) const = 0; // Дать приращение параметра u и параметра v, соответствующее единичной длине в пространстве. \en Get increment of parameters, corresponding to the unit length in space. virtual void GetParamsToUnit( double u, double v, double & uParam, double & vParam ) const; diff --git a/C3d/Include/surf_elevation_surface.h b/C3d/Include/surf_elevation_surface.h index df975a1..0f40d94 100644 --- a/C3d/Include/surf_elevation_surface.h +++ b/C3d/Include/surf_elevation_surface.h @@ -38,7 +38,7 @@ const VERSION ELEVATION_SURFACE_VERSION1 = 0x0F001003L; ///< \ru Расчёт т // --- class MATH_CLASS MbElevationSurface : public MbLoftedSurface { private: - MbCurve3D * spine; ///< \ru Направляющая кривая (не c3d_null). \en Guide curve (not c3d_null). + MbCurve3D * spine; ///< \ru Направляющая кривая (не NULL). \en Guide curve (not NULL). RPArray mSpines; ///< \ru Множество указателей на направляющие кривые (на основе spine). \en Set of pointers to guide curves (based on 'spine'). bool isSimToEvol; ///< \ru Способ расчёта точек на поверхности. \en Way of calculating of points on the surface. @@ -102,13 +102,13 @@ public: \en \name Common functions of a geometric object \{ */ virtual MbeSpaceType IsA() const; // \ru Тип элемента \en A type of element - virtual MbSpaceItem & Duplicate( MbRegDuplicate * = c3d_null ) const; // \ru Сделать копию элемента \en Create a copy of the element + virtual MbSpaceItem & Duplicate( MbRegDuplicate * = NULL ) const; // \ru Сделать копию элемента \en Create a copy of the element virtual bool IsSame ( const MbSpaceItem & other, double accuracy = LENGTH_EPSILON ) const; // \ru Равны ли объекты \en Whether the objects are equal virtual bool SetEqual ( const MbSpaceItem & ); // \ru Сделать равным \en Make equal virtual bool IsSimilar( const MbSpaceItem & ) const; // \ru Являются ли объекты подобными \en Whether the objects are similar - virtual void Transform( const MbMatrix3D &, MbRegTransform * = c3d_null ); // \ru Преобразовать элемент согласно матрице \en Transform element according to the matrix - virtual void Move ( const MbVector3D &, MbRegTransform * = c3d_null ); // \ru Сдвиг \en Translation - virtual void Rotate ( const MbAxis3D &, double angle, MbRegTransform * = c3d_null ); // \ru Повернуть вокруг оси \en Rotate around an axis + virtual void Transform( const MbMatrix3D &, MbRegTransform * = NULL ); // \ru Преобразовать элемент согласно матрице \en Transform element according to the matrix + virtual void Move ( const MbVector3D &, MbRegTransform * = NULL ); // \ru Сдвиг \en Translation + virtual void Rotate ( const MbAxis3D &, double angle, MbRegTransform * = NULL ); // \ru Повернуть вокруг оси \en Rotate around an axis virtual void Refresh (); virtual void GetProperties( MbProperties & properties ); // \ru Выдать свойства объекта \en Get properties of the object @@ -193,7 +193,7 @@ public: virtual size_t GetVMeshCount() const; // \ru Выдать количество полигонов по v \en Get the count of polygons by v /// \ru Вернуть направляющую кривую. \en Return spine (guide) curve. - const MbCurve3D & GetSpineCurve() const { C3D_ASSERT( spine != c3d_null ); return *spine; } + const MbCurve3D & GetSpineCurve() const { C3D_ASSERT( spine != NULL ); return *spine; } /// \ru Вернуть направляющую кривую. \en Return spine (guide) curve. bool IsSimilarToEvolution() const { return isSimToEvol; } @@ -315,8 +315,8 @@ inline void MbElevationSurface::CheckParam( double & u, double & v, bool ext ) c \en Center of mass of profile curve. \~ \param[in,out] ct - \ru Искомый параметр. \en Required parameter. \~ - \param[in,out] tau - \ru Производная направляющей в точке с координатой ct. Если в функцию передать c3d_null, производная не вычисляется. - \en Derivative of guide curve at point with 'ct' coordinate. If giving c3d_null to function, then derivative isn't calculated. \~ + \param[in,out] tau - \ru Производная направляющей в точке с координатой ct. Если в функцию передать NULL, производная не вычисляется. + \en Derivative of guide curve at point with 'ct' coordinate. If giving NULL to function, then derivative isn't calculated. \~ \return \ru true - если направляющая пересекается с плоскостью профиля, false - если не пересекается. \en True - if guide curve intersects with plane of profile, false - if not intersects. \~ \ingroup Algorithms_3D @@ -341,8 +341,8 @@ bool CreateElevationParam( const MbCurve3D & crvThis, const MbCurve3D & spine, \en The spine (guide) curve. \~ \param[in,out] vParams - \ru Множество параметров. \en Set of parameters. \~ - \param[in,out] tiePnts - \ru Множество центров масс профильных кривых. Не заполняется, если в функцию передать c3d_null. - \en Set of centers of mass of profile curves. If giving c3d_null to function, then it isn't filled. \~ + \param[in,out] tiePnts - \ru Множество центров масс профильных кривых. Не заполняется, если в функцию передать NULL. + \en Set of centers of mass of profile curves. If giving NULL to function, then it isn't filled. \~ \return \ru true - если массив параметров успешно создан. \en True - if the array of parameters successfully created. \~ \ingroup Algorithms_3D diff --git a/C3d/Include/surf_evolution_surface.h b/C3d/Include/surf_evolution_surface.h index 858c429..fdf1022 100644 --- a/C3d/Include/surf_evolution_surface.h +++ b/C3d/Include/surf_evolution_surface.h @@ -140,13 +140,13 @@ public: \en \name Common functions of a geometric object \{ */ virtual MbeSpaceType IsA() const; // \ru Тип элемента \en A type of element - virtual MbSpaceItem & Duplicate( MbRegDuplicate * = c3d_null ) const; // \ru Сделать копию элемента. \en Create a copy of the element. + virtual MbSpaceItem & Duplicate( MbRegDuplicate * = NULL ) const; // \ru Сделать копию элемента. \en Create a copy of the element. virtual bool IsSame ( const MbSpaceItem & other, double accuracy = LENGTH_EPSILON ) const; // \ru Равны ли объекты. \en Whether the objects are equal. virtual bool SetEqual ( const MbSpaceItem & ); // \ru Сделать равным. \en Make equal. virtual bool IsSimilar ( const MbSpaceItem & ) const; // \ru Являются ли объекты подобными. \en Determine whether the objects are similar. - virtual void Transform( const MbMatrix3D &, MbRegTransform * = c3d_null ); // \ru Преобразовать элемент согласно матрице. \en Transform element according to the matrix. - virtual void Move ( const MbVector3D &, MbRegTransform * = c3d_null ); // \ru Сдвиг. \en Move. - virtual void Rotate ( const MbAxis3D &, double angle, MbRegTransform * = c3d_null ); // \ru Повернуть вокруг оси. \en Rotate around an axis. + virtual void Transform( const MbMatrix3D &, MbRegTransform * = NULL ); // \ru Преобразовать элемент согласно матрице. \en Transform element according to the matrix. + virtual void Move ( const MbVector3D &, MbRegTransform * = NULL ); // \ru Сдвиг. \en Move. + virtual void Rotate ( const MbAxis3D &, double angle, MbRegTransform * = NULL ); // \ru Повернуть вокруг оси. \en Rotate around an axis. virtual void GetProperties( MbProperties & ); // \ru Выдать свойства объекта. \en Get properties of the object. virtual void SetProperties( const MbProperties & ); // \ru Записать свойства объекта. \en Set properties of the object. @@ -216,7 +216,7 @@ public: \en \name Common functions of surface \{ */ virtual double CurvatureU ( double u, double v ) const; // \ru Kривизна линии по u. \en Curvature of line by u. - virtual bool IsPlanar( double accuracy = METRIC_EPSILON ) const; // \ru Является ли поверхность плоской. \en Whether the surface is planar. + virtual bool IsPlanar() const; // \ru Является ли поверхность плоской. \en Whether the surface is planar. virtual void ChangeCarrier( const MbSpaceItem & item, MbSpaceItem & init ); // \ru Изменение носителя. \en Changing of carrier. diff --git a/C3d/Include/surf_exaction_surface.h b/C3d/Include/surf_exaction_surface.h index 257f5cb..484349c 100644 --- a/C3d/Include/surf_exaction_surface.h +++ b/C3d/Include/surf_exaction_surface.h @@ -96,13 +96,13 @@ public: \en \name Common functions of a geometric object \{ */ virtual MbeSpaceType IsA() const; // \ru Тип элемента. \en A type of element. - virtual MbSpaceItem & Duplicate( MbRegDuplicate * = c3d_null ) const; // \ru Сделать копию элемента. \en Create a copy of the element. + virtual MbSpaceItem & Duplicate( MbRegDuplicate * = NULL ) const; // \ru Сделать копию элемента. \en Create a copy of the element. virtual bool IsSame ( const MbSpaceItem & other, double accuracy = LENGTH_EPSILON ) const; // \ru Равны ли объекты. \en Whether the objects are equal. virtual bool SetEqual ( const MbSpaceItem & ); // \ru Сделать равными. \en Make equal. virtual bool IsSimilar( const MbSpaceItem & ) const; // \ru Являются ли объекты подобными. \en Determine whether the objects are similar. - virtual void Transform( const MbMatrix3D &, MbRegTransform * = c3d_null ); // \ru Преобразовать элемент согласно матрице. \en Transform element according to the matrix. - virtual void Move ( const MbVector3D &, MbRegTransform * = c3d_null ); // \ru Сдвиг. \en Move. - virtual void Rotate ( const MbAxis3D &, double angle, MbRegTransform * = c3d_null ); // \ru Повернуть вокруг оси. \en Rotate around an axis. + virtual void Transform( const MbMatrix3D &, MbRegTransform * = NULL ); // \ru Преобразовать элемент согласно матрице. \en Transform element according to the matrix. + virtual void Move ( const MbVector3D &, MbRegTransform * = NULL ); // \ru Сдвиг. \en Move. + virtual void Rotate ( const MbAxis3D &, double angle, MbRegTransform * = NULL ); // \ru Повернуть вокруг оси. \en Rotate around an axis. virtual void GetProperties( MbProperties & properties ); // \ru Выдать свойства объекта. \en Get properties of the object. virtual void SetProperties( const MbProperties & properties ); // \ru Записать свойства объекта. \en Set properties of the object. @@ -153,7 +153,7 @@ public: /** \ru \name Общие функции поверхности \en \name Common functions of surface \{ */ - virtual bool IsPlanar( double accuracy = METRIC_EPSILON ) const; // \ru Является ли поверхность плоской. \en Whether the surface is planar. + virtual bool IsPlanar() const; // \ru Является ли поверхность плоской. \en Whether the surface is planar. virtual MbSplineSurface * NurbsSurface( double, double, double, double, bool bmatch = false ) const; // \ru NURBS копия поверхности. \en NURBS copy of a surface. virtual MbSurface * Offset( double d, bool same ) const; // \ru Создание эквидистантной поверхности. \en Create an offset surface. diff --git a/C3d/Include/surf_expansion_surface.h b/C3d/Include/surf_expansion_surface.h index 35990db..199e813 100644 --- a/C3d/Include/surf_expansion_surface.h +++ b/C3d/Include/surf_expansion_surface.h @@ -38,7 +38,7 @@ class MATH_CLASS MbExpansionSurface : public MbSweptSurface { private: MbCurve3D * spine; ///< \ru Направляющая кривая. \en Spine (guide) curve. - MbCurve3D * brink; ///< \ru Вторая образующая кривая (первой является curve, может быть c3d_null). \en The second generating curve ('curve' is first one, may be c3d_null). + MbCurve3D * brink; ///< \ru Вторая образующая кривая (первой является curve, может быть NULL). \en The second generating curve ('curve' is first one, may be NULL). double tmin; ///< \ru Начальный параметр brink. \en Start parameter of 'brink'. double dt; ///< \ru Производная параметра кривой brink по параметру u (dt * (u - umin) = t_brink - tmin_brink). \en Derivative of parameter of 'brink' curve by u parameter (dt * (u - umin) = t_brink - tmin_brink). MbCartPoint3D origin; ///< \ru Начало образующей. \en Begin of gravity of generating curve. @@ -62,7 +62,7 @@ public: \en Second generating curve \~ */ MbExpansionSurface( const MbCurve3D & cr, const MbCurve3D & sp, bool sameCurve, bool sameSpine, - MbCurve3D * sl = c3d_null ); + MbCurve3D * sl = NULL ); /** \brief \ru Конструктор по точке, образующей и направляющей. \en Constructor by point, generating curve and guide curve. \~ @@ -101,13 +101,13 @@ public: \en \name Common functions of a geometric object \{ */ virtual MbeSpaceType IsA() const; // \ru Тип элемента. \en A type of element. - virtual MbSpaceItem & Duplicate( MbRegDuplicate * = c3d_null ) const; // \ru Сделать копию элемента. \en Create a copy of the element. + virtual MbSpaceItem & Duplicate( MbRegDuplicate * = NULL ) const; // \ru Сделать копию элемента. \en Create a copy of the element. virtual bool IsSame ( const MbSpaceItem & other, double accuracy = LENGTH_EPSILON ) const; // \ru Равны ли объекты. \en Whether the objects are equal. virtual bool SetEqual ( const MbSpaceItem & ); // \ru Сделать равным. \en Make equal. virtual bool IsSimilar( const MbSpaceItem & ) const; // \ru Являются ли объекты подобными. \en Determine whether the objects are similar. - virtual void Transform( const MbMatrix3D &, MbRegTransform * = c3d_null ); // \ru Преобразовать элемент согласно матрице. \en Transform element according to the matrix. - virtual void Move ( const MbVector3D &, MbRegTransform * = c3d_null ); // \ru Сдвиг. \en Move. - virtual void Rotate ( const MbAxis3D &, double angle, MbRegTransform * = c3d_null ); // \ru Повернуть вокруг оси. \en Rotate around an axis. + virtual void Transform( const MbMatrix3D &, MbRegTransform * = NULL ); // \ru Преобразовать элемент согласно матрице. \en Transform element according to the matrix. + virtual void Move ( const MbVector3D &, MbRegTransform * = NULL ); // \ru Сдвиг. \en Move. + virtual void Rotate ( const MbAxis3D &, double angle, MbRegTransform * = NULL ); // \ru Повернуть вокруг оси. \en Rotate around an axis. virtual void GetProperties( MbProperties & properties ); // \ru Выдать свойства объекта. \en Get properties of the object. virtual void SetProperties( const MbProperties & properties ); // \ru Записать свойства объекта. \en Set properties of the object. @@ -174,7 +174,7 @@ public: \{ */ virtual double CurvatureU ( double u, double v ) const; // \ru Kривизна линии по u. \en Curvature of line by u. virtual double CurvatureV ( double u, double v ) const; // \ru Kривизна линии по v. \en Curvature of line by v. - virtual bool IsPlanar( double accuracy = METRIC_EPSILON ) const; // \ru Является ли поверхность плоской. \en Whether the surface is planar. + virtual bool IsPlanar() const; // \ru Является ли поверхность плоской. \en Whether the surface is planar. virtual size_t GetUMeshCount() const; // \ru Выдать количество полигонов по u. \en Get the count of polygons by u. virtual size_t GetVMeshCount() const; // \ru Выдать количество полигонов по v. \en Get the count of polygons by v. @@ -248,7 +248,7 @@ IMPL_PERSISTENT_OPS( MbExpansionSurface ) // --- inline double MbExpansionSurface::BrinkParameterFrom( const double & u ) const { double t = u; - if ( brink != c3d_null ) + if ( brink != NULL ) t = tmin + (u - umin) * dt; return t; } @@ -259,7 +259,7 @@ inline double MbExpansionSurface::BrinkParameterFrom( const double & u ) const { // --- inline double MbExpansionSurface::BrinkParameterInto( const double & t ) const { double u = t; - if ( brink != c3d_null ) { + if ( brink != NULL ) { double du = (::fabs(dt) > EXTENT_EQUAL) ? 1.0 / dt : 1.0; u = umin + (t - tmin) * du; } diff --git a/C3d/Include/surf_exploration_surface.h b/C3d/Include/surf_exploration_surface.h index 404c8b1..a102f9e 100644 --- a/C3d/Include/surf_exploration_surface.h +++ b/C3d/Include/surf_exploration_surface.h @@ -75,13 +75,13 @@ public: \en \name Common functions of a geometric object \{ */ virtual MbeSpaceType IsA() const; // \ru Тип элемента \en A type of element - virtual MbSpaceItem & Duplicate( MbRegDuplicate * = c3d_null ) const; // \ru Сделать копию элемента. \en Create a copy of the element. + virtual MbSpaceItem & Duplicate( MbRegDuplicate * = NULL ) const; // \ru Сделать копию элемента. \en Create a copy of the element. virtual bool IsSame ( const MbSpaceItem & other, double accuracy = LENGTH_EPSILON ) const; // \ru Равны ли объекты. \en Whether the objects are equal. virtual bool SetEqual ( const MbSpaceItem & ); // \ru Сделать равным. \en Make equal. virtual bool IsSimilar ( const MbSpaceItem & ) const; // \ru Являются ли объекты подобными. \en Determine whether the objects are similar. - virtual void Transform( const MbMatrix3D &, MbRegTransform * = c3d_null ); // \ru Преобразовать элемент согласно матрице. \en Transform element according to the matrix. - virtual void Move ( const MbVector3D &, MbRegTransform * = c3d_null ); // \ru Сдвиг. \en Move. - virtual void Rotate ( const MbAxis3D &, double angle, MbRegTransform * = c3d_null ); // \ru Повернуть вокруг оси. \en Rotate around an axis. + virtual void Transform( const MbMatrix3D &, MbRegTransform * = NULL ); // \ru Преобразовать элемент согласно матрице. \en Transform element according to the matrix. + virtual void Move ( const MbVector3D &, MbRegTransform * = NULL ); // \ru Сдвиг. \en Move. + virtual void Rotate ( const MbAxis3D &, double angle, MbRegTransform * = NULL ); // \ru Повернуть вокруг оси. \en Rotate around an axis. virtual void GetProperties( MbProperties & ); // \ru Выдать свойства объекта. \en Get properties of the object. virtual void SetProperties( const MbProperties & ); // \ru Записать свойства объекта. \en Set properties of the object. @@ -163,16 +163,16 @@ public: \en Create an evolution surface. \~ \details \ru Создать кинематическую поверхность. \en Create an evolution surface. \~ - \param[in] curve - \ru Образующая кривая. - \en Generating curve. \~ - \param[in] spine - \ru Направляющая кривая. - \en Guide curve. \~ - \param[in] samec - \ru Признак использования оригинала образующей кривой, а не копии. - \en Attribute of usage of original of generating curve, not a copy. \~ - \param[in] _scaling - \ru Функция масштабирования образующей кривой. - \en The function of curve scaling. \~ - \param[in] _winding - \ru Функция вращения образующей кривой. - \en The function of curve rotation. \~ + \param[in] curve - \ru Образующая кривая + \en Generating curve \~ + \param[in] spine - \ru Направляющая кривая + \en Guide curve \~ + \param[in] samec - \ru Признак использования оригинала образующей кривой, а не копии + \en Attribute of usage of original of generating curve, not a copy \~ + \param[in] sFunc - \ru Функция масштабирования образующей кривой. + \en The function of curve scaling. \~ + \param[in] rFunc - \ru Функция вращения образующей кривой. + \en The function of curve rotation. \~ \return \ru Возвращает созданную поверхность. \en Return the created surface. \~ \ingroup Surface_Modeling diff --git a/C3d/Include/surf_extrusion_surface.h b/C3d/Include/surf_extrusion_surface.h index 7030984..89f83fa 100644 --- a/C3d/Include/surf_extrusion_surface.h +++ b/C3d/Include/surf_extrusion_surface.h @@ -76,13 +76,13 @@ public: \en \name Common functions of a geometric object \{ */ virtual MbeSpaceType IsA() const; // \ru Тип элемента. \en A type of element. - virtual MbSpaceItem & Duplicate( MbRegDuplicate * = c3d_null ) const; // \ru Сделать копию элемента. \en Create a copy of the element. + virtual MbSpaceItem & Duplicate( MbRegDuplicate * = NULL ) const; // \ru Сделать копию элемента. \en Create a copy of the element. virtual bool IsSame ( const MbSpaceItem & other, double accuracy = LENGTH_EPSILON ) const; // \ru Равны ли объекты. \en Whether the objects are equal. virtual bool SetEqual ( const MbSpaceItem & ); // \ru Сделать равным. \en Make equal. virtual bool IsSimilar( const MbSpaceItem & ) const; // \ru Являются ли объекты подобными. \en Determine whether the objects are similar. - virtual void Transform( const MbMatrix3D &, MbRegTransform * = c3d_null ); // \ru Преобразовать элемент согласно матрице. \en Transform element according to the matrix. - virtual void Move ( const MbVector3D &, MbRegTransform * = c3d_null ); // \ru Сдвиг. \en Move. - virtual void Rotate ( const MbAxis3D &, double angle, MbRegTransform * = c3d_null ); // \ru Повернуть вокруг оси. \en Rotate around an axis. + virtual void Transform( const MbMatrix3D &, MbRegTransform * = NULL ); // \ru Преобразовать элемент согласно матрице. \en Transform element according to the matrix. + virtual void Move ( const MbVector3D &, MbRegTransform * = NULL ); // \ru Сдвиг. \en Move. + virtual void Rotate ( const MbAxis3D &, double angle, MbRegTransform * = NULL ); // \ru Повернуть вокруг оси. \en Rotate around an axis. virtual void GetProperties( MbProperties & properties ); // \ru Выдать свойства объекта. \en Get properties of the object. virtual void SetProperties( const MbProperties & properties ); // \ru Записать свойства объекта. \en Set properties of the object. @@ -150,7 +150,7 @@ public: virtual double CurvatureU ( double u, double v ) const; // \ru Kривизна линии по u. \en Curvature of line by u. virtual double CurvatureV ( double u, double v ) const; // \ru Kривизна линии v. \en Curvature of v-line. - virtual bool IsPlanar( double accuracy = METRIC_EPSILON ) const; // \ru Является ли поверхность плоской. \en Whether the surface is planar. + virtual bool IsPlanar() const; // \ru Является ли поверхность плоской. \en Whether the surface is planar. virtual void ChangeCarrier( const MbSpaceItem & item, MbSpaceItem & init ); // \ru Изменение носителя. \en Changing of carrier. virtual MbSplineSurface * NurbsSurface( double, double, double, double, bool bmatch = false ) const; // \ru NURBS копия поверхности. \en NURBS copy of a surface. @@ -163,7 +163,7 @@ public: virtual ThreeStates Salient() const; // \ru Выпуклая ли поверхность. \en Whether a surface is convex. // \ru Проекция точки на поверхность. \en The point projection onto the surface. - virtual bool NearPointProjection ( const MbCartPoint3D & p, double & u, double & v, bool ext, MbRect2D * uvRange = c3d_null ) const; // \ru Ближайшая проекция точки на поверхность. \en The nearest point projection onto the surface. + virtual bool NearPointProjection ( const MbCartPoint3D & p, double & u, double & v, bool ext, MbRect2D * uvRange = NULL ) const; // \ru Ближайшая проекция точки на поверхность. \en The nearest point projection onto the surface. // \ru Пересечение с кривой. \en Intersection with curve. virtual void CurveIntersection( const MbCurve3D & curv, SArray & uv, SArray & tt, bool ext0, bool ext, bool touchInclude = false ) const; diff --git a/C3d/Include/surf_fillet_surface.h b/C3d/Include/surf_fillet_surface.h index 444352b..9b0e375 100644 --- a/C3d/Include/surf_fillet_surface.h +++ b/C3d/Include/surf_fillet_surface.h @@ -46,7 +46,7 @@ class MATH_CLASS MbFunction; */// --- class MATH_CLASS MbFilletSurface : public MbSmoothSurface { protected: - MbCurve3D * curve0; ///< \ru Кривая пересечения касательных к поверхностям - всегда не c3d_null. \en Intersection curve of tangents to surfaces - always not c3d_null. + MbCurve3D * curve0; ///< \ru Кривая пересечения касательных к поверхностям - всегда не NULL. \en Intersection curve of tangents to surfaces - always not NULL. MbFunction * weights0; ///< \ru Функция веса точек средней кривой curve0. \en Function of weight of points of curve0 mid-curve. double conic; ///< \ru Коэффициент формы, изменяется от 0.05 до 0.95, определяет вес точек кривой curve0. \en Coefficient of shape is changed between 0.05 and 0.95 and determines weight of points of curve0 curve. bool even; ///< \ru Равномерная параметризация по дуге или нет. \en Whether arc length parameterization is uniform or not. @@ -181,13 +181,13 @@ public: \en \name Common functions of a geometric object \{ */ virtual MbeSpaceType IsA() const; // \ru Тип элемента \en A type of element - virtual MbSpaceItem & Duplicate( MbRegDuplicate * = c3d_null ) const; // \ru Сделать копию элемента. \en Create a copy of the element. + virtual MbSpaceItem & Duplicate( MbRegDuplicate * = NULL ) const; // \ru Сделать копию элемента. \en Create a copy of the element. virtual bool IsSame ( const MbSpaceItem & other, double accuracy = LENGTH_EPSILON ) const; virtual bool SetEqual ( const MbSpaceItem & ); // \ru Сделать равным. \en Make equal. virtual bool IsSimilar( const MbSpaceItem & ) const; // \ru Являются ли объекты подобными. \en Determine whether the objects are similar. - virtual void Transform( const MbMatrix3D &, MbRegTransform * = c3d_null ); // \ru Преобразовать элемент согласно матрице. \en Transform element according to the matrix. - virtual void Move ( const MbVector3D &, MbRegTransform * = c3d_null ); // \ru Сдвиг. \en Move. - virtual void Rotate ( const MbAxis3D &, double angle, MbRegTransform * = c3d_null ); // \ru Повернуть вокруг оси. \en Rotate around an axis. + virtual void Transform( const MbMatrix3D &, MbRegTransform * = NULL ); // \ru Преобразовать элемент согласно матрице. \en Transform element according to the matrix. + virtual void Move ( const MbVector3D &, MbRegTransform * = NULL ); // \ru Сдвиг. \en Move. + virtual void Rotate ( const MbAxis3D &, double angle, MbRegTransform * = NULL ); // \ru Повернуть вокруг оси. \en Rotate around an axis. virtual void GetProperties( MbProperties &properties ); // \ru Выдать свойства объекта. \en Get properties of the object. virtual void SetProperties( const MbProperties &properties ); // \ru Записать свойства объекта. \en Set properties of the object. @@ -284,7 +284,7 @@ public: // \ru Проекции точки на поверхность. \en The point projections onto the surface. virtual MbeNewtonResult PointProjectionNewton( const MbCartPoint3D & p, size_t iterLimit, double & u, double & v, bool ext ) const; // \ru Функция для нахождения проекции точки на поверхность. \en Function for searching the point projection onto the surface. - virtual bool NearPointProjection ( const MbCartPoint3D & p, double & u, double & v, bool ext, MbRect2D * uvRange = c3d_null ) const; // \ru Ближайшая проекция точки на поверхность. \en The nearest point projection onto the surface. + virtual bool NearPointProjection ( const MbCartPoint3D & p, double & u, double & v, bool ext, MbRect2D * uvRange = NULL ) const; // \ru Ближайшая проекция точки на поверхность. \en The nearest point projection onto the surface. virtual double GetFilletRadius( const MbCartPoint3D & p ) const; // \ru Является ли поверхность скруглением. \en Whether the surface is fillet. virtual double GetFilletRadius( double u ) const; // \ru Дать радиус скругления по первому параметру. \en Get fillet radius if the surface is fillet. diff --git a/C3d/Include/surf_gregory_surface.h b/C3d/Include/surf_gregory_surface.h index 388eddb..c96e3d8 100644 --- a/C3d/Include/surf_gregory_surface.h +++ b/C3d/Include/surf_gregory_surface.h @@ -52,7 +52,7 @@ public: \param[in] initContour - \ru Контур. \en The contour. \~ */ - MbGregorySurface( const MbContour3D & initContour, const SArray * conj = c3d_null ); + MbGregorySurface( const MbContour3D & initContour, const SArray * conj = NULL ); protected: /// \ru Конструктор-копия. \en Copy constructor. MbGregorySurface( const MbGregorySurface &, MbRegDuplicate * ); @@ -66,13 +66,13 @@ public: \en \name Common functions of a geometric object. \{ */ virtual MbeSpaceType IsA() const; // \ru Тип элемента. \en A type of element. - virtual MbSpaceItem & Duplicate( MbRegDuplicate * = c3d_null ) const; // \ru Сделать копию элемента. \en Make a copy of element. + virtual MbSpaceItem & Duplicate( MbRegDuplicate * = NULL ) const; // \ru Сделать копию элемента. \en Make a copy of element. virtual bool IsSame( const MbSpaceItem & other, double accuracy = LENGTH_EPSILON ) const; // \ru Является ли объект копией. \en Whether the object is a copy. virtual bool SetEqual( const MbSpaceItem & init ); // \ru Сделать равным. \en Make equal. virtual bool IsSimilar( const MbSpaceItem & init ) const; // \ru Являются ли объекты подобными. \en Whether the objects are similar. - virtual void Transform( const MbMatrix3D & matr, MbRegTransform * = c3d_null ); // \ru Преобразовать элемент согласно матрице. \en Transform element according to the matrix - virtual void Move( const MbVector3D &to, MbRegTransform * = c3d_null ); // \ru Сдвиг. \en Translation - virtual void Rotate( const MbAxis3D &axis, double angle, MbRegTransform * = c3d_null ); // \ru Повернуть вокруг оси. \en Rotate around an axis + virtual void Transform( const MbMatrix3D & matr, MbRegTransform * = NULL ); // \ru Преобразовать элемент согласно матрице. \en Transform element according to the matrix + virtual void Move( const MbVector3D &to, MbRegTransform * = NULL ); // \ru Сдвиг. \en Translation + virtual void Rotate( const MbAxis3D &axis, double angle, MbRegTransform * = NULL ); // \ru Повернуть вокруг оси. \en Rotate around an axis virtual void Refresh(); // \ru Сбросить все временные данные. \en Flush all the temporary data. virtual void GetProperties( MbProperties & properties ); // \ru Выдать свойства объекта. \en Get properties of the object. diff --git a/C3d/Include/surf_grid_surface.h b/C3d/Include/surf_grid_surface.h index 70146be..c656a89 100644 --- a/C3d/Include/surf_grid_surface.h +++ b/C3d/Include/surf_grid_surface.h @@ -193,13 +193,13 @@ public: \{ */ // \ru Общие функции геометрического объекта \en Common functions of a geometric object virtual MbeSpaceType IsA() const; // \ru Тип элемента \en A type of element - virtual MbSpaceItem & Duplicate( MbRegDuplicate * = c3d_null ) const; // \ru Cделать копию элемента \en Make a copy of element + virtual MbSpaceItem & Duplicate( MbRegDuplicate * = NULL ) const; // \ru Cделать копию элемента \en Make a copy of element virtual bool IsSame( const MbSpaceItem & other, double accuracy = LENGTH_EPSILON ) const; virtual bool SetEqual( const MbSpaceItem &init ); // \ru Сделать равным \en Make equal virtual bool IsSimilar( const MbSpaceItem &init ) const; // \ru Являются ли объекты подобными \en Whether the objects are similar - virtual void Transform( const MbMatrix3D &matr, MbRegTransform * = c3d_null ); // \ru Преобразовать элемент согласно матрице \en Transform element according to the matrix - virtual void Move( const MbVector3D &to, MbRegTransform * = c3d_null ); // \ru Сдвиг \en Translation - virtual void Rotate( const MbAxis3D &axis, double angle, MbRegTransform * = c3d_null ); // \ru Повернуть вокруг оси \en Rotate around an axis + virtual void Transform( const MbMatrix3D &matr, MbRegTransform * = NULL ); // \ru Преобразовать элемент согласно матрице \en Transform element according to the matrix + virtual void Move( const MbVector3D &to, MbRegTransform * = NULL ); // \ru Сдвиг \en Translation + virtual void Rotate( const MbAxis3D &axis, double angle, MbRegTransform * = NULL ); // \ru Повернуть вокруг оси \en Rotate around an axis virtual double DistanceToPoint( const MbCartPoint3D & ) const; // \ru Вычислить расстояние до точки. \en Calculate the distance to a point. virtual void GetProperties( MbProperties &properties ); // \ru Выдать свойства объекта \en Get properties of the object @@ -280,9 +280,9 @@ public: virtual size_t CurveClassification( const MbCurve & curve, SArray & tcurv, SArray & dir ) const; // \ru Найти ближайшую проекцию точки на поверхность. \en Find the nearest projection of a point onto the surface. - virtual bool NearPointProjection( const MbCartPoint3D & p, double & u, double & v, bool ext, MbRect2D * uvRange = c3d_null ) const; // \ru Ближайшая проекция точки на поверхность. \en The nearest point projection onto the surface. + virtual bool NearPointProjection( const MbCartPoint3D & p, double & u, double & v, bool ext, MbRect2D * uvRange = NULL ) const; // \ru Ближайшая проекция точки на поверхность. \en The nearest point projection onto the surface. // \ru Найти все проекции точки на поверхность вдоль вектора в любом из двух направлений. \en Find all a point projection onto the surface along a vector in either of two directions. - virtual void DirectPointProjection( const MbCartPoint3D & p, const MbVector3D & vect, SArray & uv, bool ext, MbRect2D * uvRange = c3d_null ) const; + virtual void DirectPointProjection( const MbCartPoint3D & p, const MbVector3D & vect, SArray & uv, bool ext, MbRect2D * uvRange = NULL ) const; // \ru Вce точки пересечения поверхности и кривой. \en All the points of intersection of a surface and a curve. virtual void CurveIntersection( const MbCurve3D & curv, SArray & uv, SArray & tt, bool ext0, bool ext, bool touchInclude = false ) const; @@ -341,7 +341,7 @@ public: , const Triangles & _triangles , const Bounds & _bounds ) { - MbGridSurface * surface = c3d_null; + MbGridSurface * surface = NULL; const size_t itemsCnt = _params.size(); diff --git a/C3d/Include/surf_join_surface.h b/C3d/Include/surf_join_surface.h index 6cec37f..f8cae00 100644 --- a/C3d/Include/surf_join_surface.h +++ b/C3d/Include/surf_join_surface.h @@ -219,12 +219,12 @@ public: \en \name Common functions of a geometric object \{ */ virtual MbeSpaceType IsA() const; // \ru Тип элемента \en A type of element - virtual MbSpaceItem & Duplicate( MbRegDuplicate * = c3d_null ) const; // \ru Сделать копию элемента \en Create a copy of the element + virtual MbSpaceItem & Duplicate( MbRegDuplicate * = NULL ) const; // \ru Сделать копию элемента \en Create a copy of the element virtual bool IsSame ( const MbSpaceItem & other, double accuracy = LENGTH_EPSILON ) const; // \ru Являются ли объекты равными \en Determine whether objects are equal virtual bool SetEqual ( const MbSpaceItem & ); // \ru Сделать равным \en Make equal - virtual void Transform( const MbMatrix3D &, MbRegTransform * = c3d_null ); // \ru Преобразовать элемент согласно матрице \en Transform element according to the matrix - virtual void Move ( const MbVector3D &, MbRegTransform * = c3d_null ); // \ru Сдвиг \en Translation - virtual void Rotate ( const MbAxis3D &, double angle, MbRegTransform * = c3d_null ); // \ru Повернуть вокруг оси \en Rotate around an axis + virtual void Transform( const MbMatrix3D &, MbRegTransform * = NULL ); // \ru Преобразовать элемент согласно матрице \en Transform element according to the matrix + virtual void Move ( const MbVector3D &, MbRegTransform * = NULL ); // \ru Сдвиг \en Translation + virtual void Rotate ( const MbAxis3D &, double angle, MbRegTransform * = NULL ); // \ru Повернуть вокруг оси \en Rotate around an axis virtual void GetProperties( MbProperties & properties ); // \ru Выдать свойства объекта \en Get properties of the object virtual void SetProperties( const MbProperties & properties ); // \ru Записать свойства объекта \en Set properties of the object diff --git a/C3d/Include/surf_lofted_surface.h b/C3d/Include/surf_lofted_surface.h index 9bbfa06..c088578 100644 --- a/C3d/Include/surf_lofted_surface.h +++ b/C3d/Include/surf_lofted_surface.h @@ -198,13 +198,13 @@ public: \{ */ virtual MbeSpaceType IsA() const; // \ru Тип элемента \en A type of element virtual MbeSpaceType Type() const; // \ru Тип элемента \en A type of element - virtual MbSpaceItem & Duplicate( MbRegDuplicate * = c3d_null ) const; // \ru Сделать копию элемента \en Create a copy of the element + virtual MbSpaceItem & Duplicate( MbRegDuplicate * = NULL ) const; // \ru Сделать копию элемента \en Create a copy of the element virtual bool IsSame ( const MbSpaceItem & other, double accuracy = LENGTH_EPSILON ) const; // \ru Равны ли объекты \en Whether the objects are equal virtual bool SetEqual ( const MbSpaceItem & ); // \ru Сделать равным \en Make equal virtual bool IsSimilar( const MbSpaceItem & ) const; // \ru Являются ли объекты подобными \en Whether the objects are similar - virtual void Transform( const MbMatrix3D &, MbRegTransform * = c3d_null ); // \ru Преобразовать элемент согласно матрице \en Transform element according to the matrix - virtual void Move ( const MbVector3D &, MbRegTransform * = c3d_null ); // \ru Сдвиг \en Translation - virtual void Rotate ( const MbAxis3D &, double angle, MbRegTransform * = c3d_null ); // \ru Повернуть вокруг оси \en Rotate around an axis + virtual void Transform( const MbMatrix3D &, MbRegTransform * = NULL ); // \ru Преобразовать элемент согласно матрице \en Transform element according to the matrix + virtual void Move ( const MbVector3D &, MbRegTransform * = NULL ); // \ru Сдвиг \en Translation + virtual void Rotate ( const MbAxis3D &, double angle, MbRegTransform * = NULL ); // \ru Повернуть вокруг оси \en Rotate around an axis virtual void Refresh(); virtual void GetProperties( MbProperties & properties ); // \ru Выдать свойства объекта \en Get properties of the object @@ -291,7 +291,7 @@ public: /** \ru \name Общие функции поверхности \en \name Common functions of surface \{ */ - virtual bool IsPlanar( double accuracy = METRIC_EPSILON ) const; // \ru Является ли поверхность плоской \en Whether the surface is planar + virtual bool IsPlanar() const; // \ru Является ли поверхность плоской \en Whether the surface is planar virtual void ChangeCarrier( const MbSpaceItem & item, MbSpaceItem & init ); // \ru Изменение носителя \en Changing of carrier virtual void CalculateGabarit( MbCube & ) const; // \ru Рассчитать габарит поверхности \en Calculate bounding box of surface @@ -318,9 +318,9 @@ public: SArray & uu, SArray & vv ) const; // \ru Найти ближайшую проекцию точки на поверхность или ее продолжение по заданному начальному приближению. \en Find the neares projection of a point onto the surface. - virtual bool NearPointProjection ( const MbCartPoint3D & pnt, double & u, double & v, bool ext, MbRect2D * uvRange = c3d_null ) const; + virtual bool NearPointProjection ( const MbCartPoint3D & pnt, double & u, double & v, bool ext, MbRect2D * uvRange = NULL ) const; // \ru Найти все проекции точки на поверхность вдоль вектора в любом из двух направлений. \en Find all a point projection onto the surface along a vector in either of two directions. - virtual void DirectPointProjection( const MbCartPoint3D & pnt, const MbVector3D & vect, SArray & uv, bool ext, MbRect2D * uvRange = c3d_null ) const; + virtual void DirectPointProjection( const MbCartPoint3D & pnt, const MbVector3D & vect, SArray & uv, bool ext, MbRect2D * uvRange = NULL ) const; virtual bool IsLineU() const; // \ru Если true все производные по U выше первой равны нулю \en If true, then all the derivatives by U higher the first one are equal to zero virtual bool IsLineV() const; // \ru Если true все производные по V выше первой равны нулю \en If true, then all the derivatives by V higher the first one are equal to zero @@ -346,7 +346,7 @@ public: \return \ru Константная кривая. \en The constant curve. \~ */ - const MbCurve3D * GetCurve( ptrdiff_t ind ) const { return (ind >= 0 && ind < (ptrdiff_t)uCurves.Count()) ? uCurves[ind] : c3d_null; } + const MbCurve3D * GetCurve( ptrdiff_t ind ) const { return (ind >= 0 && ind < (ptrdiff_t)uCurves.Count()) ? uCurves[ind] : NULL; } /** \brief \ru Получить кривую для редактирования по номеру. \en Get curve for editing by an index. \~ \details \ru Получить кривую для редактирования по номеру. \n @@ -356,7 +356,7 @@ public: \return \ru Кривая. \en A curve. \~ */ - MbCurve3D * SetCurve( ptrdiff_t ind ) { return (ind >= 0 && ind < (ptrdiff_t)uCurves.Count()) ? uCurves[ind] : c3d_null; } + MbCurve3D * SetCurve( ptrdiff_t ind ) { return (ind >= 0 && ind < (ptrdiff_t)uCurves.Count()) ? uCurves[ind] : NULL; } /** \brief \ru Получить параметр по номеру. \en Get parameter by an index. \~ \details \ru Получить параметр по номеру.\n @@ -687,8 +687,8 @@ inline void MbLoftedSurface::ParamThird( double t1, double t2, double * tLoft ) \en Whether the surface is closed by parameter v. \~ \param[in,out] vParams - \ru Множество параметров. \en Set of parameters. \~ - \param[in,out] tiePnts - \ru Множество центров масс профильных кривых. Не заполняется, если в функцию передать c3d_null. - \en Set of centers of mass of profile curves. If giving c3d_null to function, then it isn't filled. \~ + \param[in,out] tiePnts - \ru Множество центров масс профильных кривых. Не заполняется, если в функцию передать NULL. + \en Set of centers of mass of profile curves. If giving NULL to function, then it isn't filled. \~ \param[in] version - \ru Версия. \en Version. \~ \return \ru true - если массив параметров успешно создан. diff --git a/C3d/Include/surf_mesh_surface.h b/C3d/Include/surf_mesh_surface.h index cf6701a..641434c 100644 --- a/C3d/Include/surf_mesh_surface.h +++ b/C3d/Include/surf_mesh_surface.h @@ -191,7 +191,7 @@ public: */ MbMeshSurface( RPArray & initU, RPArray & initV, bool uClosed, bool vClosed, - bool same, const SArray * types = c3d_null, + bool same, const SArray * types = NULL, MbeMeshSurfaceVersion vers = msv_Ver3 ); /** \brief \ru Конструктор поверхности. \en Constructor of surface. \~ @@ -225,7 +225,7 @@ public: MbMeshSurface( RPArray & initU, RPArray & initV, SArray & parsU, SArray & parsV, bool uClosed, bool vClosed, - bool same, const SArray * types = c3d_null, + bool same, const SArray * types = NULL, MbeMeshSurfaceVersion vers = msv_Ver3 ); private: @@ -279,13 +279,13 @@ public: \{ */ virtual MbeSpaceType IsA() const; // \ru Тип элемента \en A type of element virtual MbeSpaceType Type() const; // \ru Групповой тип элемента. \en Group element type. - virtual MbSpaceItem & Duplicate( MbRegDuplicate * = c3d_null ) const; // \ru Cделать копию элемента \en Make a copy of element + virtual MbSpaceItem & Duplicate( MbRegDuplicate * = NULL ) const; // \ru Cделать копию элемента \en Make a copy of element virtual bool IsSame( const MbSpaceItem & other, double accuracy = LENGTH_EPSILON ) const; // \ru Является ли объект копией. \en Whether the object is a copy. virtual bool SetEqual( const MbSpaceItem & init ); // \ru Сделать равным \en Make equal virtual bool IsSimilar( const MbSpaceItem & init ) const; // \ru Являются ли объекты подобными \en Whether the objects are similar - virtual void Transform( const MbMatrix3D & matr, MbRegTransform * = c3d_null ); // \ru Преобразовать элемент согласно матрице \en Transform element according to the matrix - virtual void Move( const MbVector3D &to, MbRegTransform * = c3d_null ); // \ru Сдвиг \en Translation - virtual void Rotate( const MbAxis3D &axis, double angle, MbRegTransform * = c3d_null ); // \ru Повернуть вокруг оси \en Rotate around an axis + virtual void Transform( const MbMatrix3D & matr, MbRegTransform * = NULL ); // \ru Преобразовать элемент согласно матрице \en Transform element according to the matrix + virtual void Move( const MbVector3D &to, MbRegTransform * = NULL ); // \ru Сдвиг \en Translation + virtual void Rotate( const MbAxis3D &axis, double angle, MbRegTransform * = NULL ); // \ru Повернуть вокруг оси \en Rotate around an axis virtual void Refresh(); // \ru Сбросить все временные данные \en Flush all the temporary data virtual void GetProperties( MbProperties & properties ); // \ru Выдать свойства объекта \en Get properties of the object @@ -390,9 +390,9 @@ public: virtual bool IsLineV() const; // \ru Если true все производные по V выше первой равны нулю \en If true, then all the derivatives by V higher the first one are equal to zero // \ru Найти ближайшую проекцию точки на поверхность или ее продолжение по заданному начальному приближению. \en Find the neares projection of a point onto the surface. - virtual bool NearPointProjection ( const MbCartPoint3D & pnt, double & u, double & v, bool ext, MbRect2D * uvRange = c3d_null ) const; + virtual bool NearPointProjection ( const MbCartPoint3D & pnt, double & u, double & v, bool ext, MbRect2D * uvRange = NULL ) const; // \ru Найти все проекции точки на поверхность вдоль вектора в любом из двух направлений. \en Find all a point projection onto the surface along a vector in either of two directions. - virtual void DirectPointProjection( const MbCartPoint3D & pnt, const MbVector3D & vect, SArray & uv, bool ext, MbRect2D * uvRange = c3d_null ) const; + virtual void DirectPointProjection( const MbCartPoint3D & pnt, const MbVector3D & vect, SArray & uv, bool ext, MbRect2D * uvRange = NULL ) const; virtual MbCurve3D * CurveU( double v, MbRect1D * pRgn, bool bApprox = true ) const; // \ru Пространственная копия линии v = const. \en Spatial copy of 'v = const'-line. virtual MbCurve3D * CurveV( double u, MbRect1D * pRgn, bool bApprox = true ) const; // \ru Пространственная копия линии u = const. \en Spatial copy of 'u = const'-line. @@ -420,20 +420,20 @@ public: \en Get curve with 'ind' index from first family. \n \~ \param[in] ind - \ru Номер запрашиваемой кривой в массиве. \en Index of required curve in array. \~ - \return \ru Кривая или c3d_null, если значение ind выходит за диапазон возможных индексов массиве кривых. - \en Curve or c3d_null if value of 'ind' is out of range of possible indices of array of curves. \~ + \return \ru Кривая или NULL, если значение ind выходит за диапазон возможных индексов массиве кривых. + \en Curve or NULL if value of 'ind' is out of range of possible indices of array of curves. \~ */ - const MbCurve3D * GetUCurve( size_t ind ) const { return ( ind < uCurves.Count()) ? uCurves[ind] : c3d_null; } + const MbCurve3D * GetUCurve( size_t ind ) const { return ( ind < uCurves.Count()) ? uCurves[ind] : NULL; } /** \brief \ru Получить кривую с индексом ind из второго семейства. \en Get curve with 'ind' index from second family. \~ \details \ru Получить кривую с индексом ind из второго семейства. \n \en Get curve with 'ind' index from second family. \n \~ \param[in] ind - \ru Номер запрашиваемой кривой в массиве. \en Index of required curve in array. \~ - \return \ru Кривая или c3d_null, если значение ind выходит за диапазон возможных индексов массиве кривых. - \en Curve or c3d_null if value of 'ind' is out of range of possible indices of array of curves. \~ + \return \ru Кривая или NULL, если значение ind выходит за диапазон возможных индексов массиве кривых. + \en Curve or NULL if value of 'ind' is out of range of possible indices of array of curves. \~ */ - const MbCurve3D * GetVCurve( size_t ind ) const { return ( ind < vCurves.Count()) ? vCurves[ind] : c3d_null; } + const MbCurve3D * GetVCurve( size_t ind ) const { return ( ind < vCurves.Count()) ? vCurves[ind] : NULL; } /** \brief \ru Получить значение параметра, соответствующего кривой с индексом ind из первого семейства. \en Get value of parameter corresponding to curve with 'ind' index from first family. \~ \details \ru Получить значение параметра, соответствующего кривой с индексом ind из первого семейства.\n @@ -522,7 +522,7 @@ private: void PointOn( double & u, double & v, MbCartPoint3D & p, MbMeshSurfaceAuxiliaryData * ) const; // \ru Точка на поверхности \en Point on the surface // \ru Определить местные координаты области поверхности. \en Determine local coordinates of surface region. - void LocalCoordinate( double u, double v, double & ul, double & vl, size_t & i0,size_t & j0,size_t & i1, size_t & j1, MbMeshSurfaceAuxiliaryData * ucache = c3d_null ) const; + void LocalCoordinate( double u, double v, double & ul, double & vl, size_t & i0,size_t & j0,size_t & i1, size_t & j1, MbMeshSurfaceAuxiliaryData * ucache = NULL ) const; void LocalCoordinate_v2( double u, double v, double & ul, double & vl, size_t & i0, size_t & j0, size_t & i1, size_t & j1, size_t ord, MbMeshSurfaceAuxiliaryData * ucache ) const; // \ru Вычислить вспомогательные вектора производных вдоль U кривых патча. \en Calculate auxiliary vectors of derivatives along U curves of patch. void CalculateAlongU( const double & ul, const size_t & j0, const size_t & j1, MbMeshSurfaceAuxiliaryData * ucache ) const; @@ -675,7 +675,7 @@ private: void GeneratrixCurveExplore_v3( bool dirU, size_t ind, double t, MbCartPoint3D & p, MbVector3D & fir, MbVector3D & sec, MbVector3D & thir ) const; // \ru Инициализировать массивы расширения. \en Init expansion arrays. - void InitExtArrays( const bool (*adjPatch)[4] = c3d_null ); + void InitExtArrays( const bool (*adjPatch)[4] = NULL ); /** \} */ diff --git a/C3d/Include/surf_offset_surface.h b/C3d/Include/surf_offset_surface.h index 831f2de..b784f34 100644 --- a/C3d/Include/surf_offset_surface.h +++ b/C3d/Include/surf_offset_surface.h @@ -44,7 +44,7 @@ class MATH_CLASS MbSurfaceContiguousData; // --- class MATH_CLASS MbOffsetSurface : public MbSurface { private: - MbSurface * basisSurface; ///< \ru Базовая поверхность (всегда не c3d_null). \en Base surface (always not c3d_null). + MbSurface * basisSurface; ///< \ru Базовая поверхность (всегда не NULL). \en Base surface (always not NULL). double u0min; ///< \ru Минимальный параметр u базовой поверхности. \en Minimal parameter u of the base surface. double u0max; ///< \ru Максимальный параметр u базовой поверхности. \en Maximal parameter u of the base surface. double v0min; ///< \ru Минимальный параметр v базовой поверхности. \en Minimal parameter v of the base surface. @@ -197,14 +197,14 @@ public: \en \name Common functions of a geometric object \{ */ virtual MbeSpaceType IsA() const; // \ru Тип элемента. \en A type of element. - virtual MbSpaceItem & Duplicate( MbRegDuplicate * = c3d_null ) const; // \ru Сделать копию элемента. \en Create a copy of the element. + virtual MbSpaceItem & Duplicate( MbRegDuplicate * = NULL ) const; // \ru Сделать копию элемента. \en Create a copy of the element. virtual bool IsSame ( const MbSpaceItem & other, double accuracy = LENGTH_EPSILON ) const; // \ru Является ли объект копией. \en Whether the object is a copy. virtual bool SetEqual ( const MbSpaceItem & ); // \ru Сделать равным. \en Make equal. virtual bool IsSimilar( const MbSpaceItem & ) const; // \ru Являются ли объекты подобными. \en Determine whether the objects are similar. - virtual bool IsPlanar( double accuracy = METRIC_EPSILON ) const; // \ru Является ли поверхность плоской. \en Whether the surface is planar. - virtual void Transform( const MbMatrix3D &, MbRegTransform * = c3d_null ); // \ru Преобразовать элемент согласно матрице. \en Transform element according to the matrix. - virtual void Move ( const MbVector3D &, MbRegTransform * = c3d_null ); // \ru Сдвиг. \en Move. - virtual void Rotate ( const MbAxis3D &, double angle, MbRegTransform * = c3d_null ); // \ru Повернуть вокруг оси. \en Rotate around an axis. + virtual bool IsPlanar() const; // \ru Является ли поверхность плоской. \en Whether the surface is planar. + virtual void Transform( const MbMatrix3D &, MbRegTransform * = NULL ); // \ru Преобразовать элемент согласно матрице. \en Transform element according to the matrix. + virtual void Move ( const MbVector3D &, MbRegTransform * = NULL ); // \ru Сдвиг. \en Move. + virtual void Rotate ( const MbAxis3D &, double angle, MbRegTransform * = NULL ); // \ru Повернуть вокруг оси. \en Rotate around an axis. virtual void Refresh(); // \ru Сбросить все временные данные \en Flush all the temporary data virtual void GetProperties( MbProperties & properties ); // \ru Выдать свойства объекта. \en Get properties of the object. @@ -303,7 +303,7 @@ public: virtual double CurvatureU ( double u, double v ) const; // \ru Kривизна линии u. \en Curvature of u-line. virtual double CurvatureV ( double u, double v ) const; // \ru Kривизна линии v. \en Curvature of v-line. // \ru Ближайшая проекция точки на поверхность. \en The nearest point projection onto the surface. - virtual bool NearPointProjection( const MbCartPoint3D & p, double & u, double & v, bool ext, MbRect2D * uvRange = c3d_null ) const; + virtual bool NearPointProjection( const MbCartPoint3D & p, double & u, double & v, bool ext, MbRect2D * uvRange = NULL ) const; // \ru Изменение носителя. \en Changing of carrier. virtual void ChangeCarrier( const MbSpaceItem & item, MbSpaceItem & init ); // \ru Изменение носимых элементов. \en Change a carrier elements. @@ -338,7 +338,7 @@ public: virtual bool IsLineV () const; // \ru Если true все производные по V выше первой равны нулю. \en If true, then all the derivatives by V higher the first one are equal to zero. // \ru Найти все проекции точки на поверхность вдоль вектора в любом из двух направлений. \en Find all a point projection onto the surface along a vector in either of two directions. - virtual void DirectPointProjection( const MbCartPoint3D & pnt, const MbVector3D & vect, SArray & uv, bool ext, MbRect2D * uvRange = c3d_null ) const; + virtual void DirectPointProjection( const MbCartPoint3D & pnt, const MbVector3D & vect, SArray & uv, bool ext, MbRect2D * uvRange = NULL ) const; /** \brief \ru Проверить параметры. Аналог глобальной функции _CheckParams, оптимизированный под использование кэшей. \en Check parameters. Analogue of the global function _CheckParams, optimized for caches usage. \~ diff --git a/C3d/Include/surf_plane.h b/C3d/Include/surf_plane.h index a9a6973..e8642bb 100644 --- a/C3d/Include/surf_plane.h +++ b/C3d/Include/surf_plane.h @@ -209,8 +209,8 @@ public: \en \name Common functions of a geometric object \{ */ virtual MbeSpaceType IsA() const; // \ru Тип элемента. \en A type of element. - virtual MbSpaceItem & Duplicate( MbRegDuplicate * = c3d_null ) const ; // \ru Сделать копию элемента. \en Create a copy of the element. - virtual void Transform( const MbMatrix3D &, MbRegTransform * = c3d_null ); // \ru Преобразовать элемент согласно матрице. \en Transform element according to the matrix. + virtual MbSpaceItem & Duplicate( MbRegDuplicate * = NULL ) const ; // \ru Сделать копию элемента. \en Create a copy of the element. + virtual void Transform( const MbMatrix3D &, MbRegTransform * = NULL ); // \ru Преобразовать элемент согласно матрице. \en Transform element according to the matrix. virtual bool IsSame ( const MbSpaceItem & other, double accuracy = LENGTH_EPSILON ) const; // \ru Равны ли объекты. \en Whether the objects are equal. virtual bool SetEqual ( const MbSpaceItem & ); // \ru Сделать равными. \en Make equal. @@ -304,7 +304,7 @@ public: virtual double CurvatureU ( double u, double v ) const; // \ru Кривизна линии u. \en Curvature of the line u. virtual double CurvatureV ( double u, double v ) const; // \ru Кривизна линии v. \en Curvature of the line v. - virtual bool IsPlanar( double accuracy = METRIC_EPSILON ) const; // \ru Является ли поверхность плоской \en Whether a surface is planar. + virtual bool IsPlanar() const; // \ru Является ли поверхность плоской \en Whether a surface is planar. virtual MbSplineSurface * NurbsSurface( double u1, double u2, double v1, double v2, bool bmatch = false ) const; // \ru NURBS копия поверхности \en NURBS copy of surface. virtual MbSurface * NurbsSurface( const MbNurbsParameters & uParam, const MbNurbsParameters & vParam ) const; @@ -322,10 +322,10 @@ public: virtual MbeItemLocation PointRelative ( const MbCartPoint3D & pnt, double eps = ANGLE_REGION ) const; virtual double DistanceToPoint( const MbCartPoint3D & ) const; // \ru Вычислить расстояние до точки. \en Calculate the distance to a point. // \ru Найти все проекции точки на поверхность вдоль вектора в любом из двух направлений. \en Find all a point projection onto the surface along a vector in either of two directions. - virtual void DirectPointProjection( const MbCartPoint3D & p, const MbVector3D & v, SArray & uv, bool ext, MbRect2D * uvRange = c3d_null ) const; + virtual void DirectPointProjection( const MbCartPoint3D & p, const MbVector3D & v, SArray & uv, bool ext, MbRect2D * uvRange = NULL ) const; // \ru Ближайшая проекция точки на поверхность в направлении вектора. \en The nearest projection of a point to the surface in direction of the vector. virtual bool NearDirectPointProjection( const MbCartPoint3D & p, const MbVector3D & vector, - double & u, double & v, bool ext, MbRect2D * uvRange = c3d_null, bool onlyPositiveDirection = false ) const; + double & u, double & v, bool ext, MbRect2D * uvRange = NULL, bool onlyPositiveDirection = false ) const; // \ru Пересечения с кривой. \en Intersection with a curve. virtual MbeNewtonResult CurveIntersectNewton( const MbCurve3D &, double funcEpsilon, size_t limit, double & u, double & v, double & t, bool ext0, bool ext ) const; // \ru Нахождениe точки пересечения c кривой. \en Search of a point of intersection with curve. @@ -371,7 +371,7 @@ public: /** \ru \name Функции элементарных поверхностей \en \name Functions of elementary surfaces. \{ */ - virtual bool GetPointProjection( const MbCartPoint3D & p, bool init, double & u, double & v, bool ext, MbRect2D * uvRange = c3d_null ) const; + virtual bool GetPointProjection( const MbCartPoint3D & p, bool init, double & u, double & v, bool ext, MbRect2D * uvRange = NULL ) const; /** \} */ /** \ru \name Функции плоскости \en \name Functions of plane. @@ -418,7 +418,7 @@ public: /// \ru Матрица для преобразования симметрии относительно плоскости. \en The matrix of symmetry transformation relative to the plane void Symmetry ( MbMatrix3D & m ) const { position.Symmetry(m); } /// \ru Инвертировать нормаль плоскости. \en Invert the normal of plane. - void Invert( MbMatrix * = c3d_null, MbRegTransform * ireg = c3d_null ); + void Invert( MbMatrix * = NULL, MbRegTransform * ireg = NULL ); /// \ru Сделать систему координат правой. \en Make the coordinate system right. void SetRightPlacement() { position.SetRight(); SetDirtyGabarit(); } diff --git a/C3d/Include/surf_polysurface.h b/C3d/Include/surf_polysurface.h index 59bc181..01da7de 100644 --- a/C3d/Include/surf_polysurface.h +++ b/C3d/Include/surf_polysurface.h @@ -84,12 +84,12 @@ public: \{ */ virtual MbeSpaceType IsA() const = 0; // \ru Тип элемента \en Type of element virtual MbeSpaceType Type() const; // \ru Тип элемента \en Type of element - virtual MbSpaceItem & Duplicate( MbRegDuplicate * = c3d_null ) const = 0; // \ru Cделать копию элемента \en Make a copy of an element. + virtual MbSpaceItem & Duplicate( MbRegDuplicate * = NULL ) const = 0; // \ru Cделать копию элемента \en Make a copy of an element. virtual bool IsSame ( const MbSpaceItem & other, double accuracy = LENGTH_EPSILON ) const = 0; // \ru Являются ли объекты равными \en Determine whether objects are equal virtual bool SetEqual ( const MbSpaceItem & ) = 0; // \ru Сделать равным \en Make equal - virtual void Transform( const MbMatrix3D &, MbRegTransform * = c3d_null ); // \ru Преобразовать элемент согласно матрице \en Transform element according to the matrix - virtual void Move ( const MbVector3D &, MbRegTransform * = c3d_null ); // \ru Сдвиг \en Translation - virtual void Rotate ( const MbAxis3D &, double angle, MbRegTransform * = c3d_null ); // \ru Повернуть вокруг оси \en Rotate about an axis + virtual void Transform( const MbMatrix3D &, MbRegTransform * = NULL ); // \ru Преобразовать элемент согласно матрице \en Transform element according to the matrix + virtual void Move ( const MbVector3D &, MbRegTransform * = NULL ); // \ru Сдвиг \en Translation + virtual void Rotate ( const MbAxis3D &, double angle, MbRegTransform * = NULL ); // \ru Повернуть вокруг оси \en Rotate about an axis virtual void GetProperties( MbProperties & ) = 0; // \ru Выдать свойства объекта \en Get properties of the object virtual void SetProperties( const MbProperties & ) = 0; // \ru Записать свойства объекта \en Set properties of the object diff --git a/C3d/Include/surf_revolution_surface.h b/C3d/Include/surf_revolution_surface.h index 8b5b3d5..e43466d 100644 --- a/C3d/Include/surf_revolution_surface.h +++ b/C3d/Include/surf_revolution_surface.h @@ -137,13 +137,13 @@ public: \en \name Common functions of a geometric object \{ */ virtual MbeSpaceType IsA() const; // \ru Тип элемента. \en A type of element. - virtual MbSpaceItem & Duplicate( MbRegDuplicate * = c3d_null ) const; // \ru Сделать копию элемента. \en Create a copy of the element. + virtual MbSpaceItem & Duplicate( MbRegDuplicate * = NULL ) const; // \ru Сделать копию элемента. \en Create a copy of the element. virtual bool IsSame ( const MbSpaceItem & other, double accuracy = LENGTH_EPSILON ) const; // \ru Равны ли объекты. \en Whether the objects are equal. virtual bool SetEqual ( const MbSpaceItem & ); // \ru Сделать равным. \en Make equal. virtual bool IsSimilar( const MbSpaceItem & ) const; // \ru Являются ли объекты подобными. \en Determine whether the objects are similar. - virtual void Transform( const MbMatrix3D &, MbRegTransform * = c3d_null ); // \ru Преобразовать элемент согласно матрице. \en Transform element according to the matrix. - virtual void Move ( const MbVector3D &, MbRegTransform * = c3d_null ); // \ru Сдвиг. \en Translation. - virtual void Rotate ( const MbAxis3D &, double angle, MbRegTransform * = c3d_null ); // \ru Повернуть вокруг оси. \en Rotate around an axis. + virtual void Transform( const MbMatrix3D &, MbRegTransform * = NULL ); // \ru Преобразовать элемент согласно матрице. \en Transform element according to the matrix. + virtual void Move ( const MbVector3D &, MbRegTransform * = NULL ); // \ru Сдвиг. \en Translation. + virtual void Rotate ( const MbAxis3D &, double angle, MbRegTransform * = NULL ); // \ru Повернуть вокруг оси. \en Rotate around an axis. virtual void GetProperties( MbProperties & properties ); // \ru Выдать свойства объекта. \en Get properties of the object. virtual void SetProperties( const MbProperties & properties ); // \ru Записать свойства объекта. \en Set properties of the object. @@ -241,9 +241,9 @@ public: virtual MbCurve3D * CurveV( double u, MbRect1D * pRgn, bool bApprox = true ) const; // \ru Пространственная копия линии u = const \en A spatial copy of the line u = const. // \ru Ближайшая проекция точки на поверхность. \en The nearest point projection on the surface. - virtual bool NearPointProjection( const MbCartPoint3D & p, double & u, double & v, bool ext, MbRect2D * uvRange = c3d_null ) const; // \ru Ближайшая проекция точки на поверхность. \en The nearest point projection on the surface. + virtual bool NearPointProjection( const MbCartPoint3D & p, double & u, double & v, bool ext, MbRect2D * uvRange = NULL ) const; // \ru Ближайшая проекция точки на поверхность. \en The nearest point projection on the surface. // \ru Найти все проекции точки на поверхность вдоль вектора в любом из двух направлений. \en Find all a point projection onto the surface along a vector in either of two directions. - virtual void DirectPointProjection( const MbCartPoint3D & p, const MbVector3D & vect, SArray & uv, bool ext, MbRect2D * uvRange = c3d_null ) const; + virtual void DirectPointProjection( const MbCartPoint3D & p, const MbVector3D & vect, SArray & uv, bool ext, MbRect2D * uvRange = NULL ) const; // \ru Подобные ли поверхности для объединения (слива). \en Whether the surfaces are similar to merge. virtual bool IsSimilarToSurface( const MbSurface & surf, VERSION version, double precision = METRIC_PRECISION ) const; diff --git a/C3d/Include/surf_ruled_surface.h b/C3d/Include/surf_ruled_surface.h index 510a95c..1548bda 100644 --- a/C3d/Include/surf_ruled_surface.h +++ b/C3d/Include/surf_ruled_surface.h @@ -115,13 +115,13 @@ public: \en \name Common functions of a geometric object \{ */ virtual MbeSpaceType IsA() const; // \ru Тип элемента. \en A type of element. - virtual MbSpaceItem & Duplicate( MbRegDuplicate * = c3d_null ) const; // \ru Сделать копию элемента. \en Create a copy of the element. + virtual MbSpaceItem & Duplicate( MbRegDuplicate * = NULL ) const; // \ru Сделать копию элемента. \en Create a copy of the element. virtual bool IsSame ( const MbSpaceItem & other, double accuracy = LENGTH_EPSILON ) const; // \ru Равны ли объекты. \en Whether the objects are equal. virtual bool SetEqual ( const MbSpaceItem & ); // \ru Сделать равным. \en Make equal. virtual bool IsSimilar( const MbSpaceItem & ) const; // \ru Являются ли объекты подобными. \en Determine whether the objects are similar. - virtual void Transform( const MbMatrix3D &, MbRegTransform * = c3d_null ); // \ru Преобразовать элемент согласно матрице. \en Transform element according to the matrix. - virtual void Move ( const MbVector3D &, MbRegTransform * = c3d_null ); // \ru Сдвиг. \en Move. - virtual void Rotate ( const MbAxis3D &, double angle, MbRegTransform * = c3d_null ); // \ru Повернуть вокруг оси. \en Rotate around an axis. + virtual void Transform( const MbMatrix3D &, MbRegTransform * = NULL ); // \ru Преобразовать элемент согласно матрице. \en Transform element according to the matrix. + virtual void Move ( const MbVector3D &, MbRegTransform * = NULL ); // \ru Сдвиг. \en Move. + virtual void Rotate ( const MbAxis3D &, double angle, MbRegTransform * = NULL ); // \ru Повернуть вокруг оси. \en Rotate around an axis. virtual void GetProperties( MbProperties &properties ); // \ru Выдать свойства объекта. \en Get properties of the object. virtual void SetProperties( const MbProperties &properties ); // \ru Записать свойства объекта. \en Set properties of the object. @@ -205,7 +205,7 @@ public: \{ */ virtual double CurvatureU ( double u, double v ) const; // \ru Kривизна линии по u. \en Curvature of line by u. virtual double CurvatureV ( double u, double v ) const; // \ru Kривизна линии v. \en Curvature of v-line. - virtual bool IsPlanar( double accuracy = METRIC_EPSILON ) const; // \ru Является ли поверхность плоской. \en Whether the surface is planar. + virtual bool IsPlanar() const; // \ru Является ли поверхность плоской. \en Whether the surface is planar. virtual size_t GetUMeshCount() const; // \ru Выдать количество полигонов по u. \en Get the count of polygons by u. virtual size_t GetVMeshCount() const; // \ru Выдать количество полигонов по v. \en Get the count of polygons by v. @@ -213,7 +213,7 @@ public: virtual void ChangeCarrier( const MbSpaceItem & item, MbSpaceItem & init ); // \ru Изменение носителя. \en Changing of carrier. // \ru Ближайшая проекция точки на поверхность. \en The nearest point projection onto the surface. - virtual bool NearPointProjection( const MbCartPoint3D & p, double & u, double & v, bool ext, MbRect2D * uvRange = c3d_null ) const; + virtual bool NearPointProjection( const MbCartPoint3D & p, double & u, double & v, bool ext, MbRect2D * uvRange = NULL ) const; // \ru Пересечение с кривой. \en Intersection with curve. virtual void CurveIntersection( const MbCurve3D & curv, SArray & uv, SArray & tt, diff --git a/C3d/Include/surf_section_surface.h b/C3d/Include/surf_section_surface.h index a52343d..2aa4992 100644 --- a/C3d/Include/surf_section_surface.h +++ b/C3d/Include/surf_section_surface.h @@ -51,13 +51,15 @@ class MATH_CLASS MbSurfaceWorkingData; // --- class MATH_CLASS MbSectionSurface : public MbSurface { +public: + protected: MbSpine * spine; ///< \ru Опорная кривая. \en The reference curve. - MbCurve3D * guide1; ///< \ru Первая направляющая кривая (может быть c3d_null). \en The first guide curve (may be c3d_null). - MbCurve3D * guide2; ///< \ru Вторая направляющая кривая (может быть c3d_null). \en The second guide curve (may be c3d_null). - std::vector curves; ///< \ru Дополнительные контрольные кривые (могут отсутствовать). \en The additional control curves (may be empty). - MbFunction * function; ///< \ru Функция управления сечением (радиус или дискриминант, может быть c3d_null)). \en Section control function (radius or discriminant, may be c3d_null). - MbPolyCurve * pattern; ///< \ru Образующая кривая при form==cs_Shape (для других форм c3d_null). \en Forming curve for form==cs_Shape (c3d_null on other case). + MbCurve3D * guide1; ///< \ru Первая направляющая кривая на первой поверхности (может быть NULL). \en The first guide curve on the first surface (may be NULL). + MbCurve3D * guide2; ///< \ru Вторая направляющая кривая на второй поверхности (может быть NULL). \en The second guide curve on the second surface (may be NULL). + std::vector curves; ///< \ru Дополнительные направляющие кривые (могут отсутствовать). \en The additional guide curves (may be empty). + MbFunction * function; ///< \ru Функция управления сечением (радиус или дискриминант, может быть NULL)). \en Section control function (radius or discriminant, may be NULL). + MbPolyCurve * pattern; ///< \ru Образующая кривая при form==cs_Shape (для других форм NULL). \en Forming curve for form==cs_Shape (NULL on other case). std::vector shape; ///< \ru Описание сечения при form==cs_Shape (пуст в других случаях). \en Description of shape cross-section for form==cs_Shape (is empty on other case). std::vector knots; ///< \ru Узловой вектор сплайна. \en Knot vector of the spline. size_t order; ///< \ru Порядок сплайна (степень + 1). \en Order of spline (degree + 1). @@ -160,6 +162,8 @@ protected: \en Section radius function. \~ */ MbSectionSurface( MbSpine & sp, MbCurve3D & c0, MbeSectionShape f, double uBeg, double uEnd, MbFunction & func ); + +protected: // \ru Конструктор-копия. \en Copy constructor. MbSectionSurface( const MbSectionSurface &, MbRegDuplicate * ); private: @@ -181,8 +185,8 @@ public: \en The first guide curve. \~ \param[in] g2 - \ru Вторая направляющая кривая (g1==g2 совпадает с первой при cs_Round). \en The second guide curve (g1==g2 the same first guide for st_Round). \~ - \param[in] c0 - \ru Дополнительная направляющая кривая (может быть c3d_null). - \en The additional guide curve (may be c3d_null). \~ + \param[in] c0 - \ru Дополнительная направляющая кривая (может быть NULL). + \en The additional guide curve (may be NULL). \~ \param[in] f - \ru Форма сечения поверхности. \en The form of the surface section. \~ \param[in] sense - \ru Направление нормали поверхности направляющей кривой (для guide1==guide2). @@ -224,13 +228,13 @@ public: \{ */ virtual MbeSpaceType IsA() const; // \ru Тип элемента \en A type of element - virtual MbSpaceItem & Duplicate( MbRegDuplicate * = c3d_null ) const; // \ru Сделать копию элемента. \en Create a copy of the element. + virtual MbSpaceItem & Duplicate( MbRegDuplicate * = NULL ) const; // \ru Сделать копию элемента. \en Create a copy of the element. virtual bool IsSame ( const MbSpaceItem & other, double accuracy = LENGTH_EPSILON ) const; // \ru Равны ли объекты. \en Whether the objects are equal. virtual bool SetEqual ( const MbSpaceItem & ); // \ru Сделать равным. \en Make equal. virtual bool IsSimilar ( const MbSpaceItem & ) const; // \ru Являются ли объекты подобными. \en Determine whether the objects are similar. - virtual void Transform( const MbMatrix3D &, MbRegTransform * = c3d_null ); // \ru Преобразовать элемент согласно матрице. \en Transform element according to the matrix. - virtual void Move ( const MbVector3D &, MbRegTransform * = c3d_null ); // \ru Сдвиг. \en Move. - virtual void Rotate ( const MbAxis3D &, double angle, MbRegTransform * = c3d_null ); // \ru Повернуть вокруг оси. \en Rotate around an axis. + virtual void Transform( const MbMatrix3D &, MbRegTransform * = NULL ); // \ru Преобразовать элемент согласно матрице. \en Transform element according to the matrix. + virtual void Move ( const MbVector3D &, MbRegTransform * = NULL ); // \ru Сдвиг. \en Move. + virtual void Rotate ( const MbAxis3D &, double angle, MbRegTransform * = NULL ); // \ru Повернуть вокруг оси. \en Rotate around an axis. virtual void GetProperties( MbProperties & ); // \ru Выдать свойства объекта. \en Get properties of the object. virtual void SetProperties( const MbProperties & ); // \ru Записать свойства объекта. \en Set properties of the object. @@ -317,7 +321,7 @@ public: \{ */ virtual double CurvatureU ( double u, double v ) const; // \ru Kривизна линии по u. \en Curvature of line by u. - virtual bool IsPlanar( double accuracy = METRIC_EPSILON ) const; // \ru Является ли поверхность плоской. \en Whether the surface is planar. + virtual bool IsPlanar() const; // \ru Является ли поверхность плоской. \en Whether the surface is planar. virtual void ChangeCarrier( const MbSpaceItem & item, MbSpaceItem & init ); // \ru Изменение носителя. \en Changing of carrier. @@ -363,31 +367,31 @@ public: const MbSpine & GetSpine() const { return *spine; } /// \ru Направляющая кривая. \en The spine (reference) curve. const MbCurve3D & GetSpineCurve() const { return spine->GetCurve(); } - /// \ru Первая направляющая кривая на первой поверхности (может быть c3d_null). \en The first guide curve on the first surface (may be c3d_null). + /// \ru Первая направляющая кривая на первой поверхности (может быть NULL). \en The first guide curve on the first surface (may be NULL). const MbCurve3D * GetGuide1() const { return guide1; } - /// \ru Вторая направляющая кривая на второй поверхности (может быть c3d_null). \en The second guide curve on the second surface (may be c3d_null). + /// \ru Вторая направляющая кривая на второй поверхности (может быть NULL). \en The second guide curve on the second surface (may be NULL). const MbCurve3D * GetGuide2() const { return guide2; } /// \ru Дополнительные направляющие кривые (могут отсутствовать). \en The additional guide curves (may be empty). - const MbCurve3D * GetCurve( size_t i ) const { return ( i < curves.size() ) ? curves[i] : c3d_null; } - /// \ru Функция управления сечением (радиус или дискриминант, может быть c3d_null)). \en Section control function (radius or discriminant, may be c3d_null). + const MbCurve3D * GetCurve( size_t i ) const { return ( i < curves.size() ) ? curves[i] : NULL; } + /// \ru Функция управления сечением (радиус или дискриминант, может быть NULL)). \en Section control function (radius or discriminant, may be NULL). const MbFunction * GetFunction() const { return function; } - /// \ru Образующая кривая при form==cs_Shape (для других форм c3d_null). \en Forming curve for form==cs_Shape (c3d_null on other case). + /// \ru Образующая кривая при form==cs_Shape (для других форм NULL). \en Forming curve for form==cs_Shape (NULL on other case). const MbPolyCurve * GetPattern() const { return pattern; } - /// \ru Вычисление параметров направляющих кривых по второму параметру поверхности. \en Calculating the parameters of guide curves by the second surface parameter. - bool GuideParams( double v, double & t1, double & t2 ) const; - /// \ru Вычисление параметра вершинной кривой по второму параметру поверхности. \en Calculating the parameter of apex curve by the second surface parameter. - bool ApexParam( double v, double & t0 ) const; - /// \ru Вычисление точки поверхности по параметру направляющей кривой. \en Calculating the surface point by the parameter of first the guide curves. - bool ParamByGuide1( double t1, MbCartPoint & p ) const; - /// \ru Вычисление точки поверхности по параметру направляющей кривой. \en Calculating the surface point by the parameter of the second guide curves. - bool ParamByGuide2( double t2, MbCartPoint & p ) const; - /// \ru Вычисление второго параметра поверхности по параметру вершинной кривой. \en Calculating the second surface parameter by the parameter of the apex curve. - bool ParamByApex( double t0, double & v ) const; - /// \ru Вычисление точек поверхности по параметрам первой направляющей кривой. \en Calculating surface points by the first guide curve. - bool PointsByGuide1( std::vector & points ) const; - /// \ru Вычисление точек поверхности по параметрам второй направляющей кривой. \en Calculating surface points by the second guide curve. - bool PointsByGuide2( std::vector & points ) const; + /// \ru Вычисление параметров направляющих кривых по второму параметру поверхности. \en Calculating the parameters of guide curves by the second surface parameter. + bool GuideParams( double v, double & t1, double & t2 ) const; + /// \ru Вычисление параметра вершинной кривой по второму параметру поверхности. \en Calculating the parameter of apex curve by the second surface parameter. + bool ApexParam( double v, double & t0 ) const; + /// \ru Вычисление точки поверхности по параметру направляющей кривой. \en Calculating the surface point by the parameter of first the guide curves. + bool ParamByGuide1( double t1, MbCartPoint & p ) const; + /// \ru Вычисление точки поверхности по параметру направляющей кривой. \en Calculating the surface point by the parameter of the second guide curves. + bool ParamByGuide2( double t2, MbCartPoint & p ) const; + /// \ru Вычисление второго параметра поверхности по параметру вершинной кривой. \en Calculating the second surface parameter by the parameter of the apex curve. + bool ParamByApex( double t0, double & v ) const; + /// \ru Вычисление точек поверхности по параметрам первой направляющей кривой. \en Calculating surface points by the first guide curve. + bool PointsByGuide1( std::vector & points ) const; + /// \ru Вычисление точек поверхности по параметрам второй направляющей кривой. \en Calculating surface points by the second guide curve. + bool PointsByGuide2( std::vector & points ) const; /** \} */ @@ -445,16 +449,16 @@ protected : void DeriveUUV( double & u, double & v, bool ext, MbVector3D & ) const; // \ru Третья производная по uuv. \en The third derivative with respect to uuv. void DeriveUVV( double & u, double & v, bool ext, MbVector3D & ) const; // \ru Третья производная по uvv. \en The third derivative with respect to uvv. void DeriveVVV( double & u, double & v, bool ext, MbVector3D & ) const; // \ru Третья производная по vvv. \en The third derivative with respect to vvv. - // \ru Вычисление точек для создания NURBS копии кривых поверхности. \en Points calculation for NURBS copy surface. - bool CollectNurbsPoints( double vin, double vax, size_t pCount, double angle, - SArray & params, - SArray & points1, - SArray & points2, - SArray & points_0, - SArray & points_1, - SArray & points_2, - SArray & points_3, - SArray & points_4 ) const; + // \ru Вычисление точек для создания NURBS копии кривых поверхности. \en Points calculation for NURBS copy surface. + bool CollectNurbsPoints( double vin, double vax, size_t pCount, double angle, + SArray & params, + SArray & points1, + SArray & points2, + SArray & points_0, + SArray & points_1, + SArray & points_2, + SArray & points_3, + SArray & points_4 ) const; private: void operator = ( const MbSectionSurface & ); // \ru Не реализовано. \en Not implemented. diff --git a/C3d/Include/surf_sector_surface.h b/C3d/Include/surf_sector_surface.h index c8902ac..a560b7a 100644 --- a/C3d/Include/surf_sector_surface.h +++ b/C3d/Include/surf_sector_surface.h @@ -66,13 +66,13 @@ public: \en \name Common functions of a geometric object \{ */ virtual MbeSpaceType IsA() const; // \ru Тип элемента. \en A type of element. - virtual MbSpaceItem & Duplicate( MbRegDuplicate * = c3d_null ) const; // \ru Cделать копию элемента. \en Make a copy of an element. + virtual MbSpaceItem & Duplicate( MbRegDuplicate * = NULL ) const; // \ru Cделать копию элемента. \en Make a copy of an element. virtual bool IsSame ( const MbSpaceItem & other, double accuracy = LENGTH_EPSILON ) const; // \ru Являются ли объекты равными. \en Determine whether objects are equal. virtual bool SetEqual ( const MbSpaceItem & ); // \ru Сделать равным. \en Make equal. virtual bool IsSimilar( const MbSpaceItem & ) const; // \ru Являются ли объекты подобными. \en Determine whether the objects are similar. - virtual void Transform( const MbMatrix3D &, MbRegTransform * = c3d_null ); // \ru Преобразовать. \en Transform. - virtual void Move ( const MbVector3D &, MbRegTransform * = c3d_null ); // \ru Сдвиг. \en Translation. - virtual void Rotate ( const MbAxis3D &, double angle, MbRegTransform * = c3d_null ); // \ru Повернуть вокруг оси. \en Rotate around an axis. + virtual void Transform( const MbMatrix3D &, MbRegTransform * = NULL ); // \ru Преобразовать. \en Transform. + virtual void Move ( const MbVector3D &, MbRegTransform * = NULL ); // \ru Сдвиг. \en Translation. + virtual void Rotate ( const MbAxis3D &, double angle, MbRegTransform * = NULL ); // \ru Повернуть вокруг оси. \en Rotate around an axis. virtual void GetProperties( MbProperties & ); // \ru Выдать свойства объекта. \en Get properties of the object. virtual void SetProperties( const MbProperties & ); // \ru Записать свойства объекта. \en Set properties of the object. @@ -147,7 +147,7 @@ public: \en \name Common functions of surface. \{ */ virtual double CurvatureV ( double u, double v ) const; // \ru Kривизна линии v. \en Curvature of v line. - virtual bool IsPlanar( double accuracy = METRIC_EPSILON ) const; // \ru Является ли поверхность плоской. \en Whether a surface is planar. + virtual bool IsPlanar() const; // \ru Является ли поверхность плоской. \en Whether a surface is planar. virtual void ChangeCarrier( const MbSpaceItem & item, MbSpaceItem & init ); // \ru Изменение носителя. \en Changing of carrier. virtual MbSplineSurface * NurbsSurface( double, double, double, double, bool bmatch = false ) const; // \ru NURBS копия поверхности. \en NURBS copy of surface. diff --git a/C3d/Include/surf_smooth_surface.h b/C3d/Include/surf_smooth_surface.h index d27a783..0fce759 100644 --- a/C3d/Include/surf_smooth_surface.h +++ b/C3d/Include/surf_smooth_surface.h @@ -37,8 +37,8 @@ class MATH_CLASS MbSurfaceIntersectionCurve; // --- class MATH_CLASS MbSmoothSurface : public MbSurface { protected: - MbSurfaceCurve * curve1; ///< \ru Опорная кривая на первой поверхности (всегда не c3d_null). \en Support curve on the first surface (it never equals c3d_null). - MbSurfaceCurve * curve2; ///< \ru Опорная кривая на второй поверхности (всегда не c3d_null). \en Support curve on the second surface (it never equals c3d_null). + MbSurfaceCurve * curve1; ///< \ru Опорная кривая на первой поверхности (всегда не NULL). \en Support curve on the first surface (it never equals NULL). + MbSurfaceCurve * curve2; ///< \ru Опорная кривая на второй поверхности (всегда не NULL). \en Support curve on the second surface (it never equals NULL). MbeSmoothForm form; ///< \ru Тип сопряжения. \en Conjugation type. double distance1; ///< \ru Радиус скругления или "катет" фаски со знаком для поверхности кривой curve1. \en Fillet radius or chamfer "cathetus" with sign for surface of curve1 curve. double distance2; ///< \ru Радиус скругления или "катет" фаски со знаком для поверхности кривой curve2. \en Fillet radius or chamfer "cathetus" with sign for surface of curve2 curve. @@ -116,12 +116,12 @@ public: \{ */ virtual MbeSpaceType IsA() const = 0; // \ru Тип элемента. \en A type of element. virtual MbeSpaceType Type() const; // \ru Тип элемента. \en A type of element. - virtual MbSpaceItem & Duplicate( MbRegDuplicate * = c3d_null ) const = 0; // \ru Сделать копию элемента. \en Create a copy of the element. + virtual MbSpaceItem & Duplicate( MbRegDuplicate * = NULL ) const = 0; // \ru Сделать копию элемента. \en Create a copy of the element. virtual bool IsSame ( const MbSpaceItem & other, double accuracy = LENGTH_EPSILON ) const = 0; virtual bool SetEqual ( const MbSpaceItem & ) = 0; // \ru Сделать равным. \en Make equal. - virtual void Transform( const MbMatrix3D &, MbRegTransform * = c3d_null ) = 0; // \ru Преобразовать элемент согласно матрице. \en Transform element according to the matrix. - virtual void Move ( const MbVector3D &, MbRegTransform * = c3d_null ) = 0; // \ru Сдвиг. \en Translation. - virtual void Rotate ( const MbAxis3D &, double angle, MbRegTransform * = c3d_null ) = 0; // \ru Повернуть вокруг оси. \en Rotate around an axis. + virtual void Transform( const MbMatrix3D &, MbRegTransform * = NULL ) = 0; // \ru Преобразовать элемент согласно матрице. \en Transform element according to the matrix. + virtual void Move ( const MbVector3D &, MbRegTransform * = NULL ) = 0; // \ru Сдвиг. \en Translation. + virtual void Rotate ( const MbAxis3D &, double angle, MbRegTransform * = NULL ) = 0; // \ru Повернуть вокруг оси. \en Rotate around an axis. virtual void GetProperties( MbProperties &properties ) = 0; // \ru Выдать свойства объекта. \en Get properties of the object. virtual void SetProperties( const MbProperties &properties ) = 0; // \ru Записать свойства объекта. \en Set properties of the object. @@ -215,8 +215,8 @@ public: \en Add to end (true) or add to start (false) \~ \param[in] matr - \ru Матрица преобразования объектов с init в данную поверхность, \en A matrix of transformation of objects from 'init' to the given surface, \~ - \param[in] seam - \ru Кривая другого разделяющего ребра (может быть c3d_null) - \en A curve of another splitting edge (possibly it is c3d_null) \~ + \param[in] seam - \ru Кривая другого разделяющего ребра (может быть NULL) + \en A curve of another splitting edge (possibly it is NULL) \~ */ virtual bool SurfacesCombine( const MbSurfaceIntersectionCurve & edge, const MbSurface & init, bool add, MbMatrix & matr, diff --git a/C3d/Include/surf_sphere_surface.h b/C3d/Include/surf_sphere_surface.h index cfef8af..9151acb 100644 --- a/C3d/Include/surf_sphere_surface.h +++ b/C3d/Include/surf_sphere_surface.h @@ -109,10 +109,10 @@ public: \en \name Common functions of a geometric object \{ */ virtual MbeSpaceType IsA() const; // \ru Тип элемента. \en A type of element. - virtual MbSpaceItem & Duplicate( MbRegDuplicate * = c3d_null ) const ; // \ru Сделать копию элемента. \en Create a copy of the element. + virtual MbSpaceItem & Duplicate( MbRegDuplicate * = NULL ) const ; // \ru Сделать копию элемента. \en Create a copy of the element. virtual bool IsSame ( const MbSpaceItem & other, double accuracy = LENGTH_EPSILON ) const; // \ru Равны ли объекты. \en Whether the objects are equal. virtual bool SetEqual ( const MbSpaceItem & ); // \ru Сделать равным. \en Make equal. - virtual void Transform( const MbMatrix3D & matr, MbRegTransform * = c3d_null ); // \ru Преобразовать элемент согласно матрице. \en Transform element according to the matrix. + virtual void Transform( const MbMatrix3D & matr, MbRegTransform * = NULL ); // \ru Преобразовать элемент согласно матрице. \en Transform element according to the matrix. virtual void GetProperties( MbProperties & properties ); // \ru Выдать свойства объекта. \en Get properties of the object. virtual void SetProperties( const MbProperties & properties ); // \ru Записать свойства объекта. \en Set properties of the object. @@ -217,7 +217,7 @@ public: virtual MbCurve3D * CurveU( double v, MbRect1D * pRgn, bool bApprox = true ) const; // \ru Пространственная копия линии v = const. \en A spatial copy of the line v = const. virtual MbCurve3D * CurveV( double u, MbRect1D * pRgn, bool bApprox = true ) const; // \ru Пространственная копия линии u = const. \en A spatial copy of the line u = const. // \ru Найти все проекции точки на поверхность вдоль вектора в любом из двух направлений. \en Find all a point projection onto the surface along a vector in either of two directions. - virtual void DirectPointProjection( const MbCartPoint3D & p, const MbVector3D & vect, SArray & uv, bool ext, MbRect2D * uvRange = c3d_null ) const; + virtual void DirectPointProjection( const MbCartPoint3D & p, const MbVector3D & vect, SArray & uv, bool ext, MbRect2D * uvRange = NULL ) const; // \ru Пересечение с кривой. \en Intersection with a curve. virtual void CurveIntersection( const MbCurve3D & curv, SArray & uv, SArray & tt, bool ext0, bool ext, bool touchInclude = false ) const; @@ -269,7 +269,7 @@ public: /** \ru \name Функции элементарных поверхностей \en \name Functions of elementary surfaces. \{ */ - virtual bool GetPointProjection( const MbCartPoint3D & p, bool init, double & u, double & v, bool ext, MbRect2D * uvRange = c3d_null ) const; + virtual bool GetPointProjection( const MbCartPoint3D & p, bool init, double & u, double & v, bool ext, MbRect2D * uvRange = NULL ) const; /** \} */ /** \ru \name Функции конической поверхности \en \name Functions of conical surface diff --git a/C3d/Include/surf_spine.h b/C3d/Include/surf_spine.h index 1f08158..75dadc3 100644 --- a/C3d/Include/surf_spine.h +++ b/C3d/Include/surf_spine.h @@ -55,11 +55,11 @@ public: }; private: - SPtr curve; ///< \ru Направляющая кривая - всегда не c3d_null. \en Spine curve - it is always not c3d_null. + SPtr curve; ///< \ru Направляющая кривая - всегда не NULL. \en Spine curve - it is always not NULL. MbVector3D direction; ///< \ru Вектор ориентации матрицы преобразования. \en Vector of transformation matrix orientation. - SPtr optionalCurve; ///< \ru Кривая вектора ориентации матрицы преобразования (может быть c3d_null для простой траектории). \en A curve of the transformation matrix orientation (it may be c3d_null for a simple trajectory). - SPtr spineSurface; ///< \ru Поверхность направляющей кривой, если "curve" - кривая на поверхности, или c3d_null. \en The surface of the "curve", if it is curve on surface, or c3d_null. - SPtr featureCurve; ///< \ru Двумерная кривая, если "curve" - кривая на поверхности, или c3d_null. \en Two-dimensional curve of the "curve", if it is curve on surface, or c3d_null. + SPtr optionalCurve; ///< \ru Кривая вектора ориентации матрицы преобразования (может быть NULL для простой траектории). \en A curve of the transformation matrix orientation (it may be NULL for a simple trajectory). + SPtr spineSurface; ///< \ru Поверхность направляющей кривой, если "curve" - кривая на поверхности, или NULL. \en The surface of the "curve", if it is curve on surface, or NULL. + SPtr featureCurve; ///< \ru Двумерная кривая, если "curve" - кривая на поверхности, или NULL. \en Two-dimensional curve of the "curve", if it is curve on surface, or NULL. LocalAxes localAxes; ///< \ru Способы ориентации локальной системы координат вдоль направляющей кривой "curve". \en Methods of orientation of the local coordinate system along the guide curve "curve". double crossSize; ///< \ru Поперечный масштаб при построении optionalCurve. \en Transverse scale in construction of "optionalCurve". double ortParam; ///< \ru Параметр кривой, для которой рассчитаны ort0, ort1, ort2. \en Parameter of a curve with evaluated ort0, ort1 and ort2. @@ -253,7 +253,7 @@ public: /// \ru Тип элемента. \en A type of element. MbeSpaceType IsA() const { return curve->IsA(); } /// \ru Сделать копию элемента. \en Create a copy of the element. - MbSpine & Duplicate( MbRegDuplicate * = c3d_null ) const; + MbSpine & Duplicate( MbRegDuplicate * = NULL ) const; /// \ru Сделать равным. \en Make equal. bool SetEqual( const MbSpine & ); /// \ru Являются ли объекты подобными. \en Determine whether the objects are similar. @@ -261,13 +261,13 @@ public: /// \ru Равны ли объекты. \en Whether the objects are equal. bool IsSame ( const MbSpine & other, double accuracy = LENGTH_EPSILON ) const; /// \ru Преобразовать элемент согласно матрице. \en Transform element according to the matrix. - void Transform( const MbMatrix3D &, MbRegTransform * = c3d_null ); + void Transform( const MbMatrix3D &, MbRegTransform * = NULL ); /// \ru Сдвиг. \en Translation. - void Move ( const MbVector3D &, MbRegTransform * = c3d_null ); + void Move ( const MbVector3D &, MbRegTransform * = NULL ); /// \ru Повернуть вокруг оси. \en Rotate around an axis. - void Rotate ( const MbAxis3D &, double angle, MbRegTransform * = c3d_null ); + void Rotate ( const MbAxis3D &, double angle, MbRegTransform * = NULL ); /// \ru Изменить направление. \en Change the direction. - void Inverse( MbRegTransform * iReg = c3d_null ); + void Inverse( MbRegTransform * iReg = NULL ); /// \ru Сбросить временные данные объекта. \en Reset temporary data of an object. void Reset(); /** \} */ @@ -525,8 +525,8 @@ MATH_FUNC (void) MakeSpines( const MbSpine & sp, SArray & items ); Для внутреннего использования. \en Delete unused spines.\n For internal use only. \~ - \param[in,out] spineDataItems - \ru Массив направляющих. - \en An array of spines. \~ + \param[in,out] items - \ru Массив направляющих. + \en An array of spines. \~ */ // --- template void DeleteNonUsedSpines( SpineDataVector & spineDataItems ) diff --git a/C3d/Include/surf_spiral_surface.h b/C3d/Include/surf_spiral_surface.h index 7c849f0..762bc71 100644 --- a/C3d/Include/surf_spiral_surface.h +++ b/C3d/Include/surf_spiral_surface.h @@ -105,13 +105,13 @@ public: \en \name Common functions of a geometric object \{ */ virtual MbeSpaceType IsA() const; // \ru Тип элемента. \en A type of element. - virtual MbSpaceItem & Duplicate( MbRegDuplicate * = c3d_null ) const; // \ru Сделать копию элемента. \en Create a copy of the element. + virtual MbSpaceItem & Duplicate( MbRegDuplicate * = NULL ) const; // \ru Сделать копию элемента. \en Create a copy of the element. virtual bool IsSame ( const MbSpaceItem & other, double accuracy = LENGTH_EPSILON ) const; // \ru Равны ли объекты. \en Whether the objects are equal. virtual bool SetEqual ( const MbSpaceItem & ); // \ru Сделать равным. \en Make equal. virtual bool IsSimilar( const MbSpaceItem & ) const; // \ru Являются ли объекты подобными. \en Determine whether the objects are similar. - virtual void Transform( const MbMatrix3D &, MbRegTransform * = c3d_null ); // \ru Преобразовать элемент согласно матрице. \en Transform element according to the matrix. - virtual void Move ( const MbVector3D &, MbRegTransform * = c3d_null ); // \ru Сдвиг. \en Translation. - virtual void Rotate ( const MbAxis3D &, double angle, MbRegTransform * = c3d_null ); // \ru Повернуть вокруг оси. \en Rotate around an axis. + virtual void Transform( const MbMatrix3D &, MbRegTransform * = NULL ); // \ru Преобразовать элемент согласно матрице. \en Transform element according to the matrix. + virtual void Move ( const MbVector3D &, MbRegTransform * = NULL ); // \ru Сдвиг. \en Translation. + virtual void Rotate ( const MbAxis3D &, double angle, MbRegTransform * = NULL ); // \ru Повернуть вокруг оси. \en Rotate around an axis. virtual void GetProperties( MbProperties & properties ); // \ru Выдать свойства объекта. \en Get properties of the object. virtual void SetProperties( const MbProperties & properties ); // \ru Записать свойства объекта. \en Set properties of the object. @@ -179,7 +179,7 @@ public: \en \name Common functions of surface. \{ */ virtual double CurvatureU ( double u, double v ) const; // \ru Kривизна линии по u. \en Curvature of line in u direction. - virtual bool IsPlanar( double accuracy = METRIC_EPSILON ) const; // \ru Является ли поверхность плоской. \en Whether a surface is planar. + virtual bool IsPlanar() const; // \ru Является ли поверхность плоской. \en Whether a surface is planar. virtual void ChangeCarrier( const MbSpaceItem & item, MbSpaceItem & init ); // \ru Изменение носителя \en Changing of carrier virtual MbSplineSurface * NurbsSurface( double, double, double, double, bool bmatch = false ) const; // \ru NURBS копия поверхности. \en NURBS copy of surface. @@ -189,7 +189,7 @@ public: virtual MbCurve3D * CurveV( double u, MbRect1D * pRgn, bool bApprox = true ) const; // \ru Пространственная копия линии u = const. \en A spatial copy of the line u = const. // \ru Найти проекцию точки на поверхность. \en Find the projection of a point onto the surface. - virtual bool NearPointProjection ( const MbCartPoint3D & pnt, double & u, double & v, bool ext, MbRect2D * uvRange = c3d_null ) const; + virtual bool NearPointProjection ( const MbCartPoint3D & pnt, double & u, double & v, bool ext, MbRect2D * uvRange = NULL ) const; // \ru Построить касательные и нормальные плейсменты конструктивных плоскостей. \en Construct tangent and normal placements of constructive planes. virtual bool CreateNormalPlacements ( const MbVector3D & axisZ, double angle, SArray & places ) const; diff --git a/C3d/Include/surf_spline_surface.h b/C3d/Include/surf_spline_surface.h index 9c37023..3c5190b 100644 --- a/C3d/Include/surf_spline_surface.h +++ b/C3d/Include/surf_spline_surface.h @@ -146,7 +146,7 @@ private: DPtr data; ///< \ru Дополнительные данные о поверхности. \en Additional data about a surface. DPtr wdata; ///< \ru Рабочие данные для расчета поверхности. \en Working data for the calculation of a surface. - double * wc; ///< \ru Рассчитанные в точке (uc,vc) значения весов (может быть c3d_null). \en Weights values calculated in the point (uc, vc) (may be c3d_null). + double * wc; ///< \ru Рассчитанные в точке (uc,vc) значения весов (может быть NULL). \en Weights values calculated in the point (uc, vc) (may be NULL). MbSplineSurfaceAuxiliaryData(); MbSplineSurfaceAuxiliaryData( const MbSplineSurfaceAuxiliaryData & init ); @@ -350,7 +350,7 @@ public: \en \name Common functions of geometric object. \{ */ virtual MbeSpaceType IsA() const; // \ru Тип элемента. \en A type of element. - virtual MbSpaceItem & Duplicate( MbRegDuplicate * = c3d_null ) const; // \ru Cделать копию элемента. \en Make a copy of an element. + virtual MbSpaceItem & Duplicate( MbRegDuplicate * = NULL ) const; // \ru Cделать копию элемента. \en Make a copy of an element. virtual bool IsSame ( const MbSpaceItem & other, double accuracy = LENGTH_EPSILON ) const; // \ru Равны ли объекты. \en Whether the objects are equal. virtual bool SetEqual( const MbSpaceItem & ); // \ru Сделать равным. \en Make equal. @@ -497,12 +497,12 @@ public: */ MbSplineSurface * Trimmed( double uBeg, double uEnd, double vBeg, double vEnd ) const; - virtual bool IsPlanar( double accuracy = METRIC_EPSILON ) const; // \ru Является ли поверхность плоской. \en Whether a surface is planar. + virtual bool IsPlanar() const; // \ru Является ли поверхность плоской. \en Whether a surface is planar. // \ru Найти ближайшую проекцию точки на поверхность или ее продолжение по заданному начальному приближению. \en Find the neares projection of a point onto the surface. - virtual bool NearPointProjection ( const MbCartPoint3D & pnt, double & u, double & v, bool ext, MbRect2D * uvRange = c3d_null ) const; + virtual bool NearPointProjection ( const MbCartPoint3D & pnt, double & u, double & v, bool ext, MbRect2D * uvRange = NULL ) const; // \ru Найти все проекции точки на поверхность вдоль вектора в любом из двух направлений. \en Find all a point projection onto the surface along a vector in either of two directions. - virtual void DirectPointProjection( const MbCartPoint3D & pnt, const MbVector3D & vect, SArray & uv, bool ext, MbRect2D * uvRange = c3d_null ) const; + virtual void DirectPointProjection( const MbCartPoint3D & pnt, const MbVector3D & vect, SArray & uv, bool ext, MbRect2D * uvRange = NULL ) const; // \ru Являются ли узловые векторы равными? \en Are knotVectos equal? bool IsKnotsTheSame( const MbSplineSurface & e, bool sameDir, double precision ) const; @@ -767,8 +767,8 @@ public: \en Create a two-dimensional curve if a space curve is a surface boundary.\n \~ \param[in] curve - \ru Заданная пространственная кривая. \en A given space curve. \~ - \return \ru Ссылка на двумерную кривую на поверхности или c3d_null, если построить ее не удалось. - \en A reference to the two-dimensional curve on a surface or c3d_null if the construction of it is failed. \~ + \return \ru Ссылка на двумерную кривую на поверхности или NULL, если построить ее не удалось. + \en A reference to the two-dimensional curve on a surface or NULL if the construction of it is failed. \~ */ MbCurve * IsSplineBorder( const MbCurve3D & curve ) const; @@ -805,7 +805,7 @@ private: double GetKoef( bool isU ) const; // \ru Получить коэффициент пересчета из длины в параметры. \en Get a coefficient of recalculation of the length to the parameters. //--- - // \ru Служебные функции, которые используют заданный кэш (должен быть != c3d_null). \en Service functions that use a given cache (must != c3d_null). + // \ru Служебные функции, которые используют заданный кэш (должен быть != NULL). \en Service functions that use a given cache (must != NULL). bool CheckPoles( MbSplineSurfaceAuxiliaryData * ) const; // \ru Проверить наличие полюсов. \en Check poles existence. bool CatchMemory( MbSplineSurfaceAuxiliaryData * ) const; @@ -856,7 +856,7 @@ private: MbSplineSurfaceAuxiliaryData * ) const; //--- - double GetMinStep ( bool isU, const double * pRng = c3d_null ) const; + double GetMinStep ( bool isU, const double * pRng = NULL ) const; bool ApproxAsPlane() const; // \ru Можно ли аппроксимировать поверхность как плоскость. \en Whether a surface can be approximated by a plane. // \ru Вычислить аппроксимацию поверхности, считая, что ее можно аппроксимировать как плоскость. \en Calculate an approximation of surface assuming that it can be approximated by a plane. diff --git a/C3d/Include/surf_swept_surface.h b/C3d/Include/surf_swept_surface.h index 12d1d33..bbe73f0 100644 --- a/C3d/Include/surf_swept_surface.h +++ b/C3d/Include/surf_swept_surface.h @@ -48,7 +48,7 @@ protected: MbSweptSurface( const MbCurve3D &, bool same ); MbSweptSurface( const MbSweptSurface &, MbRegDuplicate * ); MbSweptSurface() // \ru Используется только в конвертерах. \en This is used only in converters. - : curve( c3d_null ), umin( 0 ), vmin( 0 ), umax( 0 ), vmax( 0 ), uclosed( false ), vclosed( false ) {} + : curve( NULL ), umin( 0 ), vmin( 0 ), umax( 0 ), vmax( 0 ), uclosed( false ), vclosed( false ) {} private: MbSweptSurface( const MbSweptSurface & ); // \ru Не реализовано. \en Not implemented. @@ -63,12 +63,12 @@ public: \{ */ virtual MbeSpaceType IsA() const = 0; // \ru Тип элемента. \en A type of element. virtual MbeSpaceType Type() const; // \ru Тип элемента. \en A type of element. - virtual MbSpaceItem & Duplicate( MbRegDuplicate * = c3d_null ) const= 0; // \ru Сделать копию элемента. \en Create a copy of the element. + virtual MbSpaceItem & Duplicate( MbRegDuplicate * = NULL ) const= 0; // \ru Сделать копию элемента. \en Create a copy of the element. virtual bool IsSame ( const MbSpaceItem & other, double accuracy = LENGTH_EPSILON ) const = 0; // \ru Являются ли объекты равными. \en Determine whether objects are equal. virtual bool SetEqual ( const MbSpaceItem & ) = 0; // \ru Сделать равным. \en Make equal. - virtual void Transform( const MbMatrix3D &, MbRegTransform * = c3d_null ) = 0; // \ru Преобразовать элемент согласно матрице. \en Transform element according to the matrix. - virtual void Move ( const MbVector3D &, MbRegTransform * = c3d_null ) = 0; // \ru Сдвиг. \en Translation. - virtual void Rotate ( const MbAxis3D &, double angle, MbRegTransform * = c3d_null ) = 0; // \ru Повернуть вокруг оси. \en Rotate around an axis. + virtual void Transform( const MbMatrix3D &, MbRegTransform * = NULL ) = 0; // \ru Преобразовать элемент согласно матрице. \en Transform element according to the matrix. + virtual void Move ( const MbVector3D &, MbRegTransform * = NULL ) = 0; // \ru Сдвиг. \en Translation. + virtual void Rotate ( const MbAxis3D &, double angle, MbRegTransform * = NULL ) = 0; // \ru Повернуть вокруг оси. \en Rotate around an axis. virtual void GetProperties( MbProperties & properties ) = 0; // \ru Выдать свойства объекта. \en Get properties of the object. virtual void SetProperties( const MbProperties & properties ) = 0; // \ru Записать свойства объекта. \en Set properties of the object. diff --git a/C3d/Include/surf_tessellation.h b/C3d/Include/surf_tessellation.h index 8d0c79a..2d2a883 100644 --- a/C3d/Include/surf_tessellation.h +++ b/C3d/Include/surf_tessellation.h @@ -370,26 +370,26 @@ inline bool MbSurfaceWorkingData::Explore( double u0, double v0, bool ext0, doub bool resUV = false; bool resVV = false; - if ( uuDer == c3d_null ) + if ( uuDer == NULL ) resUU = true; else if ( ders[sdt_DeriveUU].x != UNDEFINED_DBL ) { uuDer->Init( ders[sdt_DeriveUU] ); resUU = true; } - if ( uvDer == c3d_null ) + if ( uvDer == NULL ) resUV = true; else if ( ders[sdt_DeriveUV].x != UNDEFINED_DBL ) { uvDer->Init( ders[sdt_DeriveUV] ); resUV = true; } - if ( vvDer == c3d_null ) + if ( vvDer == NULL ) resVV = true; else if ( ders[sdt_DeriveVV].x != UNDEFINED_DBL ) { vvDer->Init( ders[sdt_DeriveVV] ); resVV = true; } if ( resUU && resUV && resVV ) { - if ( nor == c3d_null ) + if ( nor == NULL ) res = true; else if ( norm.x != UNDEFINED_DBL ) { nor->Init( norm ); diff --git a/C3d/Include/surf_torus_surface.h b/C3d/Include/surf_torus_surface.h index f64df3a..d9e0a22 100644 --- a/C3d/Include/surf_torus_surface.h +++ b/C3d/Include/surf_torus_surface.h @@ -132,10 +132,10 @@ public: \en \name Common functions of a geometric object \{ */ virtual MbeSpaceType IsA() const; // \ru Тип элемента. \en A type of element. - virtual MbSpaceItem & Duplicate( MbRegDuplicate * = c3d_null ) const ; // \ru Сделать копию элемента. \en Create a copy of the element. + virtual MbSpaceItem & Duplicate( MbRegDuplicate * = NULL ) const ; // \ru Сделать копию элемента. \en Create a copy of the element. virtual bool IsSame ( const MbSpaceItem & other, double accuracy = LENGTH_EPSILON ) const; // \ru Равны ли объекты. \en Whether the objects are equal. virtual bool SetEqual( const MbSpaceItem & ); // \ru Сделать равным. \en Make equal. - virtual void Transform( const MbMatrix3D & matr, MbRegTransform * = c3d_null ); // \ru Преобразовать элемент согласно матрице. \en Transform element according to the matrix. + virtual void Transform( const MbMatrix3D & matr, MbRegTransform * = NULL ); // \ru Преобразовать элемент согласно матрице. \en Transform element according to the matrix. virtual void GetProperties( MbProperties & properties ); // \ru Выдать свойства объекта. \en Get properties of the object. virtual void SetProperties( const MbProperties & properties ); // \ru Записать свойства объекта. \en Set properties of the object. @@ -233,7 +233,7 @@ public: virtual MbCurve3D * CurveU( double v, MbRect1D * pRgn, bool bApprox = true ) const; // \ru Пространственная копия линии v = const. \en A spatial copy of the line v = const. virtual MbCurve3D * CurveV( double u, MbRect1D * pRgn, bool bApprox = true ) const; // \ru Пространственная копия линии u = const. \en A spatial copy of the line u = const. // \ru Найти все проекции точки на поверхность вдоль вектора в любом из двух направлений. \en Find all a point projection onto the surface along a vector in either of two directions. - virtual void DirectPointProjection( const MbCartPoint3D & p, const MbVector3D & vect, SArray & uv, bool ext, MbRect2D * uvRange = c3d_null ) const; + virtual void DirectPointProjection( const MbCartPoint3D & p, const MbVector3D & vect, SArray & uv, bool ext, MbRect2D * uvRange = NULL ) const; // \ru Пересечение с кривой. \en Intersection with a curve. virtual void CurveIntersection( const MbCurve3D & curv, SArray & uv, SArray & tt, bool ext0, bool ext, bool touchInclude = false ) const; @@ -284,7 +284,7 @@ public: /** \ru \name Функции элементарных поверхностей \en \name Functions of elementary surfaces. \{ */ - virtual bool GetPointProjection( const MbCartPoint3D & p, bool init, double & u, double & v, bool ext, MbRect2D * uvRange = c3d_null ) const; + virtual bool GetPointProjection( const MbCartPoint3D & p, bool init, double & u, double & v, bool ext, MbRect2D * uvRange = NULL ) const; /** \} */ /** \ru \name Функции тороидальной поверхности \en \name Functions of toroidal surface diff --git a/C3d/Include/surface.h b/C3d/Include/surface.h index 39ca6b7..aed851c 100644 --- a/C3d/Include/surface.h +++ b/C3d/Include/surface.h @@ -118,12 +118,12 @@ public: virtual MbeSpaceType IsA() const = 0; // \ru Тип элемента. \en A type of element. virtual MbeSpaceType Type() const; // \ru Групповой тип элемента. \en Group element type. virtual MbeSpaceType Family() const; // \ru Семейство объекта. \en Family of object. - virtual MbSpaceItem & Duplicate( MbRegDuplicate * = c3d_null ) const = 0; // \ru Сделать копию объекта. \en Create a copy of the object. + virtual MbSpaceItem & Duplicate( MbRegDuplicate * = NULL ) const = 0; // \ru Сделать копию объекта. \en Create a copy of the object. virtual bool IsSame ( const MbSpaceItem & other, double accuracy = LENGTH_EPSILON ) const = 0; // \ru Являются ли объекты равными. \en Determine whether objects are equal. virtual bool SetEqual ( const MbSpaceItem & ) = 0; // \ru Сделать объекты равным. \en Make objects equal. - virtual void Transform( const MbMatrix3D &, MbRegTransform * = c3d_null ) = 0; // \ru Преобразовать элемент согласно матрице. \en Transform element according to the matrix. - virtual void Move ( const MbVector3D &, MbRegTransform * = c3d_null ) = 0; // \ru Сдвинуть объект вдоль вектора. \en Move an object along a vector. - virtual void Rotate ( const MbAxis3D &, double angle, MbRegTransform * = c3d_null ) = 0; // \ru Повернуть вокруг оси. \en Rotate around an axis. + virtual void Transform( const MbMatrix3D &, MbRegTransform * = NULL ) = 0; // \ru Преобразовать элемент согласно матрице. \en Transform element according to the matrix. + virtual void Move ( const MbVector3D &, MbRegTransform * = NULL ) = 0; // \ru Сдвинуть объект вдоль вектора. \en Move an object along a vector. + virtual void Rotate ( const MbAxis3D &, double angle, MbRegTransform * = NULL ) = 0; // \ru Повернуть вокруг оси. \en Rotate around an axis. virtual double DistanceToPoint( const MbCartPoint3D & ) const; // \ru Вычислить расстояние до точки. \en Calculate the distance to a point. virtual void AddYourGabaritTo( MbCube & c ) const; // \ru Добавить габарит поверхности в куб. \en Add the surface bounding box into a cube. virtual void Refresh(); // \ru Сбросить все временные данные. \en Reset all temporary data. @@ -407,11 +407,11 @@ public: \param[out] vDer - \ru Производная по v. \en Derivative with respect to v. \~ \param[out] uuDer - \ru Вторая производная по u, если не ноль. - \en Second derivative with respect to u, if not c3d_null. \~ + \en Second derivative with respect to u, if not NULL. \~ \param[out] vvDer - \ru Вторая производная по v, если не ноль. - \en Second derivative with respect to v, if not c3d_null. \~ + \en Second derivative with respect to v, if not NULL. \~ \param[out] uvDer - \ru Вторая производная по u и по v, если не ноль. - \en Second derivative with respect to u and v, if not c3d_null. \~ + \en Second derivative with respect to u and v, if not NULL. \~ \ingroup Surfaces */ virtual void Explore( double & u, double & v, bool ext, @@ -770,7 +770,7 @@ public: /// \ru Является ли базовая поверхность копией базовой поверхности данного объекта. \en Whether a base surface is a copy of the base surface of the given object. virtual bool IsSameBase( const MbSurface & ) const; /// \ru Является ли поверхность плоской. \en Whether a surface is planar. - virtual bool IsPlanar( double accuracy = METRIC_EPSILON ) const; + virtual bool IsPlanar() const; /** \brief \ru Дать физический радиус объекта или ноль, если это невозможно. \en Get the physical radius of the object or null if it impossible. \~ @@ -867,8 +867,8 @@ public: \en Parameters of construction in u direction. \~ \param[in] vParam - \ru Параметры построения по направлению v. \en Parameters of construction in v direction. \~ - \result \ru Построенная NURBS поверхность или c3d_null при неуспешном построении. - \en The constructed NURBS surface or c3d_null in a case of failure. \~ + \result \ru Построенная NURBS поверхность или NULL при неуспешном построении. + \en The constructed NURBS surface or NULL in a case of failure. \~ */ virtual MbSurface * NurbsSurface( const MbNurbsParameters & uParam, const MbNurbsParameters & vParam ) const; @@ -1159,7 +1159,7 @@ public: \result \ru true - если найдена проекция, удовлетворяющая всем входным условиям. \en True - if there is found a projection which satisfies to all input conditions. \~ */ - virtual bool NearPointProjection( const MbCartPoint3D & pnt, double & u, double & v, bool ext, MbRect2D * uvRange = c3d_null ) const; + virtual bool NearPointProjection( const MbCartPoint3D & pnt, double & u, double & v, bool ext, MbRect2D * uvRange = NULL ) const; /// \ru Нахождение проекции точки на поверхность в направлении вектора. Для внутреннего использования. \en Finding of point projections to the surface in direction of the vector. For internal use only. virtual MbeNewtonResult DirectPointProjectionNewton( const MbCartPoint3D & p, const MbVector3D & vect, size_t iterLimit, double & u, double & v, double & w, bool ext ) const; @@ -1183,7 +1183,7 @@ public: \param[in] uvRange - \ru Диапазон изменения параметров поверхности, в котором надо найти решение. \en A range of surface parameters changing in which the solution should be found. \~ */ - virtual void DirectPointProjection( const MbCartPoint3D & pnt, const MbVector3D & vect, SArray & uv, bool ext, MbRect2D * uvRange = c3d_null ) const; + virtual void DirectPointProjection( const MbCartPoint3D & pnt, const MbVector3D & vect, SArray & uv, bool ext, MbRect2D * uvRange = NULL ) const; /** \brief \ru Найти ближайшую проекцию точки на поверхность в направлении вектора. \en Find the nearest point projection to the surface in the vector direction. \~ @@ -1209,7 +1209,7 @@ public: \en True - if there is found a projection which satisfies to all input conditions. \~ */ virtual bool NearDirectPointProjection( const MbCartPoint3D & pnt, const MbVector3D & vect, double & u, double & v, bool ext, - MbRect2D * uvRange = c3d_null, bool onlyPositiveDirection = false ) const; + MbRect2D * uvRange = NULL, bool onlyPositiveDirection = false ) const; /// \ru Решение системы уравнений для определения пересечения поверхности и кривой. Для внутреннего использования. \en Solution of equation system for determination of intersections between a surface and a curve. For internal use only. virtual MbeNewtonResult CurveIntersectNewton( const MbCurve3D & curv1, double funcEpsilon, size_t iterLimit, double & u0, double & v0, double & t1, bool ext0, bool ext1 ) const; @@ -1453,7 +1453,7 @@ public: \param[in] s - \ru Поверхность-копия. \en A surface-copy. \~ */ - void CopyGabarit( const MbSurface & s, const MbVector3D * to = c3d_null ) { cube = s.cube; if ( (to != c3d_null) && !cube.IsEmpty() ) { cube.Move( *to ); } } + void CopyGabarit( const MbSurface & s, const MbVector3D * to = NULL ) { cube = s.cube; if ( (to != NULL) && !cube.IsEmpty() ) { cube.Move( *to ); } } /// \ru Вычислить диагональ габаритного куба. \en Calculate the diagonal of the bounding box. double GetGabDiagonal() const { if ( cube.IsEmpty() ) { MbCube tmp; CalculateGabarit( tmp ); } return cube.GetDiagonal(); } @@ -1978,6 +1978,8 @@ MATH_FUNC (MbeNewtonResult) NearestPoints( const MbSurface & surface0, bool ext0 \en V-parameter of a point on the surface 'surface1'. \~ \param[out] dmin - \ru Расстояние между точками поверхностей. \en The distance between points on surfaces. \~ + \param[in] checkCurvilinearBounds - \ru Всегда проверять по криволинейным границам (если они есть). + \en Check for curvilinear boundaries (if they are). \~ \return \ru Возвращает nr_Success (+1) или nr_Special(0) в случае успешного определения, в случае неудачи возвращает nr_Failure(-1). \en Return nr_Success (+1) or nr_Special(0) in a case of successful defining, return nr_Failure(-1) in a case of failure. \~ \ingroup Surfaces diff --git a/C3d/Include/system_atomic.h b/C3d/Include/system_atomic.h index a5f6ea0..8eef130 100644 --- a/C3d/Include/system_atomic.h +++ b/C3d/Include/system_atomic.h @@ -2,9 +2,9 @@ /** \file \brief \ru Системозависимые атомарные операции. - Если требуются атомарные операции, должен использоваться этот файл (atomic не использовать!!!). + Если требуются атомарные операции, должен использоваться этот файл ( не использовать!!!). \en System-dependent atomic operations. - If atomic operations are required, this file should be used (atomic must not be used!!!).\~ + If atomic operations are required, this file should used ( must not be used!!!).\~ */ //////////////////////////////////////////////////////////////////////////////// @@ -15,7 +15,6 @@ #include #include - //------------------------------------------------------------------------------ // \ru Использование атомарных операций согласно стандарту C++11. // \en Using atomic operations according to C++11 standard. diff --git a/C3d/Include/system_cpp_standard.h b/C3d/Include/system_cpp_standard.h index 9bb9a75..0846a11 100644 --- a/C3d/Include/system_cpp_standard.h +++ b/C3d/Include/system_cpp_standard.h @@ -161,7 +161,7 @@ #endif //------------------------------------------------------------------------------ -/// \ru Обертка для constexpr. \en Wrapper for constexpr. +/// \ru Обертка для c o n s t e x p r. \en Wrapper for c o n s t e x p r. //--- #ifdef C3D_STANDARD_CXX_11 #define c3d_constexpr constexpr @@ -173,22 +173,19 @@ // \ru Нулевой указатель. \en Null pointer. //--- #ifdef C3D_STANDARD_CXX_11_PARTIAL - #define c3d_null nullptr + #define C3D_NULL_PTR nullptr #else - #if !defined(NULL) - #define NULL 0 - #endif - #define c3d_null NULL + #define C3D_NULL_PTR NULL #endif // C3D_STANDARD_CXX_11_PARTIAL //------------------------------------------------------------------------------ -// \ru Обертка для final. \en Wrapper for final. +// \ru Нулевой указатель. \en Null pointer. //--- #ifdef C3D_STANDARD_CXX_11 #define c3d_final final #else #define c3d_final -#endif // C3D_STANDARD_CXX_11 +#endif // C3D_STANDARD_CXX_11_PARTIAL #endif // __SYSTEM_CPP_STANDARD_H diff --git a/C3d/Include/templ_array2.h b/C3d/Include/templ_array2.h index 5d610a2..e1c1156 100644 --- a/C3d/Include/templ_array2.h +++ b/C3d/Include/templ_array2.h @@ -65,8 +65,8 @@ public: ~Array2() { set_array_size( *this, 0, 0 ); } public: - /// \ru Создать массив заданной размерности (возвращает c3d_null в случае неудачи). - /// \en Create an array of a given dimension (returns c3d_null in case of failure). + /// \ru Создать массив заданной размерности (возвращает NULL в случае неудачи). + /// \en Create an array of a given dimension (returns NULL in case of failure). static Array2 * Create( size_t lSize, size_t cSize ); public: // Общие методы матриц (двумерных массивов) @@ -221,13 +221,13 @@ inline Array2::Array2( const Array2 & source ) template inline Array2 * Array2::Create( size_t lSize, size_t cSize ) { - Array2 * arr = c3d_null; + Array2 * arr = NULL; if ( lSize * cSize < c3d::MATRIX_MAX_COUNT ) { try { arr = new Array2( lSize, cSize ); } catch ( const std::bad_alloc & ) { - arr = c3d_null; + arr = NULL; } } return arr; @@ -285,7 +285,7 @@ const Type * Array2::GetLine( size_t i ) const { PRECONDITION( i < l ); if ( i < l ) return parr[i]; - return c3d_null; + return NULL; } //------------------------------------------------------------------------------ @@ -296,7 +296,7 @@ Type * Array2::SetLine( size_t i ) { PRECONDITION( i < l ); if ( i < l ) return parr[i]; - return c3d_null; + return NULL; } //------------------------------------------------------------------------------ @@ -468,7 +468,7 @@ inline bool Array2::CatchLinePointers( size_t newCount ) } catch ( ... ) { if ( newCount == 0 ) {// \ru Не смогли удалить parr. \en Failed to delete parr. - parr = c3d_null; + parr = NULL; l = c = 0; } C3D_CONTROLED_THROW; @@ -529,7 +529,7 @@ inline bool realloc_line( Type *& line, size_t oldSize, size_t newSize ) } catch ( ... ) { if ( newSize == 0 )// \ru Не смогли удалить line. \en Failed to delete line. - line = c3d_null; + line = NULL; C3D_CONTROLED_THROW; return false; } @@ -602,7 +602,7 @@ bool set_array_size( Array2 & arr, size_t lSize, size_t cSize ) else if ( arr.l > oldL && arr.c > 0 ) { // \ru BUG_46010 KYA K12 А кто будет выделять память для новых строк \en BUG_46010 KYA K12 And who will allocate memory for new rows Type * newLine = 0; // \ru указатель на содержимое новой строки \en pointer to contents of new row for ( i = oldL; res && i < arr.l; i++ ) { - newLine = c3d_null; + newLine = NULL; res = ::realloc_line( newLine, 0, arr.c ); // \ru захватить память под строку \en allocate memory for one row if ( res ) { ::memset( newLine, 0, arr.c * sizeof(Type) ); diff --git a/C3d/Include/templ_balance_tree.h b/C3d/Include/templ_balance_tree.h index 1615c67..82517a6 100644 --- a/C3d/Include/templ_balance_tree.h +++ b/C3d/Include/templ_balance_tree.h @@ -120,7 +120,7 @@ static size_t countIsSame; ///< \ru Число сравнений (для от public: /// \ru Конструктор. \en Constructor. - BalanceTree( Compare_t c_t = SimplePointCompFuncT, Compare_v c_v = c3d_null/*SimplePointCompFuncV*/, + BalanceTree( Compare_t c_t = SimplePointCompFuncT, Compare_v c_v = NULL/*SimplePointCompFuncV*/, bool shouldDelete = true ); /// \ru Деструктор. \en Destructor. virtual ~BalanceTree(); @@ -204,7 +204,7 @@ public: BalanceTreeNode * node_m; PPNodeType typeRAB_m; public: - PPNode( BalanceTreeNode * node = c3d_null, PPNodeType t = iRoot ) + PPNode( BalanceTreeNode * node = NULL, PPNodeType t = iRoot ) : node_m(node) , typeRAB_m(t) {} @@ -321,8 +321,8 @@ inline void BalanceTreeNode::operator delete ( void * ptr, size_t size ) { template inline BalanceTreeNode::BalanceTreeNode( BalanceTree & parent, Type * content ) : parent_m ( parent ), - left_m ( c3d_null ), - right_m ( c3d_null ), + left_m ( NULL ), + right_m ( NULL ), // \ru КВН K8+ count_m ( 0 ), \en КВН K8+ count_m ( 0 ), balance_m ( ts_neutral ), content_m ( content ) @@ -367,7 +367,7 @@ inline void BalanceTreeNode::SetRight( BalanceTreeNode * p ){ // --- template inline BalanceTree::BalanceTree( Compare_t c_t, Compare_v c_v, bool shouldDelete ) : - root_m ( c3d_null ), + root_m ( NULL ), allCount_m ( 0 ), owns_m ( shouldDelete ), isBranchGrew_m( false ), @@ -418,7 +418,7 @@ inline void BalanceTree::Flush( DelType del ) { if( root_m ) { destroy_tree_node( *root_m, del ); delete root_m; - root_m = c3d_null; + root_m = NULL; } allCount_m = 0; @@ -464,7 +464,7 @@ inline bool BalanceTree::FindIt ( const Type * content ) const { #endif // C3D_DEBUG - Type * t = compT_m ? find_tree( *this, (void *)content, true/*compT*/ ) : c3d_null; + Type * t = compT_m ? find_tree( *this, (void *)content, true/*compT*/ ) : NULL; return !!t; } @@ -479,7 +479,7 @@ inline Type * BalanceTree::Find ( void * content ) const { countIsSame = 0; #endif // C3D_DEBUG - return compV_m ? find_tree( *this, content, false/*compT*/ ) : c3d_null; + return compV_m ? find_tree( *this, content, false/*compT*/ ) : NULL; } @@ -579,8 +579,8 @@ inline bool BalanceTree::AddToBalanceTree( Type & content, BalanceTreeNod case ts_neutral : node->balance_m = ts_negative; break; // \ru балансировка \en balancing case ts_negative : { - BalanceTreeNode * p1 = c3d_null; - BalanceTreeNode * p2 = c3d_null; + BalanceTreeNode * p1 = NULL; + BalanceTreeNode * p2 = NULL; p1 = node->left_m; if ( p1 ){ if ( p1->balance_m == ts_negative ) { // \ru однократный LL поворот \en single LL rotation @@ -612,8 +612,8 @@ inline bool BalanceTree::AddToBalanceTree( Type & content, BalanceTreeNod case ts_neutral : node->balance_m = ts_positive; break; // \ru балансировка \en balancing case ts_positive : { - BalanceTreeNode * p1 = c3d_null; - BalanceTreeNode * p2 = c3d_null; + BalanceTreeNode * p1 = NULL; + BalanceTreeNode * p2 = NULL; p1 = node->right_m; if ( p1 ) { if ( p1->balance_m == ts_positive ) { // \ru однократный RR поворот \en single RR rotation @@ -652,8 +652,8 @@ inline void BalanceTree::BalanceL( BalanceTreeNode *& node, bool & case ts_neutral : node->balance_m = ts_positive; isBranchGrew = false; break; // \ru балансировка \en balancing case ts_positive : { - BalanceTreeNode * p1 = c3d_null; - BalanceTreeNode * p2 = c3d_null; + BalanceTreeNode * p1 = NULL; + BalanceTreeNode * p2 = NULL; p1 = node->right_m; if ( p1 ) { if ( p1->balance_m >= ts_neutral ) { // \ru однократный RR поворот \en single RR rotation @@ -691,8 +691,8 @@ inline void BalanceTree::BalanceR( BalanceTreeNode *& node, bool & case ts_neutral : node->balance_m = ts_negative; isBranchGrew = false; break; // \ru балансировка \en balancing case ts_negative : { - BalanceTreeNode * p1 = c3d_null; - BalanceTreeNode * p2 = c3d_null; + BalanceTreeNode * p1 = NULL; + BalanceTreeNode * p2 = NULL; p1 = node->left_m; if ( p1 ) { if ( p1->balance_m <= ts_neutral ) { // \ru однократный LL поворот \en single LL rotation @@ -791,8 +791,8 @@ inline bool BalanceTree::DeleteFromBalanceTree( Type & content, BalanceTr } bool oldowns = owns_m; owns_m = del == Delete ? true : del == noDelete ? false : owns_m; - q->left_m = c3d_null; - q->right_m = c3d_null; + q->left_m = NULL; + q->right_m = NULL; delete q; owns_m = oldowns; allCount_m--; // \ru подсчитываем общее кол-во узлов \en compute the total count of nodes @@ -813,14 +813,14 @@ template void destroy_tree_node( BalanceTreeNode& treeNode, DelType del ) { delete treeNode.left_m; - treeNode.left_m = c3d_null; + treeNode.left_m = NULL; delete treeNode.right_m; - treeNode.right_m = c3d_null; + treeNode.right_m = NULL; bool shouldDelete = del == Delete || ( del == defDelete && treeNode.parent_m.owns_m ); if ( shouldDelete ) { delete treeNode.content_m; - treeNode.content_m = c3d_null; + treeNode.content_m = NULL; } } @@ -830,7 +830,7 @@ void destroy_tree_node( BalanceTreeNode& treeNode, DelType del ) { // --- template Type * find_tree( const BalanceTree& tree, void * content, bool compT ) { - Type * res = c3d_null; + Type * res = NULL; const BalanceTreeNode * node = tree.root_m; if ( node ) { ThreeStates compRres = ts_negative; @@ -881,7 +881,7 @@ inline void BalanceTreeIterator::Restart( IteratorType t ) { // --- template inline Type * BalanceTreeIterator::operator ++(int) { - Type * res = m_CurNode ? m_CurNode->content_m : c3d_null; + Type * res = m_CurNode ? m_CurNode->content_m : NULL; if ( m_CurNode ) Iterate( m_CurNode ); @@ -894,7 +894,7 @@ inline Type * BalanceTreeIterator::operator ++(int) { // --- template inline BalanceTreeIterator::operator Type * () const { - return m_CurNode ? m_CurNode->content_m : c3d_null; + return m_CurNode ? m_CurNode->content_m : NULL; } @@ -1016,10 +1016,10 @@ inline void BalanceTreeIterator::Iterate( BalanceTreeNode * node ) { Iterate( m_CurNode ); } else - m_CurNode = c3d_null; + m_CurNode = NULL; } else - m_CurNode = c3d_null; + m_CurNode = NULL; fRepeat = false; break; } diff --git a/C3d/Include/templ_c_array.h b/C3d/Include/templ_c_array.h index dfce683..e116a25 100644 --- a/C3d/Include/templ_c_array.h +++ b/C3d/Include/templ_c_array.h @@ -66,7 +66,7 @@ public : /// \ru Оператор доступа. \en An access operator. Type & operator []( size_t idx ) const { PRECONDITION( idx < count ); return parr[idx]; } /// \ru Выделена ли память? \en Is memory allocated? - bool IsNull () const { return parr == c3d_null; } + bool IsNull () const { return parr == NULL; } /// \ru Выдать адрес начала массива. \en Get address of the beginning of an array. const Type * GetAddr() const { return parr; } @@ -125,7 +125,7 @@ inline CcArray::CcArray( size_t _count ) template inline void CcArray::Copy( const void * from, size_t cnt, size_t offset ) { - PRECONDITION( (offset + cnt <= count) && (cnt ? from != c3d_null : true) ); + PRECONDITION( (offset + cnt <= count) && (cnt ? from != NULL : true) ); memcpy( parr + offset, from, cnt * sizeof(Type) ); } @@ -147,12 +147,12 @@ inline bool CcArray::SetArraySize( size_t newCount ) #endif #ifdef USE_REALLOC_IN_ARRAYS - if ( parr != c3d_null || newCount != 0 ) { - // \ru показывает утечки памяти, если parr==c3d_null и newCount==0 \en Memory leaks happen if parr==c3d_null and newCount==0 + if ( parr != NULL || newCount != 0 ) { + // \ru показывает утечки памяти, если parr==0 и newCount==0 \en Memory leaks happen if parr==0 and newCount==0 parr = static_cast( REALLOC_ARRAY_SIZE(parr, newCount * sizeof(Type), true/*clear*/) ); } #else - Type * p_tmp = newCount ? new Type[newCount] : c3d_null; + Type * p_tmp = newCount ? new Type[newCount] : NULL; delete[] parr; // \ru Удалять parr, если оператор new выполнился успешно. \en Delete parr if operator new is succeeded. parr = p_tmp; @@ -171,7 +171,7 @@ inline bool CcArray::SetArraySize( size_t newCount ) } catch ( ... ) { if ( newCount == 0 )// \ru Не смогли удалить parr. \en Failed to delete parr. - parr = c3d_null; + parr = NULL; C3D_CONTROLED_THROW; return false; } diff --git a/C3d/Include/templ_csp_array.h b/C3d/Include/templ_csp_array.h index a123902..79d43d5 100644 --- a/C3d/Include/templ_csp_array.h +++ b/C3d/Include/templ_csp_array.h @@ -49,7 +49,7 @@ private: public: /// \ru Конструктор. \en Constructor. - CSPArray( size_t maxCnt = 0, uint16 delt = 1, bool shouldDelete = true, bool _keepEq = false, LessFuncPtr func = c3d_null ) + CSPArray( size_t maxCnt = 0, uint16 delt = 1, bool shouldDelete = true, bool _keepEq = false, LessFuncPtr func = NULL ) : SPArray( maxCnt, delt, shouldDelete ) , m_sort( true ) , m_keepEq( _keepEq ) @@ -181,9 +181,9 @@ inline void CSPArray::Sort( LessFuncPtr lessFunc ) template inline Type * CSPArray::RemoveObj( Type * delObject, DelType del ) { - C3D_ASSERT( SPArray::nowDeletedElem == c3d_null ); // \ru Bременно, для отладки \en Temporarily, for debugging. + C3D_ASSERT( SPArray::nowDeletedElem == 0 ); // \ru Bременно, для отладки \en Temporarily, for debugging. size_t i = Find( delObject ); - return ( i != SYS_MAX_T ) ? RemoveInd(i, del) : c3d_null; + return ( i != SYS_MAX_T ) ? RemoveInd(i, del) : 0; } @@ -248,7 +248,7 @@ void qp_sort_r2( Type ** arr, size_t minIndex, size_t maxIndex ) ptrdiff_t minInd = minIndex, maxInd = maxIndex; ptrdiff_t i = minInd, j = maxInd; ptrdiff_t im = 0; - Type *middle = c3d_null; + Type *middle = NULL; for ( ;; ) { i = minInd, j = maxInd; diff --git a/C3d/Include/templ_css_array.h b/C3d/Include/templ_css_array.h index b6c7c74..e98362d 100644 --- a/C3d/Include/templ_css_array.h +++ b/C3d/Include/templ_css_array.h @@ -53,14 +53,14 @@ public: , m_sort( other.m_sort ) {} /// \ru Конструктор копирования. \en Copy constructor. - CSSArray( const SArray & other, SArray * del = c3d_null ) + CSSArray( const SArray & other, SArray * del = NULL ) : SSArray( other ) , m_sort( false ) { ::q_sort( *this, del ); } /// \ru Конструктор копирования. \en Copy constructor. - CSSArray( const SArray< std::pair > & other, bool addFirst, SArray * del = c3d_null ) + CSSArray( const SArray< std::pair > & other, bool addFirst, SArray * del = NULL ) : SSArray( other.Count(), 1 ) , m_sort( false ) { @@ -100,7 +100,7 @@ public: Type * Add ( const Type & ); ///< \ru Добавить элемент с упорядочиванием по массиву. \en Add element with sorting. Type * Add ( const Type &, size_t & indexEnt ); ///< \ru Добавить элемент с упорядочиванием по массиву, возвращает индекс. \en Add element with sorting by array, returns index of the element. size_t Find( const Type & ); ///< \ru Найти элемент в упорядоченном массиве. \en Find an element in ordered array. - void Sort( SArray * del = c3d_null ); ///< \ru Выполнить сортировку элементов массива. \en Sort elements of array. + void Sort( SArray * del = NULL ); ///< \ru Выполнить сортировку элементов массива. \en Sort elements of array. size_t RemoveObj( const Type & delObject ); ///< \ru Удалить элемент из массива. \en Delete an element from array. void SetNoSort() { m_sort = false; } ///< \ru Сбросить флаг сортированности. \en Reset the flag of being sorted. @@ -121,7 +121,7 @@ public: // --- template inline Type * CSSArray::Add( const Type & el ) { - ::q_sort( *this, (SArray *)c3d_null ); + ::q_sort( *this, (SArray *)NULL ); return SSArray::Add( el ); } @@ -131,7 +131,7 @@ inline Type * CSSArray::Add( const Type & el ) { // --- template inline Type * CSSArray::Add( const Type & el, size_t & indexEl ) { - ::q_sort( *this, (SArray *)c3d_null ); + ::q_sort( *this, (SArray *)NULL ); return SSArray::Add( el, indexEl ); } @@ -146,7 +146,7 @@ inline void CSSArray::AddArray( const CSSArray & arr, bool doSort ) m_sort = false; (*this) += arr; if ( doSort ) - ::q_sort( *this, (SArray *)c3d_null ); + ::q_sort( *this, (SArray *)NULL ); } } @@ -161,7 +161,7 @@ inline void CSSArray::AddArray( const SArray & arr, bool doSort ) m_sort = false; (*this) += arr; if ( doSort ) - ::q_sort( *this, (SArray *)c3d_null ); + ::q_sort( *this, (SArray *)NULL ); } } @@ -171,7 +171,7 @@ inline void CSSArray::AddArray( const SArray & arr, bool doSort ) // --- template inline size_t CSSArray::Find( const Type & el ) { - ::q_sort( *this, (SArray *)c3d_null ); + ::q_sort( *this, (SArray *)NULL ); return SSArray::Find( el ); } diff --git a/C3d/Include/templ_dptr.h b/C3d/Include/templ_dptr.h index 070ec4c..1f59775 100644 --- a/C3d/Include/templ_dptr.h +++ b/C3d/Include/templ_dptr.h @@ -11,6 +11,11 @@ #define __TEMPL_DPTR_H +#ifndef NULL + #define NULL 0 +#endif + + #include #include @@ -89,8 +94,8 @@ private: // --- template DPtr::DPtr() - : m_Ptr ( c3d_null ) - , m_Owner( c3d_null ) + : m_Ptr ( NULL ) + , m_Owner( NULL ) { } @@ -101,9 +106,9 @@ DPtr::DPtr() template DPtr::DPtr( dtype * obj ) : m_Ptr ( obj ) - , m_Owner( c3d_null ) + , m_Owner( NULL ) { - if ( obj != c3d_null ) { + if ( obj != NULL ) { m_Owner = new Owner( obj ); m_Owner->m_RefCounter++; } @@ -118,7 +123,7 @@ DPtr::DPtr( const DPtr & dptr ) : m_Ptr( dptr.m_Ptr ) , m_Owner( dptr.m_Owner ) { - if ( m_Owner != c3d_null ) + if ( m_Owner != NULL ) m_Owner->m_RefCounter++; } @@ -131,11 +136,11 @@ DPtr & DPtr::operator = ( dtype * pObj ) { if ( m_Ptr != pObj ) { m_Ptr = pObj; - if ( m_Owner != c3d_null ) { + if ( m_Owner != NULL ) { m_Owner->Release(); - m_Owner = c3d_null; + m_Owner = NULL; } - if ( pObj != c3d_null ) { + if ( pObj != NULL ) { m_Owner = new Owner( pObj ); m_Owner->m_RefCounter++; } @@ -153,11 +158,11 @@ DPtr & DPtr::operator = ( const DPtr & dptr ) { if ( m_Ptr != dptr.m_Ptr ) { m_Ptr = dptr.m_Ptr; - if ( m_Owner != c3d_null ) { + if ( m_Owner != NULL ) { m_Owner->Release(); - m_Owner = c3d_null; + m_Owner = NULL; } - if ( dptr.m_Ptr != c3d_null ) { + if ( dptr.m_Ptr != NULL ) { m_Owner = dptr.m_Owner; m_Owner->m_RefCounter++; } diff --git a/C3d/Include/templ_fdp_array.h b/C3d/Include/templ_fdp_array.h index 50324e9..f34f6e9 100644 --- a/C3d/Include/templ_fdp_array.h +++ b/C3d/Include/templ_fdp_array.h @@ -55,14 +55,14 @@ public : /// \ru Конструктор. \en Constructor. FDPArray() : RPArray() - , fDestroy( c3d_null ) - , nowDeletedElem(c3d_null) + , fDestroy( NULL ) + , nowDeletedElem(0) {} /// \ru Конструктор. \en Constructor. FDPArray( size_t i_upper, uint16 i_delta, DestroyFunc fd ) : RPArray( i_upper, i_delta) , fDestroy( fd ) - , nowDeletedElem(c3d_null) + , nowDeletedElem(0) {} /// \ru Деструктор. \en Destructor. virtual ~FDPArray(); @@ -141,8 +141,8 @@ FDPArray::FDPArray( FDPArray && _Right ) , fDestroy ( std::move(_Right.fDestroy) ) , nowDeletedElem( std::move(_Right.nowDeletedElem) ) { - _Right.fDestroy = c3d_null; - _Right.nowDeletedElem = c3d_null; + _Right.fDestroy = nullptr; + _Right.nowDeletedElem = nullptr; } //------------------------------------------------------------------------------ @@ -166,7 +166,7 @@ FDPArray & FDPArray::operator = ( FDPArray && _Right ) // --- template inline FDPArray::~FDPArray() { - PRECONDITION( nowDeletedElem == c3d_null ); + PRECONDITION( nowDeletedElem == 0 ); destroy_array( *this ); } @@ -177,7 +177,7 @@ inline FDPArray::~FDPArray() { // --- template inline void FDPArray::Flush( DelType del ) { - PRECONDITION( nowDeletedElem == c3d_null ); + PRECONDITION( nowDeletedElem == 0 ); if ( del==Delete || (del==defDelete && fDestroy) ) destroy_array( *this ); @@ -191,7 +191,7 @@ inline void FDPArray::Flush( DelType del ) { // --- template inline void FDPArray::Clear( typename FDPArray::TotalDestroyFunc fd ) { - PRECONDITION( nowDeletedElem == c3d_null ); + PRECONDITION( nowDeletedElem == 0 ); size_t oldCount = RPArray::count; RPArray::count = 0; // \ru сначала приведем в порядок массив ... \en put an array in order at first ... @@ -250,9 +250,9 @@ inline Type* FDPArray::RemoveInd( size_t delIndex, DelType del ) { template inline Type * FDPArray::RemoveObj( Type * delObject, DelType del ) { - PRECONDITION( nowDeletedElem == c3d_null ); + PRECONDITION( nowDeletedElem == 0 ); size_t i = find_in_array( *this, delObject ); - return (i != SYS_MAX_T) ? RemoveInd(i, del) : c3d_null; + return (i != SYS_MAX_T) ? RemoveInd(i, del) : 0; } @@ -295,9 +295,9 @@ inline Type* FDPArray::DestroyInd( size_t delIndex, typename FDPArray inline Type * FDPArray::DestroyObj( Type * delObject, typename FDPArray::DestroyFunc fd ) { - PRECONDITION( nowDeletedElem == c3d_null ); + PRECONDITION( nowDeletedElem == 0 ); size_t i = find_in_array( *this, delObject ); - return ( i != SYS_MAX_T ) ? DestroyInd( i, fd ) : c3d_null; + return ( i != SYS_MAX_T ) ? DestroyInd( i, fd ) : 0; } @@ -334,7 +334,7 @@ void destroy_array( FDPArray & arr ) template bool set_Farray_size( FDPArray & arr, size_t newSize, bool clear ) { - PRECONDITION( arr.nowDeletedElem == c3d_null ); + PRECONDITION( arr.nowDeletedElem == 0 ); if ( clear && arr.count ) arr.Flush(); // \ru будет arr.count = 0; \en arr.count will be equal 0; diff --git a/C3d/Include/templ_fdp_array_rw.h b/C3d/Include/templ_fdp_array_rw.h index 569ec30..4587d92 100644 --- a/C3d/Include/templ_fdp_array_rw.h +++ b/C3d/Include/templ_fdp_array_rw.h @@ -46,11 +46,11 @@ reader & operator >> ( reader & in, FDPArray & ref ) const Type ** parr = ref.GetAddr(); - if ( parr != c3d_null ) { + if ( parr != NULL ) { size_t i; // \ru поочередное чтение объектов массива \en successive reading of objects from an array for ( i = 0; i < count && in.good(); i++ ) { - Type * el = c3d_null; + Type * el = NULL; in >> el; parr[i] = el; } @@ -98,7 +98,7 @@ writer & operator << ( writer & out, const FDPArray & ref ) template reader & operator >> ( reader & in, FDPArray *& ptr ) { - ptr = c3d_null; + ptr = NULL; if ( in.good() ) { if ( in.MathVersion() < 0x06000012L ) ptr = new FDPArray; @@ -168,7 +168,7 @@ static void TotalDestroy( Type ** arr, size_t count ) { size_t i = 0; for ( Type** parr = arr; i < count; i++, parr++ ) { Type *del = *parr; - *parr = c3d_null; // \ru Cначала обнулить ... \en Set to null at first... + *parr = NULL; // \ru Cначала обнулить ... \en Set to null at first... delete del; // \ru ... потом удалить \en ... then delete } } diff --git a/C3d/Include/templ_ifc_array.h b/C3d/Include/templ_ifc_array.h index 6402f21..7138cac 100644 --- a/C3d/Include/templ_ifc_array.h +++ b/C3d/Include/templ_ifc_array.h @@ -50,7 +50,7 @@ public: typedef const value_type * pointer; public: - iterator() { m_curr = c3d_null; } + iterator() { m_curr = NULL; } iterator( const stored_type * ptr ) { m_curr = ptr; } iterator( const iterator & iter ) { m_curr = iter.m_curr; } stored_type operator*() const { return *m_curr; } @@ -165,10 +165,10 @@ public: template inline void IFCArray_Release( Type * & el ) { - if ( el != c3d_null && el->Release() == 0 ) + if ( el != NULL && el->Release() == 0 ) { // AS K11 27.05.2008 Обнулять, только если объект действительно удален. - el = c3d_null; + el = NULL; } } @@ -211,7 +211,7 @@ inline IFC_Array::~IFC_Array() // --- template inline void IFC_Array::Add( Type* ent ) { - if ( ent != c3d_null ) + if ( ent != NULL ) ent->AddRef(); RPArray::Add( ent ); } @@ -222,7 +222,7 @@ inline void IFC_Array::Add( Type* ent ) { // --- template inline void IFC_Array::AddAt( stored_type ent, size_t ind ) { - if ( ent != c3d_null ) + if ( ent != NULL ) ent->AddRef(); RPArray::AddAt( ent, ind ); } @@ -233,7 +233,7 @@ inline void IFC_Array::AddAt( stored_type ent, size_t ind ) { // --- template inline void IFC_Array::AddAfter( stored_type ent, size_t ind ) { - if ( ent != c3d_null ) + if ( ent != NULL ) ent->AddRef(); RPArray::AddAfter( ent, ind ); } @@ -244,10 +244,10 @@ inline void IFC_Array::AddAfter( stored_type ent, size_t ind ) { // --- template inline void IFC_Array::SetAt( stored_type ent, size_t ind ) { - if ( ent != c3d_null ) + if ( ent != NULL ) ent->AddRef(); Type * & el = RPArray::operator[](ind); - if ( el != c3d_null ) + if ( el != NULL ) el->Release(); el = ent; } diff --git a/C3d/Include/templ_im_array.h b/C3d/Include/templ_im_array.h index 5e625e0..a15a6ae 100644 --- a/C3d/Include/templ_im_array.h +++ b/C3d/Include/templ_im_array.h @@ -73,8 +73,8 @@ public: void RemoveInd ( size_t delIndex, bool completely = true ); // \ru удалить элемент из массива \en delete an element from array void RemoveObj ( const size_t & delObject, bool completely = true ); // \ru удалить элемент из массива \en delete an element from array - Type * ReindexInd( size_t ind, size_t * = c3d_null ); // \ru заменить элемент с упорядочиванием по массиву \en replace element with sorting - size_t ReindexObj( Type * ent, size_t * = c3d_null ); // \ru заменить элемент с упорядочиванием по массиву \en replace element with sorting + Type * ReindexInd( size_t ind, size_t * = NULL ); // \ru заменить элемент с упорядочиванием по массиву \en replace element with sorting + size_t ReindexObj( Type * ent, size_t * = NULL ); // \ru заменить элемент с упорядочиванием по массиву \en replace element with sorting Type * ReindexMyInd( size_t ); // \ru заменить элемент с упорядочиванием по массиву \en replace element with sorting diff --git a/C3d/Include/templ_iterator.h b/C3d/Include/templ_iterator.h index 5377d21..5292cb1 100644 --- a/C3d/Include/templ_iterator.h +++ b/C3d/Include/templ_iterator.h @@ -53,9 +53,9 @@ public: /// \ru Сброс итератора. \en Reset iterator. virtual void Restart() { index = 0; } /// \ru Получить текущий элемент и сдвинуть итератор на следующий. \en Get the current element and move an iterator to the next. - virtual Type * operator ++(int) { return (index < items.Count()) ? items[index++] : c3d_null; } + virtual Type * operator ++(int) { return (index < items.Count()) ? items[index++] : NULL; } /// \ru Получить текущий элемент \en Get the current element - virtual Type * operator() () const { return (index < items.Count()) ? items[index] : c3d_null; } + virtual Type * operator() () const { return (index < items.Count()) ? items[index] : NULL; } private: // \ru не реализовано \en not implemented PointersArrayIterator & operator = ( const PointersArrayIterator & ); diff --git a/C3d/Include/templ_kdtree.h b/C3d/Include/templ_kdtree.h index ba3c8f4..dcec6f7 100644 --- a/C3d/Include/templ_kdtree.h +++ b/C3d/Include/templ_kdtree.h @@ -235,7 +235,7 @@ inline bool PriorityQueue::Initialize( size_t _maxSize ) elements = new Element[maxSize]; } catch ( ... ) { - elements = c3d_null; + elements = NULL; maxSize = count = 0; C3D_CONTROLED_THROW; return false; diff --git a/C3d/Include/templ_lis_array.h b/C3d/Include/templ_lis_array.h index ffb078a..810a74b 100644 --- a/C3d/Include/templ_lis_array.h +++ b/C3d/Include/templ_lis_array.h @@ -176,7 +176,7 @@ inline LiSArray & LiSArray::operator = ( const LiSArray & o ) set_array_size( *this, o.count ); // \ru обеспечить память на такое кол-во элементов \en allocate memory for the given number of elements count = o.count; C3D_ASSERT( count < 254 ); - if ( count > 0 && parr != c3d_null ) + if ( count > 0 && parr != NULL ) memcpy( parr, o.parr, count * sizeof(Type) ); return *this; @@ -190,7 +190,7 @@ inline LiSArray & LiSArray::operator += ( const LiSArray & o ) { if ( o.count ) { set_array_size( *this, count + o.count ); // \ru обеспечить память на такое кол-во элементов \en allocate memory for the given number of elements - if ( parr != c3d_null ) + if ( parr != NULL ) memcpy( parr+count, o.parr, o.count * sizeof(Type) ); count = (uint8)(count + o.count); diff --git a/C3d/Include/templ_multimap.h b/C3d/Include/templ_multimap.h index afdc568..0bdf1cd 100644 --- a/C3d/Include/templ_multimap.h +++ b/C3d/Include/templ_multimap.h @@ -94,7 +94,7 @@ private: }; template struct Null { // \ru Нуль указателей. \en Null of pointers. - static inline T* val() { return c3d_null; } + static inline T* val() { return NULL; } }; // \ru LF_Linux: 25.03.11 g++ выдает ошибку на этот код - не использованы KeyType, ValType в полной специализации шаблона. // Однако непонятно, зачем нужна эта полная специализация - общая частичная специализация для тривиальных типов вполне подойдет. @@ -113,9 +113,9 @@ public: Pair * m_MaxPtr; public: - Iterator() : m_Ptr( c3d_null ), m_MaxPtr( c3d_null ) {} + Iterator() : m_Ptr( NULL ), m_MaxPtr( NULL ) {} Iterator( const Iterator & iter ) : m_Ptr( iter.m_Ptr ), m_MaxPtr( iter.m_MaxPtr ) {} - Iterator( const SArray & m_Pairs, const Pair & pair ) : m_Ptr( c3d_null ), m_MaxPtr( c3d_null ) + Iterator( const SArray & m_Pairs, const Pair & pair ) : m_Ptr( NULL ), m_MaxPtr( NULL ) { const size_t count = m_Pairs.Count(); if ( count > 0 ) { @@ -135,10 +135,10 @@ public: } } Iterator( const SArray & m_Pairs, const Iterator & iter1, const Iterator & iter2 ) // range - : m_Ptr( c3d_null ), m_MaxPtr( c3d_null ) + : m_Ptr( NULL ), m_MaxPtr( NULL ) { const size_t count = m_Pairs.Count(); - if ( count > 0 && iter1.m_Ptr != c3d_null ) { + if ( count > 0 && iter1.m_Ptr != NULL ) { size_t idx1 = MultiMap::LowerBoundEx( m_Pairs, iter1.m_Ptr->m_key ); size_t temp = idx1; while ( temp < m_Pairs.Count() && m_Pairs[temp].m_key == iter1.m_Ptr->m_key ) { @@ -149,7 +149,7 @@ public: temp++; } size_t idx2 = SYS_MAX_T; - if ( iter2.m_Ptr != c3d_null ) { + if ( iter2.m_Ptr != NULL ) { idx2 = MultiMap::UpperBoundEx( m_Pairs, iter2.m_Ptr->m_key ); if ( idx2 < m_Pairs.Count() ) { if ( idx2 > 0) diff --git a/C3d/Include/templ_p_array.h b/C3d/Include/templ_p_array.h index ddfc5cc..518df40 100644 --- a/C3d/Include/templ_p_array.h +++ b/C3d/Include/templ_p_array.h @@ -52,13 +52,13 @@ public : PArray() : RPArray() , owns( true ) - , nowDeletedElem(c3d_null) + , nowDeletedElem(0) {} /// \ru Конструктор. \en Constructor. PArray( size_t i_upper, uint16 i_delta = 1, bool shouldDelete = true )//, bool shouldNullSet = false ) : RPArray( i_upper, i_delta )//, shouldNullSet ) , owns( shouldDelete ) - , nowDeletedElem(c3d_null) + , nowDeletedElem(0) {} /// \ru Деструктор. \en Destructor. virtual ~PArray(); @@ -221,7 +221,7 @@ private: // --- template inline PArray::~PArray() { - PRECONDITION( nowDeletedElem == c3d_null ); + PRECONDITION( nowDeletedElem == 0 ); if ( owns ) destroy_array( *this ); } @@ -232,7 +232,7 @@ inline PArray::~PArray() { // --- template inline void PArray::Flush( DelType del ) { - PRECONDITION( nowDeletedElem == c3d_null ); + PRECONDITION( nowDeletedElem == 0 ); if ( del==Delete || (del==defDelete && owns) ) destroy_array( *this ); @@ -289,10 +289,10 @@ inline Type * PArray::RemoveInd( size_t delIndex, DelType del ) { // --- template inline Type * PArray::RemoveObj( Type * delObject, DelType del ) { - PRECONDITION( nowDeletedElem == c3d_null ); // \ru временно, для отладки \en temporarily, for debugging + PRECONDITION( nowDeletedElem == 0 ); // \ru временно, для отладки \en temporarily, for debugging size_t i = find_in_array( *this, delObject ); - return (i != SYS_MAX_T) ? RemoveInd(i, del) : c3d_null; + return (i != SYS_MAX_T) ? RemoveInd(i, del) : 0; } @@ -326,7 +326,7 @@ void destroy_array( PArray & arr ) { // --- template bool set_Parray_size( PArray & arr, size_t newSize, bool clear ) { - PRECONDITION( arr.nowDeletedElem == c3d_null ); // \ru временно \en temporarily + PRECONDITION( arr.nowDeletedElem == 0 ); // \ru временно \en temporarily if ( clear && arr.count ) arr.Flush(); // \ru будет arr.count = 0; \en arr.count will be equal 0; @@ -354,7 +354,7 @@ bool set_Parray_size( PArray & arr, size_t newSize, bool clear ) { // --- //template //inline void PIArray::ForEachI( IteratorFunc func ) const { -// \ru C3D_ASSERT( PArray::nowDeletedElem == c3d_null ); // временно \en C3D_ASSERT( PArray::nowDeletedElem == c3d_null ); // temporarily +// \ru C3D_ASSERT( PArray::nowDeletedElem == 0 ); // временно \en C3D_ASSERT( PArray::nowDeletedElem == 0 ); // temporarily //#if !defined ( __INTEL_COMPILER ) /// for Intel C++ Compiler // for_each_in_array( *this, func ); //#endif // __INTEL_COMPILER @@ -366,7 +366,7 @@ bool set_Parray_size( PArray & arr, size_t newSize, bool clear ) { // --- template inline void PIArray::ForEachI( ParIteratorFunc func, void * pars ) const { - PRECONDITION( PArray::nowDeletedElem == c3d_null ); + PRECONDITION( PArray::nowDeletedElem == 0 ); for_each_in_array( *this, func, pars ); } @@ -376,7 +376,7 @@ inline void PIArray::ForEachI( ParIteratorFunc func, void * pars ) const { // --- template inline size_t PIArray::FirstThatI( CompareFunc func, void * pars, size_t from ) const { - PRECONDITION( PArray::nowDeletedElem == c3d_null ); + PRECONDITION( PArray::nowDeletedElem == 0 ); return first_that_in_array( *this, func, pars, from ); } @@ -386,7 +386,7 @@ inline size_t PIArray::FirstThatI( CompareFunc func, void * pars, size_t f // --- //template //inline void PMIArray::ForEach( IteratorMemFunc func ) const { -// \ru C3D_ASSERT( PArray::nowDeletedElem == c3d_null ); +// \ru C3D_ASSERT( PArray::nowDeletedElem == 0 ); //#if !defined ( __INTEL_COMPILER ) /// for Intel C++ Compiler // for_each_in_array( *this, func ); //#endif // __INTEL_COMPILER @@ -398,7 +398,7 @@ inline size_t PIArray::FirstThatI( CompareFunc func, void * pars, size_t f // --- template inline void PMIArray::ForEach( ParIteratorMemFunc func, void * pars ) const { - PRECONDITION( PArray::nowDeletedElem == c3d_null ); + PRECONDITION( PArray::nowDeletedElem == 0 ); for_each_in_array( *this, func, pars ); } @@ -408,7 +408,7 @@ inline void PMIArray::ForEach( ParIteratorMemFunc func, void * pars ) cons // --- template inline size_t PMIArray::FirstThat( CompareMemFunc func, void * pars, size_t from ) const { - PRECONDITION( PArray::nowDeletedElem == c3d_null ); + PRECONDITION( PArray::nowDeletedElem == 0 ); return first_that_in_array( *this, func, pars, from ); } diff --git a/C3d/Include/templ_p_array_rw.h b/C3d/Include/templ_p_array_rw.h index 0757c5a..4b42c85 100644 --- a/C3d/Include/templ_p_array_rw.h +++ b/C3d/Include/templ_p_array_rw.h @@ -45,7 +45,7 @@ reader & operator >> ( reader & in, PArray & ref ) const Type ** parr = ref.GetAddr(); - if ( parr != c3d_null ) + if ( parr != NULL ) { ref.count = 0; // \ru Err #69421 сколько штук реально прочитано \en Err #69421 how many elements were actually counted @@ -53,7 +53,7 @@ reader & operator >> ( reader & in, PArray & ref ) // \ru поочередное чтение объектов массива \en successive reading of objects from an array for ( i = 0; i < count && in.good(); i++ ) { - Type * el = c3d_null; + Type * el = NULL; in >> el; parr[i] = el; @@ -121,7 +121,7 @@ writer & operator << ( writer& out, const PArray & ref ) template reader & operator >> ( reader & in, PArray *& ptr ) { - ptr = c3d_null; + ptr = NULL; if ( in.good() ) { if ( in.MathVersion() < 0x06000012L ) ptr = new PArray; diff --git a/C3d/Include/templ_pointer.h b/C3d/Include/templ_pointer.h index 0aa987d..dbcd2f3 100644 --- a/C3d/Include/templ_pointer.h +++ b/C3d/Include/templ_pointer.h @@ -11,6 +11,11 @@ #define __TEMPL_POINTER_H +#ifndef NULL +#define NULL 0 +#endif + + #include @@ -38,31 +43,31 @@ public: T & operator * () const { return *P; } operator T* () const { return P; } - int operator ! () const { return (P == c3d_null);} - T * Relinquish() {T * p = P; P = c3d_null; return p;} + int operator ! () const { return (P == NULL);} + T * Relinquish() {T * p = P; P = NULL; return p;} T * Get() { return P; } const T * Get() const { return P; } protected: TPointerBase( T * pointer ) : P(pointer) {} - TPointerBase() : P( c3d_null ) {} + TPointerBase() : P( NULL ) {} protected: T * P; private: void * operator new( size_t ); // prohibit use of new - void operator delete( void * p ) { ((TPointerBase*)p)->P = c3d_null; } + void operator delete( void * p ) { ((TPointerBase*)p)->P = NULL; } // СМВ К15 MVS 2012 private: TPointerBase( const TPointerBase & other ); #ifdef C3D_STANDARD_CXX_11_PARTIAL public: - TPointerBase( TPointerBase && _Right ): P( _Right.P ) { _Right.P = c3d_null; } + TPointerBase( TPointerBase && _Right ): P( _Right.P ) { _Right.P = nullptr; } TPointerBase & operator = ( TPointerBase && _Right ) { if ( this != &_Right ) - { P = _Right.P; _Right.P = c3d_null; } + { P = _Right.P; _Right.P = nullptr; } return *this; } #endif // C3D_STANDARD_CXX_11_PARTIAL @@ -98,8 +103,8 @@ public: } return *this; } - T * operator ->() { return TPointerBase::P; } // Could throw exception if P==c3d_null - const T * operator ->() const { return TPointerBase::P; } // Could throw exception if P==c3d_null + T * operator ->() { return TPointerBase::P; } // Could throw exception if P==0 + const T * operator ->() const { return TPointerBase::P; } // Could throw exception if P==0 // СМВ К15 MVS 2012 #ifndef __MOBILE_VERSION__ @@ -118,7 +123,7 @@ public: { delete TPointerBase::P; TPointerBase::P = _Right.P; - _Right.P = c3d_null; + _Right.P = nullptr; } return *this; } @@ -160,7 +165,7 @@ public: } return *this; } - T * operator ->() { return TPointerBase::P; } // Could throw exception if P==c3d_null + T * operator ->() { return TPointerBase::P; } // Could throw exception if P==0 bool GetOwn() const { return own; } void SetOwn( bool val ) { own = val; } @@ -182,7 +187,7 @@ public: delete TPointerBase::P; TPointerBase::P = _Right.P; own = _Right.own; - _Right.P = c3d_null; + _Right.P = nullptr; } return *this; } @@ -221,7 +226,7 @@ public: } return *this; } - T & operator []( size_t i ) { return TPointerBase::P[i]; } // Could throw exception if P==c3d_null + T & operator []( size_t i ) { return TPointerBase::P[i]; } // Could throw exception if P==0 // СМВ К15 MVS 2012 //private: // g++4.7 KUbuntu @@ -237,7 +242,7 @@ public: { delete[] TPointerBase::P; TPointerBase::P = _Right.P; - _Right.P = c3d_null; + _Right.P = nullptr; } return *this; } @@ -279,7 +284,7 @@ public: { delete[] P; P = _Right.P; - _Right.P = c3d_null; + _Right.P = nullptr; } return *this; } diff --git a/C3d/Include/templ_psrt_array.h b/C3d/Include/templ_psrt_array.h index fcdd487..bf87551 100644 --- a/C3d/Include/templ_psrt_array.h +++ b/C3d/Include/templ_psrt_array.h @@ -108,13 +108,13 @@ public: void DetachRng ( size_t, size_t ); // \ru отцепить из массива диапазон указателей \en detach a range of pointers from array typedef int (*PArSortCompFunc)( const Type **, const Type ** ); - void Sort ( PArSortCompFunc, PArrayReg * = c3d_null ); // \ru быстрая сортировка в любом диапазоне \en quick sorting in any range + void Sort ( PArSortCompFunc, PArrayReg * = NULL ); // \ru быстрая сортировка в любом диапазоне \en quick sorting in any range void Sort ( const void *, PArSortRangeCompFunc, size_t armin = 0, size_t armax = SYS_MAX_T ); // \ru быстрая сортировка в заданном диапазоне \en quick sorting in a given range bool Find ( const Type *, PArSortAddress, size_t &, size_t armin = 0, size_t armax = SYS_MAX_T ); // \ru найти адрес в любом поле объекта \en find address in any field of object bool Find ( const size_t, PArSortAddress, size_t &, size_t armin = 0, size_t armax = SYS_MAX_T ); // \ru найти адрес в любом поле объекта \en find address in any field of object bool Find ( const void *, PArSortObj, size_t &, size_t armin = 0, size_t armax = SYS_MAX_T ); // \ru найти данный объект в сортированном массиве \en find a given object in sorted array - int FindObj ( const Type *, PArSortCompFunc, size_t &, PArrayReg * = c3d_null ) const; // \ru найти данный объект в сортированном массиве \en find a given object in sorted array + int FindObj ( const Type *, PArSortCompFunc, size_t &, PArrayReg * = NULL ) const; // \ru найти данный объект в сортированном массиве \en find a given object in sorted array Type * AddSort ( Type *, PArSortCompFunc, size_t & ); // \ru добавить элемент в сортированном порядке \en add element in sorted order void Inverse (); // \ru инверсия массива \en inversion of array @@ -210,7 +210,7 @@ inline void PArraySort::Insert( size_t index, Type * ent ) template void PArraySort::RemoveRng( size_t startIndex, size_t countRng, DelType del ) { - C3D_ASSERT( PArray::nowDeletedElem == c3d_null ); // \ru ЯТ - временно \en ЯТ - temporarily + C3D_ASSERT( PArray::nowDeletedElem == 0 ); // \ru ЯТ - временно \en ЯТ - temporarily // \ru если диапазон не пуст и индекс принадлежит массиву \en if range is not empty and index belongs to array if ( countRng && startIndex < PArray::count ) { @@ -226,14 +226,14 @@ void PArraySort::RemoveRng( size_t startIndex, size_t countRng, DelType de size_t i = 0; for( const Type ** parr = PArray::GetAddr() + startIndex; i < countRng; i++, parr++ ) { Type * d = (Type*)*parr; - *parr = c3d_null; // \ru сначала обнулим указатель ... \en set pointer to null ... + *parr = 0; // \ru сначала обнулим указатель ... \en set pointer to null ... C3D_ASSERT( !d || PArray::nowDeletedElem != d ); // \ru ЯТ - временно \en ЯТ - temporarily PArray::nowDeletedElem = d; delete d; - PArray::nowDeletedElem = c3d_null; + PArray::nowDeletedElem = 0; } } @@ -293,7 +293,7 @@ inline size_t PArraySort::CalculateDelta() template inline void PArraySort::CatchMemory() { - PRECONDITION( PArray::nowDeletedElem == c3d_null ); // \ru ЯТ - временно \en ЯТ - temporarily + PRECONDITION( PArray::nowDeletedElem == 0 ); // \ru ЯТ - временно \en ЯТ - temporarily if ( PArray::upper == PArray::count ) set_Parray_size( *this, PArray::upper + CalculateDelta(), false/*clear*/ ); } @@ -305,7 +305,7 @@ inline void PArraySort::CatchMemory() template inline void PArraySort::Reserve( size_t n ) { - C3D_ASSERT( PArray::nowDeletedElem == c3d_null ); // \ru ЯТ - временно \en ЯТ - temporarily + C3D_ASSERT( PArray::nowDeletedElem == 0 ); // \ru ЯТ - временно \en ЯТ - temporarily // \ru если требуется памяти больше, чем есть сейчас, и больше, чем оказалось бы \en if there is required more memory that exists at the moment and more than it would become // \ru при следующем захвате, то захватить ее \en on the next allocation then allocate it size_t space = PArray::upper - PArray::count; @@ -320,7 +320,7 @@ inline void PArraySort::Reserve( size_t n ) template inline void PArraySort::Sort( PArSortCompFunc fcmp, PArrayReg * arReg ) { - PRECONDITION( PArray::nowDeletedElem == c3d_null ); // \ru ЯТ - временно \en ЯТ - temporarily + PRECONDITION( PArray::nowDeletedElem == 0 ); // \ru ЯТ - временно \en ЯТ - temporarily if ( PArray::count > 1 ) { // \ru если хотя бы два элемента в массиве \en if there are at least two elements in array typedef int (*QCompFunc)( const void*, const void* ); if ( !arReg ) { @@ -345,7 +345,7 @@ inline void PArraySort::Sort( PArSortCompFunc fcmp, PArrayReg * arReg ) template inline void PArraySort::Sort( const void * obj, PArSortRangeCompFunc fcmp, size_t armin, size_t armax ) { - C3D_ASSERT( PArray::nowDeletedElem == c3d_null ); // \ru ЯТ - временно \en ЯТ - temporarily + C3D_ASSERT( PArray::nowDeletedElem == 0 ); // \ru ЯТ - временно \en ЯТ - temporarily if ( PArray::count > 1 ) { // \ru если хотя бы два элемента в массиве \en if there are at least two elements in array if ( armax > armin ) { // \ru если диапазон сортировки правильный \en if the sorting range is correct if ( armin < PArray::count - 1 ) { // \ru если минимальная граница меньше максимального элемента в массиве \en if the minimum bound is less than the maximum element in array @@ -364,7 +364,7 @@ inline void PArraySort::Sort( const void * obj, PArSortRangeCompFunc fcmp, template void PArraySort::SortRange( const void * obj, PArSortRangeCompFunc fcmp, size_t ilo, size_t ihi ) { - C3D_ASSERT( PArray::nowDeletedElem == c3d_null ); // \ru ЯТ - временно \en ЯТ - temporarily + C3D_ASSERT( PArray::nowDeletedElem == 0 ); // \ru ЯТ - временно \en ЯТ - temporarily size_t lo = ilo; // \ru нижняя граница \en lower bound size_t hi = ihi; // \ru верхняя граница \en upper bound @@ -404,7 +404,7 @@ template inline bool PArraySort::Find( const size_t address, PArSortAddress fadr, size_t & findedAddress, size_t armin, size_t armax ) { - C3D_ASSERT( PArray::nowDeletedElem == c3d_null ); // \ru ЯТ - временно \en ЯТ - temporarily + C3D_ASSERT( PArray::nowDeletedElem == 0 ); // \ru ЯТ - временно \en ЯТ - temporarily bool res = false; findedAddress = SYS_MAX_T/*OV_x64 -1*/; @@ -432,7 +432,7 @@ inline bool PArraySort::Find( const size_t address, PArSortAddress fadr, s template inline bool PArraySort::Find( const Type * member, PArSortAddress fadr, size_t & findedAddress, size_t armin, size_t armax ) { - C3D_ASSERT( PArray::nowDeletedElem == c3d_null ); // \ru ЯТ - временно \en ЯТ - temporarily + C3D_ASSERT( PArray::nowDeletedElem == 0 ); // \ru ЯТ - временно \en ЯТ - temporarily return Find( fadr(member), fadr, findedAddress, armin, armax ); } @@ -443,7 +443,7 @@ inline bool PArraySort::Find( const Type * member, PArSortAddress fadr, si template inline bool PArraySort::Find( const void * obj, PArSortObj fobj, size_t & findedId, size_t armin, size_t armax ) { - C3D_ASSERT( PArray::nowDeletedElem == c3d_null ); // \ru ЯТ - временно \en ЯТ - temporarily + C3D_ASSERT( PArray::nowDeletedElem == 0 ); // \ru ЯТ - временно \en ЯТ - temporarily bool res = false; @@ -472,7 +472,7 @@ inline bool PArraySort::Find( const void * obj, PArSortObj fobj, size_t & template bool PArraySort::FindObject( const void * obj, PArSortObj fobj, size_t & findedId, size_t armin, size_t armax ) { - C3D_ASSERT( PArray::nowDeletedElem == c3d_null ); // \ru ЯТ - временно \en ЯТ - temporarily + C3D_ASSERT( PArray::nowDeletedElem == 0 ); // \ru ЯТ - временно \en ЯТ - temporarily bool res = false; // \ru флаг, который указывает существует ли искомый объект в массиве \en flag which specifies whether the required object is in array @@ -513,7 +513,7 @@ bool PArraySort::FindObject( const void * obj, PArSortObj fobj, size_t & f template bool PArraySort::FindAddress( const size_t address, PArSortAddress fadr, size_t & findedAddress, size_t armin, size_t armax ) { - C3D_ASSERT( PArray::nowDeletedElem == c3d_null ); // \ru ЯТ - временно \en ЯТ - temporarily + C3D_ASSERT( PArray::nowDeletedElem == 0 ); // \ru ЯТ - временно \en ЯТ - temporarily bool res = false; // \ru флаг, который указывает существует ли искомый адресс в массиве \en flag which specifies whether the required address is in array size_t id = armax - armin; // \ru количество элементов в диапазоне \en the number of elements in range @@ -612,7 +612,7 @@ bool PArraySort::FindAddress( const size_t address, PArSortAddress fadr, s template int PArraySort::FindObj( const Type * obj, PArSortCompFunc fcmp, size_t & iFnd, PArrayReg * arReg ) const { - PRECONDITION( PArray::nowDeletedElem == c3d_null ); // \ru ЯТ - временно \en ЯТ - temporarily + PRECONDITION( PArray::nowDeletedElem == 0 ); // \ru ЯТ - временно \en ЯТ - temporarily if ( (PArray::count) > 0 ) { size_t id = PArray::count; // \ru количество элементов в диапазоне \en the number of elements in range id--; @@ -686,7 +686,7 @@ int PArraySort::FindObj( const Type * obj, PArSortCompFunc fcmp, size_t & template inline Type * PArraySort::AddSort( Type * obj, PArSortCompFunc fcmp, size_t & iFnd ) { - PRECONDITION( PArray::nowDeletedElem == c3d_null ); // \ru ЯТ - временно \en ЯТ - temporarily + PRECONDITION( PArray::nowDeletedElem == 0 ); // \ru ЯТ - временно \en ЯТ - temporarily int ires = FindObj( obj, fcmp, iFnd ); if ( (ires == -2) || (ires == 2) ) { iFnd = ( (ires == -2) ? 0 : PArray::count ); @@ -696,7 +696,7 @@ inline Type * PArraySort::AddSort( Type * obj, PArSortCompFunc fcmp, size_ if ( ires == -1 ) AddAt( obj, iFnd ); - return ires ? (*this)/*parr*/[iFnd] : c3d_null; + return ires ? (*this)/*parr*/[iFnd] : NULL; } @@ -706,7 +706,7 @@ inline Type * PArraySort::AddSort( Type * obj, PArSortCompFunc fcmp, size_ template void PArraySort::Inverse() { - C3D_ASSERT( PArray::nowDeletedElem == c3d_null ); // \ru ЯТ - временно \en ЯТ - temporarily + C3D_ASSERT( PArray::nowDeletedElem == 0 ); // \ru ЯТ - временно \en ЯТ - temporarily if ( PArray::count ) { size_t endI = PArray::count - 1; // \ru проверено count > 0 \en count > 0 validated diff --git a/C3d/Include/templ_rp_array.h b/C3d/Include/templ_rp_array.h index 528cb7f..bbf8b7e 100644 --- a/C3d/Include/templ_rp_array.h +++ b/C3d/Include/templ_rp_array.h @@ -105,7 +105,7 @@ public: /// \ru Оператор доступа по индексу. \en Access by index operator. Type *& operator []( size_t loc ) const; /// \ru Получить адрес последнего элемента в массиве. \en Get the address of the last element in the array. - Type * GetLast() const { return ((count > 0) ? parr[count-1] : (Type*)c3d_null); } + Type * GetLast() const { return ((count > 0) ? parr[count-1] : (Type*)NULL); } public: // \ru унификация с вектором STL \en unification with STL vector bool empty() const { return count == 0; } @@ -241,7 +241,7 @@ inline RPArray::RPArray( RPArray && _Right ) _Right.count = 0; _Right.upper = 0; _Right.delta = 1; - _Right.parr = c3d_null; + _Right.parr = nullptr; } //------------------------------------------------------------------------------ @@ -691,7 +691,7 @@ bool set_Rarray_size( RPArray & arr, size_t newSize ) } catch ( ... ) { if ( newSize == 0 )// \ru Не смогли корректно удалить arr.parr. \en Failed to delete arr.parr correctly. - arr.parr = c3d_null; + arr.parr = NULL; C3D_CONTROLED_THROW; return false; } diff --git a/C3d/Include/templ_rp_array_rw.h b/C3d/Include/templ_rp_array_rw.h index b34a3c2..fe85cc2 100644 --- a/C3d/Include/templ_rp_array_rw.h +++ b/C3d/Include/templ_rp_array_rw.h @@ -38,7 +38,7 @@ reader & operator >> ( reader & in, RPArray & ref ) const Type ** parr = ref.GetAddr(); - if ( parr != c3d_null ) { + if ( parr != NULL ) { size_t i; // \ru поочередное чтение объектов массива \en successive reading of objects from an array for ( i = 0; i < count && in.good(); i++ ) { @@ -88,7 +88,7 @@ writer& operator << ( writer& out, const RPArray& ref ) { // --- template reader& operator >> ( reader& in, RPArray*& ptr ) { - ptr = c3d_null; + ptr = NULL; if ( in.good() ) { uint8 existPtr; in >> existPtr; diff --git a/C3d/Include/templ_rp_stack.h b/C3d/Include/templ_rp_stack.h index a71110b..0f01451 100644 --- a/C3d/Include/templ_rp_stack.h +++ b/C3d/Include/templ_rp_stack.h @@ -31,7 +31,7 @@ public: public: void Push( Type & obj ); ///< \ru Добавить элемент в стек. \en Add an element to the stack. - Type * Pop(); ///< \ru Извлечь один элемент стека, если возвращаетя c3d_null, значит достигнуто дно стека. \en Retrieve one element from the stack, if c3d_null is returned then the bottom of stack is reached. + Type * Pop(); ///< \ru Извлечь один элемент стека, если возвращаетя NULL, значит достигнуто дно стека. \en Retrieve one element from the stack, if NULL is returned then the bottom of stack is reached. Type * Top() const; ///< \ru Верхний элемент стека. \en The top element of the stack. // \ru Оставить доступными следующие методы: \en Leave an access to the next methods: @@ -65,7 +65,7 @@ Type * RPStack::Pop() { RPArray::count--; return ret; } - return c3d_null; + return NULL; } @@ -77,7 +77,7 @@ Type * RPStack::Top() const { if ( RPArray::count > 0 ) { return (*this)[RPArray::count-1]; } - return c3d_null; + return NULL; } diff --git a/C3d/Include/templ_rw_operator.h b/C3d/Include/templ_rw_operator.h index aefad2e..7647336 100644 --- a/C3d/Include/templ_rw_operator.h +++ b/C3d/Include/templ_rw_operator.h @@ -21,7 +21,7 @@ template inline reader & ReadPtrByRefDCtor ( reader & in, Type *& ptr ) { - ptr = c3d_null; + ptr = NULL; char exist; in >> exist; @@ -42,7 +42,7 @@ inline reader & ReadPtrByRefDCtor ( reader & in, Type *& ptr ) template inline reader & ReadPtrByRefRWCtor ( reader & in, Type *& ptr ) { - ptr = c3d_null; + ptr = NULL; char exist; in >> exist; @@ -62,7 +62,7 @@ inline reader & ReadPtrByRefRWCtor ( reader & in, Type *& ptr ) template inline writer & WritePtrByRef ( writer & out, const Type * ptr ) { - char exist = (ptr != c3d_null); + char exist = (ptr != NULL); out << exist; if ( exist ) diff --git a/C3d/Include/templ_s_array.h b/C3d/Include/templ_s_array.h index b26b7ea..7696137 100644 --- a/C3d/Include/templ_s_array.h +++ b/C3d/Include/templ_s_array.h @@ -390,19 +390,13 @@ inline bool SArray::AddMemory( size_t n ) { template inline void SArray::resize( size_t n, Type val ) { - if ( n > count ) { - size_t n0 = count; - if ( AddItems( n - count ) != 0 ) { - if ( parr != c3d_null ) { - for ( size_t k = n0; k < n; ++k ) - parr[k] = val; - } + size_t n0 = count; + if ( AddItems(n) != 0 ) { + if ( parr != NULL ) { + for ( size_t k = n0; k < count; k++ ) + parr[k] = val; } } - else if ( n < count ) { - count = n; - Adjust(); - } } @@ -423,7 +417,7 @@ template inline Type * SArray::Add() { if ( CatchMemory() ) return &parr[ count++ ]; - return c3d_null; + return NULL; } @@ -444,7 +438,7 @@ inline Type * SArray::Add( const Type & ent ) { if ( CatchMemory() ) return static_cast( memcpy(static_cast(parr+count++), static_cast(&ent), sizeof(Type)) ); - return c3d_null; + return NULL; } @@ -461,7 +455,7 @@ inline Type * SArray::AddAfter( const Type & ent, size_t index ) { return (Type*)memcpy( parr + index + 1, &ent, sizeof(Type) ); } - return c3d_null; + return NULL; } @@ -483,7 +477,7 @@ inline Type * SArray::InsertInd( size_t index, const Type & ent ) { return (Type*)memcpy( parr + index, &ent, sizeof(Type) ); // \ru записываем новый элемент \en writing new element } - return c3d_null; + return NULL; } @@ -501,7 +495,7 @@ inline Type * SArray::InsertInd( size_t index ) { return (Type*)( parr + index ); // \ru записываем новый элемент \en writing new element } - return c3d_null; + return NULL; } @@ -825,7 +819,7 @@ bool set_array_size( SArray & arr, size_t newSize, bool clear ) #else //YYK V15 #77319 Type * p_tmp = newSize ? (Type*)new char[ newSize * sizeOfType ] : 0; #ifdef C3D_WINDOWS //_MSC_VER // win - Type * p_tmp = newSize ? (Type*)_aligned_malloc( newSize * sizeOfType, 16 ) : c3d_null; + Type * p_tmp = newSize ? (Type*)_aligned_malloc( newSize * sizeOfType, 16 ) : NULL; #else Type * p_tmp = newSize ? (Type*)new char[newSize * sizeOfType] : 0; #endif // win @@ -857,7 +851,7 @@ bool set_array_size( SArray & arr, size_t newSize, bool clear ) } catch ( ... ) { if ( newSize == 0 ) { // \ru Не смогли корректно удалить arr.parr. \en Failed to delete arr.parr correctly. - arr.parr = c3d_null; + arr.parr = NULL; arr.upper = newSize; } newSize = 0; // \ru т.к. ниже есть код с применением newSize \en because there is a code with using of newSize below diff --git a/C3d/Include/templ_s_array_rw.h b/C3d/Include/templ_s_array_rw.h index 5527664..75d9eaf 100644 --- a/C3d/Include/templ_s_array_rw.h +++ b/C3d/Include/templ_s_array_rw.h @@ -41,7 +41,7 @@ reader & operator >> ( reader & in, SArray & ref ) ref.SetSize( count, true/*clear*/ ); C3D_ASSERT( ref.upper >= count ); - if ( ref.GetAddr() != c3d_null ) { + if ( ref.GetAddr() != NULL ) { size_t i; for ( i = 0; i < count && in.good(); i++ ) { @@ -95,7 +95,7 @@ writer& operator << ( writer& out, const SArray& ref ) { // template reader& operator >> ( reader& in, SArray*& ptr ) { - ptr = c3d_null; + ptr = NULL; if ( in.good() ) { if ( in.MathVersion() < 0x06000012L ) ptr = new SArray; diff --git a/C3d/Include/templ_s_list.h b/C3d/Include/templ_s_list.h index de0460d..77af271 100644 --- a/C3d/Include/templ_s_list.h +++ b/C3d/Include/templ_s_list.h @@ -101,10 +101,10 @@ public: explicit List( bool ownsEl = true ) : owns( ownsEl ) , count( 0 ) - , first( c3d_null ) - , last( c3d_null ) - , nowDelItem( c3d_null ) - , nowDelElem( c3d_null ) + , first( 0 ) + , last( 0 ) + , nowDelItem( 0 ) + , nowDelElem( 0 ) {} virtual ~List(); @@ -138,21 +138,21 @@ public: void Split(); // \ru разомкнуть список \en split the list size_t Count() const { - PRECONDITION( nowDelItem == c3d_null && nowDelElem == c3d_null ); + PRECONDITION( nowDelItem == 0 && nowDelElem == 0 ); return count; } // \ru дать количество элементов в списке \en get the number of elements in the list size_t ReCalc() { return recalc_list(*this); }// \ru пересчитать количество элементов в списке \en count the number of elements in the list bool IsEmpty () const { - PRECONDITION( nowDelItem == c3d_null && nowDelElem == c3d_null ); + PRECONDITION( nowDelItem == 0 && nowDelElem == 0 ); return first == 0; } // \ru проверить, пустой ли список \en check whether the list is empty bool IsExist( const Type * d ) const { return is_exist_in_list(*this, d);} // \ru найти элемент по равенству указателей \en find an element by the equality of pointers Type * GetFirstData() const { - PRECONDITION( nowDelItem == c3d_null && nowDelElem == c3d_null ); + PRECONDITION( nowDelItem == 0 && nowDelElem == 0 ); PRECONDITION( first ); return first->data; } // \ru получить данные первого элемента списка \en get the data of the first element of the list Type * GetLastData() const { - PRECONDITION( nowDelItem == c3d_null && nowDelElem == c3d_null ); + PRECONDITION( nowDelItem == 0 && nowDelElem == 0 ); PRECONDITION( last ); return last->data; } // \ru получить данные последнего элемента списка \en get the data of the last element of the list protected: @@ -223,26 +223,26 @@ protected: ListItem * prev; public: - LIterator() : list( c3d_null ), curr( c3d_null ), prev( c3d_null ) {} - LIterator( const List & l ) : list( c3d_null ), curr( c3d_null ), prev( c3d_null ) { Set(l); } + LIterator() : list( 0 ), curr( 0 ), prev( 0 ) {} + LIterator( const List & l ) : list( 0 ), curr( 0 ), prev( 0 ) { Set(l); } LIterator( const LIterator &i ) : list( i.list ), curr( i.curr ), prev( i.prev ) {} virtual ~LIterator() {} void Set( const List& l ) { list = (List*)&l; Restart(); } - void Restart() { PRECONDITION(list); curr = list->first; prev = c3d_null; } - Type * GetData() const { return curr ? curr->data : c3d_null; } + void Restart() { PRECONDITION(list); curr = list->first; prev = 0; } + Type * GetData() const { return curr ? curr->data : 0; } Type * GetDataAndGo(); // \ru взять данные и продвинуть итератор \en take the data and move the iterator List * GetList() const { return list; } Type& operator* () const { PRECONDITION(curr && curr->data ); return *curr->data; } - Type* operator () () const { return curr ? curr->data : c3d_null; } + Type* operator () () const { return curr ? curr->data : 0; } operator ListItem* () const { return curr; } operator ListItem& () const { PRECONDITION(curr); return *curr; } - Type* operator ++() { prev = curr; if (curr) {curr=curr->next; return curr ? curr->data : c3d_null;} else return c3d_null; } - Type* operator ++(int) { prev = curr; if (curr) {Type* ret=curr->data; curr=curr->next; return ret;} else return c3d_null; } - Type* operator --() { PRECONDITION(list); curr=prev; prev=list->findPrev(prev); return curr ? curr->data : c3d_null; } - Type* operator --(int) { PRECONDITION(list); if (curr) {Type* ret=curr->data; curr=prev; prev=list->findPrev(prev); return ret;} else return c3d_null; } - Type* operator ->() { return curr ? curr->data : c3d_null; } + Type* operator ++() { prev = curr; if (curr) {curr=curr->next; return curr ? curr->data : 0;} else return 0; } + Type* operator ++(int) { prev = curr; if (curr) {Type* ret=curr->data; curr=curr->next; return ret;} else return 0; } + Type* operator --() { PRECONDITION(list); curr=prev; prev=list->findPrev(prev); return curr ? curr->data : 0; } + Type* operator --(int) { PRECONDITION(list); if (curr) {Type* ret=curr->data; curr=prev; prev=list->findPrev(prev); return ret;} else return 0; } + Type* operator ->() { return curr ? curr->data : 0; } bool operator == ( const LIterator &o ) const { return list==o.list && curr==o.curr; } bool operator != ( const LIterator &o ) const { return ! operator == (o); } @@ -258,7 +258,7 @@ public: void Remove( DelType = defDelete ); // \ru удалить элемент списка и продвинуть вперед \en delete an element from the list and move forward void Detach(); // \ru отсоединить элемент списка \en detach an element from the list - bool IsOK() const { return curr != c3d_null; } + bool IsOK() const { return curr != 0; } ListItem * Next() const { PRECONDITION(curr); return curr->next; } void Go() { prev = curr; if ( curr ) curr = curr->next; } void GoLast() { PRECONDITION(list); curr = list->last; prev = list->findPrev(curr); } @@ -279,7 +279,7 @@ public: //--- template inline List::~List() { - PRECONDITION( nowDelItem == c3d_null && nowDelElem == c3d_null ); + PRECONDITION( nowDelItem == 0 && nowDelElem == 0 ); Remove(); } @@ -290,7 +290,7 @@ inline List::~List() { //--- template inline void List::Add( Type* data ) { - PRECONDITION( nowDelItem == c3d_null && nowDelElem == c3d_null ); + PRECONDITION( nowDelItem == 0 && nowDelElem == 0 ); if ( last ) last = new ListItem( data, *last ); @@ -306,7 +306,7 @@ inline void List::Add( Type* data ) { //--- template inline void List::Add( Type* data, const Type* after ) { - PRECONDITION( nowDelItem == c3d_null && nowDelElem == c3d_null ); + PRECONDITION( nowDelItem == 0 && nowDelElem == 0 ); add_to_list( *this, data, after ); } @@ -318,7 +318,7 @@ inline void List::Add( Type* data, const Type* after ) { template inline void List::Add( Type * data, bool /*check*/ ) { - PRECONDITION( nowDelItem == c3d_null && nowDelElem == c3d_null ); + PRECONDITION( nowDelItem == 0 && nowDelElem == 0 ); if ( !IsExist(data) ) Add( data ); } @@ -330,8 +330,8 @@ inline void List::Add( Type * data, bool /*check*/ ) template inline void List::Add( ListItem & item ) { - PRECONDITION( nowDelItem == c3d_null && nowDelElem == c3d_null ); - item.next = c3d_null; + PRECONDITION( nowDelItem == 0 && nowDelElem == 0 ); + item.next = 0; if ( last ) last->next = &item; @@ -350,7 +350,7 @@ inline void List::Add( ListItem & item ) template inline void List::AddAndEat( List & list ) { - PRECONDITION( nowDelItem == c3d_null && nowDelElem == c3d_null ); + PRECONDITION( nowDelItem == 0 && nowDelElem == 0 ); if ( list.first ) { @@ -365,7 +365,7 @@ inline void List::AddAndEat( List & list ) count += list.count; list.count = 0; - list.first = list.last = c3d_null; + list.first = list.last = 0; } } @@ -376,7 +376,7 @@ inline void List::AddAndEat( List & list ) template inline void List::Insert( Type * data ) { - PRECONDITION( nowDelItem == c3d_null && nowDelElem == c3d_null ); + PRECONDITION( nowDelItem == 0 && nowDelElem == 0 ); Insert( *new ListItem(data) ); } @@ -387,7 +387,7 @@ inline void List::Insert( Type * data ) template inline void List::Insert( ListItem & item ) { - PRECONDITION( nowDelItem == c3d_null && nowDelElem == c3d_null ); + PRECONDITION( nowDelItem == 0 && nowDelElem == 0 ); ListItem* old = first; @@ -407,7 +407,7 @@ inline void List::Insert( ListItem & item ) template inline void List::InsertAndEat( List & list ) { - PRECONDITION( nowDelItem == c3d_null && nowDelElem == c3d_null ); + PRECONDITION( nowDelItem == 0 && nowDelElem == 0 ); if ( list.first ) { if ( first ) { @@ -422,7 +422,7 @@ inline void List::InsertAndEat( List & list ) count += list.count; list.count = 0; - list.first = list.last = c3d_null; + list.first = list.last = 0; } } @@ -433,13 +433,13 @@ inline void List::InsertAndEat( List & list ) template inline bool List::Remove( Type * del, DelType shdl ) { - PRECONDITION( nowDelItem == c3d_null && nowDelElem == c3d_null ); + PRECONDITION( nowDelItem == 0 && nowDelElem == 0 ); if ( Detach(del) ) { if ( shdl==Delete || (shdl==defDelete && owns) ) { nowDelElem = del; delete del; - nowDelElem = c3d_null; + nowDelElem = NULL; } return true; @@ -455,7 +455,7 @@ inline bool List::Remove( Type * del, DelType shdl ) template inline void List::Close() { - PRECONDITION( nowDelItem == c3d_null && nowDelElem == c3d_null ); + PRECONDITION( nowDelItem == 0 && nowDelElem == 0 ); if ( last ) last->next = first; } @@ -467,9 +467,9 @@ inline void List::Close() template inline void List::Split() { - PRECONDITION( nowDelItem == c3d_null && nowDelElem == c3d_null ); + PRECONDITION( nowDelItem == 0 && nowDelElem == 0 ); if ( last ) - last->next = c3d_null; + last->next = 0; } @@ -485,7 +485,7 @@ inline void List::Split() template inline Type * LIterator::GetDataAndGo() { - PRECONDITION( list && list->nowDelItem == c3d_null && list->nowDelElem == c3d_null ); + PRECONDITION( list && list->nowDelItem == 0 && list->nowDelElem == 0 ); if ( curr ) { Type * ret = curr->data; @@ -494,7 +494,7 @@ inline Type * LIterator::GetDataAndGo() return ret; } - return c3d_null; + return 0; } @@ -504,7 +504,7 @@ inline Type * LIterator::GetDataAndGo() template inline void LIterator::Add( Type * data ) { - PRECONDITION( list && list->nowDelItem == c3d_null && list->nowDelElem == c3d_null ); + PRECONDITION( list && list->nowDelItem == 0 && list->nowDelElem == 0 ); if ( list ) { if ( curr ) { @@ -525,7 +525,7 @@ inline void LIterator::Add( Type * data ) template inline void LIterator::AddAndEat( List & l ) { - PRECONDITION( list && list->nowDelItem == c3d_null && list->nowDelElem == c3d_null ); + PRECONDITION( list && list->nowDelItem == 0 && list->nowDelElem == 0 ); if ( list && l.first ) { @@ -539,7 +539,7 @@ inline void LIterator::AddAndEat( List & l ) list->count += l.count; l.count = 0; - l.first = l.last = c3d_null; + l.first = l.last = 0; } else list->AddAndEat( l ); // \ru съесть список l в конец данного списка \en destroy a list l and add it to the end of the given list @@ -553,7 +553,7 @@ inline void LIterator::AddAndEat( List & l ) template inline void LIterator::Insert( Type * data ) { - PRECONDITION( list && list->nowDelItem == c3d_null && list->nowDelElem == c3d_null ); + PRECONDITION( list && list->nowDelItem == 0 && list->nowDelElem == 0 ); if ( list ) { if ( prev ) { @@ -577,7 +577,7 @@ inline void LIterator::Insert( Type * data ) template inline void LIterator::InsertAndEat( List & l ) { - PRECONDITION( list && list->nowDelItem == c3d_null && list->nowDelElem == c3d_null ); + PRECONDITION( list && list->nowDelItem == 0 && list->nowDelElem == 0 ); if ( list && l.first ) { @@ -590,7 +590,7 @@ inline void LIterator::InsertAndEat( List & l ) list->count += l.count; l.count = 0; - l.first = l.last = c3d_null; + l.first = l.last = 0; } else list->InsertAndEat( l ); // \ru съесть список l в конец данного списка \en destroy a list l and add it to the end of the given list @@ -604,13 +604,13 @@ inline void LIterator::InsertAndEat( List & l ) template inline void LIterator::Remove( DelType shdl ) { - PRECONDITION( list && list->nowDelItem == c3d_null && list->nowDelElem == c3d_null ); + PRECONDITION( list && list->nowDelItem == 0 && list->nowDelElem == 0 ); if ( list && curr ) { if ( shdl==Delete || (shdl==defDelete && list->owns) ) { list->nowDelElem = curr->data; delete curr->data; - list->nowDelElem = c3d_null; + list->nowDelElem = 0; } Detach(); @@ -624,7 +624,7 @@ inline void LIterator::Remove( DelType shdl ) template inline void LIterator::Detach() { - PRECONDITION( list && list->nowDelItem == c3d_null && list->nowDelElem == c3d_null ); + PRECONDITION( list && list->nowDelItem == 0 && list->nowDelElem == 0 ); if ( list && curr ) { ListItem* next = curr->next; @@ -639,7 +639,7 @@ inline void LIterator::Detach() list->nowDelItem = curr; delete curr; - list->nowDelItem = c3d_null; + list->nowDelItem = 0; curr = next; prev = list->findPrev( curr ); @@ -652,7 +652,7 @@ inline void LIterator::Detach() template void add_to_list( List & list, Type * data, const Type * after ) { - PRECONDITION( list.nowDelItem == c3d_null && list.nowDelElem == c3d_null ); + PRECONDITION( list.nowDelItem == 0 && list.nowDelElem == 0 ); if ( after ) { ListItem *c = list.first; @@ -678,8 +678,8 @@ void add_to_list( List & list, Type * data, const Type * after ) template void add_to_list( List & to, List & from ) { - PRECONDITION( to.nowDelItem == c3d_null && to.nowDelElem == c3d_null ); - PRECONDITION( from.nowDelItem == c3d_null && from.nowDelElem == c3d_null ); + PRECONDITION( to.nowDelItem == 0 && to.nowDelElem == 0 ); + PRECONDITION( from.nowDelItem == 0 && from.nowDelElem == 0 ); ListItem *curr = from.first; while ( curr ) { @@ -696,8 +696,8 @@ void add_to_list( List & to, List & from ) template void insert_to_list( List & to, List & from ) { - PRECONDITION( to.nowDelItem == c3d_null && to.nowDelElem == c3d_null ); - PRECONDITION( from.nowDelItem == c3d_null && from.nowDelElem == c3d_null ); + PRECONDITION( to.nowDelItem == 0 && to.nowDelElem == 0 ); + PRECONDITION( from.nowDelItem == 0 && from.nowDelElem == 0 ); ListItem *curr = from.first; while ( curr ) { @@ -716,13 +716,13 @@ void insert_to_list( List & to, List & from ) template void remove_from_list( List & list, DelType shdl ) { - PRECONDITION( list.nowDelItem == c3d_null && list.nowDelElem == c3d_null ); + PRECONDITION( list.nowDelItem == 0 && list.nowDelElem == 0 ); bool del = shdl==Delete || (shdl==defDelete && list.owns); ListItem *first = list.first; - list.first = c3d_null; - list.last = c3d_null; + list.first = 0; + list.last = 0; list.count = 0; while ( first ) { ListItem *temp = first; @@ -731,12 +731,12 @@ void remove_from_list( List & list, DelType shdl ) if ( del ) { list.nowDelElem = temp->data; delete temp->data; - list.nowDelElem = c3d_null; + list.nowDelElem = 0; } list.nowDelItem = temp; delete temp; - list.nowDelItem = c3d_null; + list.nowDelItem = 0; } } @@ -747,11 +747,11 @@ void remove_from_list( List & list, DelType shdl ) template void remove_from_list_release( List & list ) { - PRECONDITION( list.nowDelItem == c3d_null && list.nowDelElem == c3d_null ); + PRECONDITION( list.nowDelItem == 0 && list.nowDelElem == 0 ); ListItem *first = list.first; - list.first = c3d_null; - list.last = c3d_null; + list.first = 0; + list.last = 0; list.count = 0; while ( first ) { ListItem *temp = first; @@ -760,11 +760,11 @@ void remove_from_list_release( List & list ) list.nowDelElem = temp->data; if ( temp->data ) temp->data->Release(); - list.nowDelElem = c3d_null; + list.nowDelElem = 0; list.nowDelItem = temp; delete temp; - list.nowDelItem = c3d_null; + list.nowDelItem = 0; } } @@ -776,8 +776,8 @@ template size_t remove_from_list( List & list, List & deList, DelType shdl ) { PRECONDITION( &list != &deList ); - PRECONDITION( list.nowDelItem == c3d_null && list.nowDelElem == c3d_null ); - PRECONDITION( deList.nowDelItem == c3d_null && deList.nowDelElem == c3d_null ); + PRECONDITION( list.nowDelItem == 0 && list.nowDelElem == 0 ); + PRECONDITION( deList.nowDelItem == 0 && deList.nowDelElem == 0 ); if ( !list.first || !deList.first ) // \ru какой-то из списков пуст ! \en one of the lists is empty ! return 0; @@ -788,7 +788,7 @@ size_t remove_from_list( List & list, List & deList, DelType shdl ) ListItem *curr = list.first; // \ru начнем сначала \en start from the beginning ListItem *prev = list.last; ListItem *del = deList.first; // \ru текущий удаляемый \en the current deleted - ListItem *pdel = c3d_null; // \ru предыдущий удаляемый \en the previous deleted + ListItem *pdel = NULL; // \ru предыдущий удаляемый \en the previous deleted size_t deleted = 0; // \ru отцепленных 0 \en there are 0 detached while( del && list.first ) { // \ru есть еще пока чего удалять и откуда \en there are elements to delete @@ -801,8 +801,8 @@ size_t remove_from_list( List & list, List & deList, DelType shdl ) if ( list.first == list.last ) { // \ru если всего один элемент, то ничего не останется \en if there is only one element then nothing will be left list.count = 0; - list.first = c3d_null; - list.last = c3d_null; + list.first = NULL; + list.last = NULL; // \ru curr продвигать не нужно - все равно заканчиваем \en 'curr' should not be moved } else { @@ -820,12 +820,12 @@ size_t remove_from_list( List & list, List & deList, DelType shdl ) if ( willDel ) { // \ru если надо - удалим данные \en delete the data if it is necessary list.nowDelElem = condemned->data; delete condemned->data; - list.nowDelElem = c3d_null; + list.nowDelElem = 0; } list.nowDelItem = condemned; delete condemned; // \ru удалим квартиру \en delete condemned - list.nowDelItem = c3d_null; + list.nowDelItem = 0; deleted++; // \ru еще один удалили \en another one has been deleted break; @@ -849,7 +849,7 @@ size_t remove_from_list( List & list, List & deList, DelType shdl ) deList.nowDelItem = del; delete del; // \ru помним, что данные мы уже удалили \en remember that the data has already been deleted - deList.nowDelItem = c3d_null; + deList.nowDelItem = 0; deList.count--; } @@ -860,7 +860,7 @@ size_t remove_from_list( List & list, List & deList, DelType shdl ) } if ( list.last ) - list.last->next = c3d_null; // \ru разорвать список \en split the list + list.last->next = 0; // \ru разорвать список \en split the list return deleted; } @@ -870,10 +870,10 @@ size_t remove_from_list( List & list, List & deList, DelType shdl ) template bool detach_from_list( List & from, const Type * del ) { - PRECONDITION( from.nowDelItem == c3d_null && from.nowDelElem == c3d_null ); + PRECONDITION( from.nowDelItem == 0 && from.nowDelElem == 0 ); ListItem* curr = from.first; - ListItem* prev = c3d_null; + ListItem* prev = 0; while( curr ) { if ( curr->data == del ) { // \ru нашли \en found @@ -888,7 +888,7 @@ bool detach_from_list( List & from, const Type * del ) from.nowDelItem = curr; delete curr; - from.nowDelItem = c3d_null; + from.nowDelItem = 0; from.count--; return true; @@ -907,7 +907,7 @@ bool detach_from_list( List & from, const Type * del ) template size_t recalc_list( List & list ) { - PRECONDITION( list.nowDelItem == c3d_null && list.nowDelElem == c3d_null ); + PRECONDITION( list.nowDelItem == 0 && list.nowDelElem == 0 ); list.count = 0; ListItem *curr = list.first; @@ -923,7 +923,7 @@ size_t recalc_list( List & list ) template bool is_exist_in_list( const List & list, const Type * what ) { - PRECONDITION( list.nowDelItem == c3d_null && list.nowDelElem == c3d_null ); + PRECONDITION( list.nowDelItem == 0 && list.nowDelElem == 0 ); bool exist = false; ListItem * curr = list.first; @@ -940,7 +940,7 @@ bool is_exist_in_list( const List & list, const Type * what ) template ListItem * find_prev_in_list( const List & list, ListItem * now ) { - PRECONDITION( list.nowDelItem == c3d_null && list.nowDelElem == c3d_null ); + PRECONDITION( list.nowDelItem == 0 && list.nowDelElem == 0 ); if ( now ) { ListItem *tmp = list.first; @@ -949,7 +949,7 @@ ListItem * find_prev_in_list( const List & list, ListItem * no return tmp; } - return c3d_null; + return 0; } diff --git a/C3d/Include/templ_s_queue.h b/C3d/Include/templ_s_queue.h index 20b96ad..100802c 100644 --- a/C3d/Include/templ_s_queue.h +++ b/C3d/Include/templ_s_queue.h @@ -113,17 +113,17 @@ private: // --- template SQueue::SQueue( size_t capacity ) - : data( c3d_null ) - , qlast( c3d_null ) - , qp1( c3d_null ) - , qp2( c3d_null ) + : data( NULL ) + , qlast( NULL ) + , qp1( NULL ) + , qp2( NULL ) { if ( capacity > 0 ) { try { data = new Type[capacity]; } catch ( const std::bad_alloc & ) { - data = c3d_null; + data = NULL; throw; } } @@ -212,7 +212,7 @@ inline Type & SQueue::First() const template inline bool SQueue::IsFull() const { - return data == c3d_null || _IncPtr( qp2 ) == qp1; + return data == NULL || _IncPtr( qp2 ) == qp1; } @@ -336,7 +336,7 @@ bool SQueue::_NewCapacity( size_t max_len, bool clear ) { try { delete [] data; - data = qlast = qp1 = qp2 = c3d_null; + data = qlast = qp1 = qp2 = NULL; if ( max_len > 0 ) { data = new Type[max_len]; qlast = data + max_len - 1; @@ -344,7 +344,7 @@ bool SQueue::_NewCapacity( size_t max_len, bool clear ) } } catch ( ... ) { - data = qlast = qp1 = qp2 = c3d_null; + data = qlast = qp1 = qp2 = NULL; C3D_CONTROLED_THROW; return false; } @@ -352,7 +352,7 @@ bool SQueue::_NewCapacity( size_t max_len, bool clear ) else { PRECONDITION( qp1 != qp2 && max_len>0 && clear == false ); // \ru Выражение обязано быть истинным \en The expression should be true - Type * n_data = c3d_null; + Type * n_data = NULL; try { n_data = new Type[max_len]; if ( qp1 < qp2 ) // \ru Вариант без фрагментации \en A variant without fragmentation diff --git a/C3d/Include/templ_sfdp_array.h b/C3d/Include/templ_sfdp_array.h index 79d0277..8afd418 100644 --- a/C3d/Include/templ_sfdp_array.h +++ b/C3d/Include/templ_sfdp_array.h @@ -145,8 +145,8 @@ using RPArray::back; \en Find the index of the element using the comparison function. \details \ru Найти индекс элемента, используя функцию сравнения. \en Find the index of the element using the comparison function. - \return \ru Вернет точно найденный элемент или c3d_null, если элемент не найден. - \en Returns the found element or c3d_null, if element not found. + \return \ru Вернет точно найденный элемент или NULL, если элемент не найден. + \en Returns the found element or NULL, if element not found. */ Type * FindExact ( const Type & el ) const; @@ -240,7 +240,7 @@ inline SFDPArray::~SFDPArray() {} // --- template bool SFDPArray::Init( const SFDPArray & other ) { - PRECONDITION( FDPArray::nowDeletedElem == c3d_null ); // \ru ЯТ - временно \en ЯТ - temporarily + PRECONDITION( FDPArray::nowDeletedElem == 0 ); // \ru ЯТ - временно \en ЯТ - temporarily Flush(); // \ru сбросить себя \en reset itself @@ -253,7 +253,7 @@ bool SFDPArray::Init( const SFDPArray & other ) { // --- template inline size_t SFDPArray::AddTry( Type& ent, Type *&found ) { - PRECONDITION( FDPArray::nowDeletedElem == c3d_null ); // \ru ЯТ - временно \en ЯТ - temporarily + PRECONDITION( FDPArray::nowDeletedElem == 0 ); // \ru ЯТ - временно \en ЯТ - temporarily // \ru CatchMemory(); ЯТ \en CatchMemory(); ЯТ bool added = true; @@ -267,10 +267,10 @@ inline size_t SFDPArray::AddTry( Type& ent, Type *&found ) { // --- template inline bool SFDPArray::AddExact( Type& ent ) { - PRECONDITION( FDPArray::nowDeletedElem == c3d_null ); // \ru ЯТ - временно \en ЯТ - temporarily + PRECONDITION( FDPArray::nowDeletedElem == 0 ); // \ru ЯТ - временно \en ЯТ - temporarily // \ru CatchMemory(); ЯТ \en CatchMemory(); ЯТ - Type * found = c3d_null; + Type * found = NULL; bool added = true; add_to_array( *this, ent, found, added ); return ( &ent == found ); // \ru вернет true - добавлен, false - не добавлен \en if returns true then the element has been added, it has not been added otherwise @@ -283,10 +283,10 @@ inline bool SFDPArray::AddExact( Type& ent ) { // --- template inline bool SFDPArray::AddIfNotExist( Type& ent ) { - PRECONDITION( FDPArray::nowDeletedElem == c3d_null ); // \ru ЯТ - временно \en ЯТ - temporarily + PRECONDITION( FDPArray::nowDeletedElem == 0 ); // \ru ЯТ - временно \en ЯТ - temporarily // \ru CatchMemory(); ЯТ \en CatchMemory(); ЯТ - Type * found = c3d_null; + Type * found = NULL; bool added = true; add_to_array( *this, ent, found, added ); return ( added ); // \ru вернет true - добавлен, false - не добавлен \en if returns true then the element has been added, it has not been added otherwise @@ -298,7 +298,7 @@ inline bool SFDPArray::AddIfNotExist( Type& ent ) { // --- template inline size_t SFDPArray::FindNearest( const Type &el, Type *&found ) const { - PRECONDITION( FDPArray::nowDeletedElem == c3d_null ); // \ru ЯТ - временно \en ЯТ - temporarily + PRECONDITION( FDPArray::nowDeletedElem == 0 ); // \ru ЯТ - временно \en ЯТ - temporarily return find_in_array( *this, el, found ); } @@ -309,10 +309,10 @@ inline size_t SFDPArray::FindNearest( const Type &el, Type *&found ) const // --- template inline Type * SFDPArray::FindExact( const Type &el ) const { - PRECONDITION( FDPArray::nowDeletedElem == c3d_null ); // \ru ЯТ - временно \en ЯТ - temporarily - Type * found = c3d_null; + PRECONDITION( FDPArray::nowDeletedElem == 0 ); // \ru ЯТ - временно \en ЯТ - temporarily + Type * found = NULL; size_t foundInd = find_in_array( *this, el, found ); - return ( foundInd != SYS_MAX_T ) ? found : c3d_null; + return ( foundInd != SYS_MAX_T ) ? found : NULL; } @@ -321,13 +321,13 @@ inline Type * SFDPArray::FindExact( const Type &el ) const { // --- template inline Type* SFDPArray::RemoveObj( Type *delObject, DelType del ) { - PRECONDITION( FDPArray::nowDeletedElem == c3d_null ); // \ru ЯТ - временно \en ЯТ - temporarily + PRECONDITION( FDPArray::nowDeletedElem == 0 ); // \ru ЯТ - временно \en ЯТ - temporarily if ( !delObject ) - return c3d_null; + return NULL; - Type * found = c3d_null; + Type * found = NULL; size_t i = find_in_array( *this, *delObject, found ); - return ( i != SYS_MAX_T ) ? RemoveInd(i, del) : c3d_null; + return ( i != SYS_MAX_T ) ? RemoveInd(i, del) : 0; } @@ -338,7 +338,7 @@ template inline bool SFDPArray::DetachObj( const Type *delObject ) { if ( !delObject ) return false; - Type * found = c3d_null; + Type * found = NULL; size_t i = find_in_array( *this, *delObject, found ); if ( i != SYS_MAX_T ) { @@ -355,8 +355,8 @@ inline bool SFDPArray::DetachObj( const Type *delObject ) { // --- template inline bool SFDPArray::IsExist( const Type &el ) const { - PRECONDITION( FDPArray::nowDeletedElem == c3d_null ); // \ru ЯТ - временно \en ЯТ - temporarily - Type * found = c3d_null; + PRECONDITION( FDPArray::nowDeletedElem == 0 ); // \ru ЯТ - временно \en ЯТ - temporarily + Type * found = NULL; return find_in_array( *this, el, found ) != SYS_MAX_T; } @@ -513,7 +513,7 @@ size_t find_in_array( const SFDPArray& arr, const Type& el, Type *&found ) // --- template size_t SFDPArray::SearchIt ( size_t data, typename SFDPArray::SearchFunc fSearch, Type *&found ) const { - PRECONDITION( FDPArray::nowDeletedElem == c3d_null ); // \ru ЯТ - временно \en ЯТ - temporarily + PRECONDITION( FDPArray::nowDeletedElem == 0 ); // \ru ЯТ - временно \en ЯТ - temporarily PRECONDITION( fSearch ); // \ru без функции сравнения массив бессмысленен \en the array is useless without comparison function if ( !FDPArray::count ) diff --git a/C3d/Include/templ_sfp_array.h b/C3d/Include/templ_sfp_array.h index 8cb8b3b..cb8f157 100644 --- a/C3d/Include/templ_sfp_array.h +++ b/C3d/Include/templ_sfp_array.h @@ -180,10 +180,10 @@ inline Type * SFPArray::FindByKey( void * key, size_t & index ) { // --- template inline Type * SFPArray::RemoveObj( Type *delObject, DelType del ) { - PRECONDITION( PArray::nowDeletedElem == c3d_null ); // \ru Bременно, для отладки \en Temporarily, for debugging + PRECONDITION( PArray::nowDeletedElem == 0 ); // \ru Bременно, для отладки \en Temporarily, for debugging ::qp_sort( *this, false ); size_t i = find_in_array( *this, delObject ); - return ( i != SYS_MAX_T ) ? RemoveInd(i, del) : c3d_null; + return ( i != SYS_MAX_T ) ? RemoveInd(i, del) : 0; } @@ -425,14 +425,14 @@ Type * find_from_array_by_key( const SFPArray & arr, void * key, size_t & res = (*arr.fSearch_m)( arr[0], key ); switch ( res ) { case 0 : index = 0; return arr[0]; - case 1 : index = SYS_MAX_T; return c3d_null; + case 1 : index = SYS_MAX_T; return NULL; case -1 : break; } res = (*arr.fSearch_m)( arr[mxc], key ); switch ( res ) { case 0 : index = mxc; return arr[mxc]; - default : index = SYS_MAX_T; return c3d_null; + default : index = SYS_MAX_T; return NULL; } } else { @@ -440,14 +440,14 @@ Type * find_from_array_by_key( const SFPArray & arr, void * key, size_t & for( size_t i = 0, count = (size_t)arr.count; i < count; i++ ) { switch ( (*arr.fSearch_m)( arr[i], key ) ) { case 0 : index = i; return arr[i]; - case 1 : index = SYS_MAX_T; return c3d_null; + case 1 : index = SYS_MAX_T; return NULL; case -1 : break; } } } index = SYS_MAX_T; - return c3d_null; + return NULL; } diff --git a/C3d/Include/templ_sp_array.h b/C3d/Include/templ_sp_array.h index 4f139d8..b8213d0 100644 --- a/C3d/Include/templ_sp_array.h +++ b/C3d/Include/templ_sp_array.h @@ -150,9 +150,9 @@ inline bool SPArray::IsExist( const Type * el ) const { template inline Type * SPArray::RemoveObj( Type * delObject, DelType del ) { - PRECONDITION( PArray::nowDeletedElem == c3d_null ); // \ru Bременно, для отладки \en Temporarily, for debugging + PRECONDITION( PArray::nowDeletedElem == 0 ); // \ru Bременно, для отладки \en Temporarily, for debugging size_t i = find_from_array( *this, delObject ); - return ( i != SYS_MAX_T ) ? RemoveInd( i, del ) : c3d_null; + return ( i != SYS_MAX_T ) ? RemoveInd( i, del ) : 0; } @@ -172,8 +172,8 @@ inline size_t SPArray::PossibleIndex( const Type * el, bool & isPresent ) template Type * add_to_array( SPArray & arr, Type * el, size_t & indexEl ) { - if ( el == c3d_null ) // \ru LF_Linux: добавил проверку на c3d_null \en LF_Linux: added a check for c3d_null - return c3d_null; + if ( el == NULL ) // \ru LF_Linux: добавил проверку на NULL \en LF_Linux: added a check for NULL + return NULL; size_t mx = arr.count - 1; size_t mxc = mx; size_t mn = 0; @@ -286,7 +286,7 @@ size_t find_from_array_spec( const SPArray & arr, const Type * el, bool & { isPresent = false; - if ( el == c3d_null ) // \ru LF_Linux: добавил проверку на c3d_null \en LF_Linux: added a check for c3d_null + if ( el == NULL ) // \ru LF_Linux: добавил проверку на NULL \en LF_Linux: added a check for NULL return SYS_MAX_T; if ( !arr.count || *el < *arr/*.parr*/[0] ) @@ -355,7 +355,7 @@ size_t find_from_array_spec( const SPArray & arr, const Type * el, bool & template size_t find_from_array( const SPArray & arr, const Type * el ) { - if ( el == c3d_null ) // \ru LF_Linux: добавил проверку на c3d_null \en LF_Linux: added a check for c3d_null + if ( el == NULL ) // \ru LF_Linux: добавил проверку на NULL \en LF_Linux: added a check for NULL return SYS_MAX_T; // \ru общий случай - элементов больше 11 //LF_Linux: откуда 11??? \en the common case - the number of elements is more than 11 //LF_Linux: why 11?? if ( arr.count > 11 ) { diff --git a/C3d/Include/templ_sptr.h b/C3d/Include/templ_sptr.h index df3e294..9fa0882 100644 --- a/C3d/Include/templ_sptr.h +++ b/C3d/Include/templ_sptr.h @@ -15,14 +15,14 @@ //------------------------------------------------------------------------------ -/** \brief \ru Отладочная проверка на c3d_null. - \en Debug check for c3d_null. \~ - \details \ru Отладочная проверка на c3d_null. \n - \en Debug check for c3d_null. \n \~ +/** \brief \ru Отладочная проверка на NULL. + \en Debug check for NULL. \~ + \details \ru Отладочная проверка на NULL. \n + \en Debug check for NULL. \n \~ \ingroup Base_Tools_SmartPointers */ // --- -#define NULL_CHECK PRECONDITION( m_pI != c3d_null ); +#define NULL_CHECK PRECONDITION( m_pI != C3D_NULL_PTR ); //------------------------------------------------------------------------------ @@ -42,20 +42,20 @@ class SPtr public: /// \ru Конструктор. \en Constructor. - SPtr () : m_pI( c3d_null ) {} + SPtr () : m_pI( C3D_NULL_PTR ) {} /// \ru Конструктор по указателю. \en Constructor by pointer. explicit SPtr ( T * elem ) { - if ( (m_pI = elem) != c3d_null ) + if ( (m_pI = elem) != C3D_NULL_PTR ) m_pI->AddRef(); } /// \ru Конструктор копирования. \en Copy constructor. - SPtr( const SPtr & ptr ) : m_pI( c3d_null ) { assign(ptr.m_pI); } + SPtr( const SPtr & ptr ) : m_pI( C3D_NULL_PTR ) { assign(ptr.m_pI); } /// \ru Конструктор по совместимому указателю \en Constructor by compatible pointer template - SPtr( const SPtr<_T> & ptr ) : m_pI( ptr.get() ) { if ( m_pI != c3d_null ) { m_pI->AddRef();} } + SPtr( const SPtr<_T> & ptr ) : m_pI( ptr.get() ) { if ( m_pI != C3D_NULL_PTR ) { m_pI->AddRef();} } /// \ru Деструктор. \en Destructor. - ~SPtr() { if( m_pI != c3d_null ) m_pI->Release(); } + ~SPtr() { if( m_pI != C3D_NULL_PTR ) m_pI->Release(); } public: // \ru Перегрузка операторов \en Operators overloading /// \ru Оператор преобразования к типу T* . \en An operator for conversion to the type T*. @@ -103,13 +103,13 @@ public: /// \ru Функция присваивания указателем. \en A function of assignment by pointer. SPtr & assign( T * elem ); /// \ru Функция освобождения объекта. \en A function of release an object. - SPtr & reset( void ) { if( m_pI != c3d_null ) { m_pI->Release(); m_pI = c3d_null; } return *this; } + SPtr & reset( void ) { if( m_pI != C3D_NULL_PTR ) { m_pI->Release(); m_pI = C3D_NULL_PTR; } return *this; } /// \ru Функция доступа к элементу данных. \en A function of access to data element. T * get() const { return m_pI; } /// \ru Функция отсоединяет объект. \en A function detaches an object. - T * detach() { T * obj = m_pI; m_pI = c3d_null; if ( obj != c3d_null ) obj->DecRef(); return obj; } + T * detach() { T * obj = m_pI; m_pI = C3D_NULL_PTR; if ( obj != C3D_NULL_PTR ) obj->DecRef(); return obj; } /// \ru Нулевой указатель? \en Is null pointer? - bool is_null() const { return (( c3d_null == m_pI ) ? true : false ); } + bool is_null() const { return (( C3D_NULL_PTR == m_pI ) ? true : false ); } #ifdef C3D_STANDARD_CXX_11_PARTIAL public: @@ -138,8 +138,8 @@ inline SPtr & SPtr::assign( T * elem ) { if ( m_pI != elem ) { - if ( elem != c3d_null ) { elem->AddRef(); } - if ( m_pI != c3d_null ) { m_pI->Release(); } + if ( elem != C3D_NULL_PTR ) { elem->AddRef(); } + if ( m_pI != C3D_NULL_PTR ) { m_pI->Release(); } m_pI = elem; } return *this; @@ -150,10 +150,10 @@ inline SPtr & SPtr::assign( T * elem ) /** \brief \ru Автоматическая ссылка на объекты с подсчетом ссылок. \en Smart reference to objects with reference counter. \~ \details \ru Автоматическая ссылка (smart reference) на объекты с подсчетом ссылок. - Фактически тоже самое, что и SPtr, но без возможности равенства c3d_null.\n + Фактически тоже самое, что и SPtr, но без возможности равенства NULL.\n Требует от параметра шаблона реализации функций AddRef() и Release(). \n \en Smart reference to objects with reference counter. - Actually it is the same as SPtr but without the possibility of equality to c3d_null \n + Actually it is the same as SPtr but without the possibility of equality to NULL \n It requires Implementation of functions AddRef() and Release() from the template parameter. \n \~ \ingroup Base_Tools_SmartPointers */ diff --git a/C3d/Include/templ_stack.h b/C3d/Include/templ_stack.h index 2109dee..8b0011f 100644 --- a/C3d/Include/templ_stack.h +++ b/C3d/Include/templ_stack.h @@ -36,7 +36,7 @@ public: {} public: void Push( const Type & obj ); ///< \ru Добавить элемент в стек. \en Add an element to the stack. - Type & Pop(); ///< \ru Извлечь один элемент стека, если возвращаетя c3d_null, значит достигнуто дно стека. \en Retrieve one element from the stack, if c3d_null is returned then the bottom of stack is reached. + Type & Pop(); ///< \ru Извлечь один элемент стека, если возвращаетя NULL, значит достигнуто дно стека. \en Retrieve one element from the stack, if NULL is returned then the bottom of stack is reached. Type & Top() const; ///< \ru Верхний элемент стека (последний внесенный). \en The top element of the stack (the last added). // \ru Оставить доступными следующие методы: \en Leave an access to the next methods: diff --git a/C3d/Include/templ_t_list.h b/C3d/Include/templ_t_list.h index e6d90f8..ce51fb3 100644 --- a/C3d/Include/templ_t_list.h +++ b/C3d/Include/templ_t_list.h @@ -86,7 +86,7 @@ writer& operator << ( writer& out, const List& ref ) { // template reader& operator >> ( reader& in, List*& ptr ) { - ptr = c3d_null; + ptr = NULL; if ( in.good() ) { if ( in.MathVersion() < 0x06000012L ) diff --git a/C3d/Include/tool_memory_debug.h b/C3d/Include/tool_memory_debug.h index ac4e5cd..fb2d0a7 100644 --- a/C3d/Include/tool_memory_debug.h +++ b/C3d/Include/tool_memory_debug.h @@ -66,7 +66,7 @@ public: virtual void ReallocArrayStatistic( void * oldParr, size_t oldSize, void * newParr, size_t newSize, uint arrayType ) = 0; /// \ru Отчет по статистике изменений размера массива. \en A report by the statistics of array size changes. \~ \ingroup Base_Tools - virtual void ReallocReport( bool clear, const char * title = c3d_null ) = 0; + virtual void ReallocReport( bool clear, const char * title = NULL ) = 0; }; @@ -242,7 +242,7 @@ inline void * ReallocArraySize( void * arr_parr, size_t newBytesCount, bool ) void * tmp_parr = ::realloc( arr_parr, newBytesCount ); #endif - PRECONDITION( newBytesCount == 0 || tmp_parr != c3d_null ); // \ru проверка на нехватку памяти в массивах \en check the memory deficit in arrays + PRECONDITION( newBytesCount == 0 || tmp_parr != NULL ); // \ru проверка на нехватку памяти в массивах \en check the memory deficit in arrays #ifdef __MEMSET_USED_FREE_HEAP_HEAR__ if ( clear ) { diff --git a/C3d/Include/tool_multithreading.h b/C3d/Include/tool_multithreading.h index cb55318..63712ff 100644 --- a/C3d/Include/tool_multithreading.h +++ b/C3d/Include/tool_multithreading.h @@ -222,19 +222,19 @@ class CacheManager : public CacheCleaner { bool _valid; List( unsigned int id, T* data ) : _id( id ), - _data( data != c3d_null ? data : new T() ), // Always _data != c3d_null. - _next( c3d_null ), + _data( data != NULL ? data : new T() ), // Always _data != NULL. + _next( NULL ), _valid( true ) {} ~List() { - if ( _data != c3d_null ) + if ( _data != NULL ) delete _data; - _data = c3d_null; - if ( _next != c3d_null ) // Also deletes linked List. + _data = NULL; + if ( _next != NULL ) // Also deletes linked List. delete _next; - _next = c3d_null; + _next = NULL; } private: - List() : _id( 0 ), _data( c3d_null ), _next( c3d_null ) {} + List() : _id( 0 ), _data( NULL ), _next( NULL ) {} }; private: @@ -310,9 +310,9 @@ private: // --- template inline CacheManager::CacheManager( bool createLock ) - : longTerm ( c3d_null ) - , tcache ( c3d_null ) - , lock ( c3d_null ) + : longTerm ( NULL ) + , tcache ( NULL ) + , lock ( NULL ) { if ( createLock ) { lock = new CommonMutex(); @@ -327,11 +327,11 @@ inline CacheManager::CacheManager( bool createLock ) // --- template inline CacheManager::CacheManager( const CacheManager & item ) - : longTerm ( c3d_null ) - , tcache ( c3d_null ) - , lock ( c3d_null ) + : longTerm ( NULL ) + , tcache ( NULL ) + , lock ( NULL ) { - if ( item.longTerm != c3d_null ) + if ( item.longTerm != NULL ) longTerm = new T( *item.longTerm ); #ifndef CACHE_DELETE_LOCK lock = new CommonMutex(); @@ -346,9 +346,9 @@ template inline CacheManager::~CacheManager() { CleanAll( false, true ); - if ( longTerm != c3d_null ) + if ( longTerm != NULL ) delete longTerm; - if ( lock != c3d_null ) + if ( lock != NULL ) delete lock; } @@ -362,7 +362,7 @@ template inline T* CacheManager::LongTerm () { try { - if ( longTerm == c3d_null ) + if ( longTerm == NULL ) longTerm = new T(); } catch ( const std::bad_alloc & ) { @@ -378,10 +378,10 @@ inline T* CacheManager::LongTerm () template inline CommonMutex* CacheManager::GetLockHard() { - if ( lock == c3d_null ) { + if ( lock == NULL ) { CommonMutex* ll = GetGlobalLock(); ll->lock(); - if ( lock == c3d_null ) + if ( lock == NULL ) lock = new CommonMutex(); ll->unlock(); } @@ -396,27 +396,27 @@ template inline T * CacheManager::operator()() { // \ru Создать данные по данным кэша главного потока. \en Create data using the data of the main thread cache. -#define INIT_BY_LONGTERM ( longTerm != c3d_null ? new T( *longTerm ) : new T() ) +#define INIT_BY_LONGTERM ( longTerm != NULL ? new T( *longTerm ) : new T() ) if ( !IsSafeMultithreading() || !IsInParallel() ) { CleanAll( true ); return LongTerm(); } - T * res = c3d_null; + T * res = NULL; unsigned int threadKey = GetThreadKey(); if ( FatalErrorHandler::HasError() ) return LongTerm(); - if ( tcache == c3d_null ) { + if ( tcache == NULL ) { // \ru Подписаться на сборку мусора, так как используются многопоточные кэши. // \en Subscribe on garbage collection because using multithreaded caches. SubcribeOnCleaning(); { // \ru Используется блокировка при изменении списка кэшей. \en Use lock when changing the cache list. ScopedLock sl( GetLock(), false ); - if ( tcache == c3d_null ) { + if ( tcache == NULL ) { try { tcache = new List( threadKey, INIT_BY_LONGTERM ); return tcache->_data; @@ -430,7 +430,7 @@ inline T * CacheManager::operator()() } List* entry = tcache; - while( entry != c3d_null ) { + while( entry != NULL ) { if ( entry->_id == threadKey ) { if ( !entry->_valid ) { try { @@ -450,7 +450,7 @@ inline T * CacheManager::operator()() } // \ru Если кэш не найден в списке, 'entry' содержит последний (на данный момент) элемент в списке. // \en If cache not found in the list, 'entry' contains the last element in the list (at that point). - if ( entry->_next == c3d_null ) + if ( entry->_next == NULL ) break; entry = entry->_next; } @@ -462,7 +462,7 @@ inline T * CacheManager::operator()() List * newList = new List( threadKey, res ); // \ru На данный момент, entry может быть не последним элементом в списке. // \en At that point, entry could be not a last element in the list. - while ( entry->_next != c3d_null ) { + while ( entry->_next != NULL ) { entry = entry->_next; } entry->_next = newList; @@ -485,10 +485,10 @@ inline T * CacheManager::operator()() template inline void CacheManager::Reset( bool resetLongTerm ) { - if ( tcache != c3d_null ) { + if ( tcache != NULL ) { ScopedLock sl( GetLock() ); List* entry = tcache; - while ( entry != c3d_null ) { + while ( entry != NULL ) { entry->_valid = false; entry = entry->_next; } @@ -496,13 +496,13 @@ inline void CacheManager::Reset( bool resetLongTerm ) if ( resetLongTerm ) { ScopedLock sl( GetLock() ); delete longTerm; - longTerm = c3d_null; + longTerm = NULL; // \ru Если нет параллельности, удаляется блокировка. \en If no parallelism, delete the lock. #ifdef CACHE_DELETE_LOCK if ( !sl.IsLocked() ) { - if ( lock != c3d_null ) + if ( lock != NULL ) delete lock; - lock = c3d_null; + lock = NULL; } #endif } @@ -516,24 +516,24 @@ template inline void CacheManager::CleanAll( bool doPostproc, bool force ) { if ( force || CacheCleanupAllowed() ) { - if ( tcache != c3d_null ) { + if ( tcache != NULL ) { if ( doPostproc ) Postprocess(); delete tcache; - tcache = c3d_null; + tcache = NULL; } #ifdef CACHE_DELETE_LOCK - if ( lock != c3d_null ) { + if ( lock != NULL ) { delete lock; - lock = c3d_null; + lock = NULL; } #endif if ( IsSubscribed() ) UnsubcribeOnCleaning(); #ifdef CACHE_DELETE_LOCK - if ( lock != c3d_null ) { + if ( lock != NULL ) { delete lock; - lock = c3d_null; + lock = NULL; } #endif } @@ -546,11 +546,11 @@ inline void CacheManager::CleanAll( bool doPostproc, bool force ) template inline void CacheManager::Postprocess() { - if ( tcache != c3d_null ) { + if ( tcache != NULL ) { LongTerm(); // Create longTerm List * entry = tcache; // Incorporate thread data into main thread data. - while ( entry != c3d_null && longTerm->MergeWith( entry->_data ) ) { + while ( entry != NULL && longTerm->MergeWith( entry->_data ) ) { entry = entry->_next; } } @@ -563,18 +563,18 @@ inline void CacheManager::Postprocess() template inline void CacheManager::HardReset() { - if ( tcache != c3d_null ) { + if ( tcache != NULL ) { delete tcache; - tcache = c3d_null; + tcache = NULL; } - if ( longTerm != c3d_null ) { + if ( longTerm != NULL ) { delete longTerm; - longTerm = c3d_null; + longTerm = NULL; } - if ( lock != c3d_null ) { + if ( lock != NULL ) { delete lock; - lock = c3d_null; + lock = NULL; } } diff --git a/C3d/Include/tool_mutex.h b/C3d/Include/tool_mutex.h index 571ed92..dce561d 100644 --- a/C3d/Include/tool_mutex.h +++ b/C3d/Include/tool_mutex.h @@ -421,8 +421,8 @@ public: */ void Unlock() const; - // \ru Выдать указатель на объект мьютекса. Возращает c3d_null, если параллельности нет. Для использования в ScopedLock. - // \en Get a pointer to the mutex object. Return c3d_null if no parallelism. For use in ScopedLock. + // \ru Выдать указатель на объект мьютекса. Возращает NULL, если параллельности нет. Для использования в ScopedLock. + // \en Get a pointer to the mutex object. Return NULL if no parallelism. For use in ScopedLock. CommonMutex * GetLock() const; }; @@ -453,8 +453,8 @@ public: */ void Unlock() const; - /** \brief \ru Выдать указатель на объект мьютекса. Возращает c3d_null, если параллельности нет. Для использования в ScopedLock. - \en Get a pointer to the mutex object. Return c3d_null if no parallelism. For use in ScopedLock. + /** \brief \ru Выдать указатель на объект мьютекса. Возращает NULL, если параллельности нет. Для использования в ScopedLock. + \en Get a pointer to the mutex object. Return NULL if no parallelism. For use in ScopedLock. */ CommonRecursiveMutex * GetLock() const; }; diff --git a/C3d/Include/tool_quick_sort.h b/C3d/Include/tool_quick_sort.h index 5750ddb..2228ea4 100644 --- a/C3d/Include/tool_quick_sort.h +++ b/C3d/Include/tool_quick_sort.h @@ -222,17 +222,17 @@ void Swap( Type* arr, size_t ind1, size_t ind2 ) Analog of strcmp for strings, supplied by user for comparing the array elements. Accepts 2 pointers to elements and returns: negative value, if 1<2; 0, if 1=2; positive value, if 1>2. \~ - \param[out] base2 - \ru Указатель на второй массив (может быть c3d_null). - \en Pointer to the second array (could be c3d_null). \~ - \param[out] base3 - \ru Указатель на третий массив (может быть c3d_null). - \en Pointer to the third array (could be c3d_null). \~ + \param[out] base2 - \ru Указатель на второй массив (может быть NULL). + \en Pointer to the second array (could be NULL). \~ + \param[out] base3 - \ru Указатель на третий массив (может быть NULL). + \en Pointer to the third array (could be NULL). \~ \ingroup Base_Algorithms */ //--- template void InsertSort( Type * base, size_t num, - KsQSortCompFunc compareFunc, Type2* base2 = c3d_null, Type3* base3 = c3d_null ) + KsQSortCompFunc compareFunc, Type2* base2 = NULL, Type3* base3 = NULL ) { if ( num < 2 ) @@ -241,9 +241,9 @@ void InsertSort( Type * base, if ( num == 2 ) { if ( compareFunc( base, base + 1 ) >= 0 ) { Swap( base, 0, 1 ); - if ( base2 != c3d_null ) { + if ( base2 != NULL ) { Swap( base2, 0, 1 ); - if ( base3 != c3d_null ) + if ( base3 != NULL ) Swap( base3, 0, 1 ); } } @@ -253,9 +253,9 @@ void InsertSort( Type * base, for ( ptrdiff_t i = 1; i < (ptrdiff_t)num; ++i ) { for ( ptrdiff_t j = i; j > 0 && compareFunc( base + j - 1, base + j ) >= 0; j-- ) { Swap( base, j - 1, j ); - if ( base2 != c3d_null ) { + if ( base2 != NULL ) { Swap( base2, j - 1, j ); - if ( base3 != c3d_null ) + if ( base3 != NULL ) Swap( base3, j - 1, j ); } } @@ -291,17 +291,17 @@ void InsertSort( Type * base, negative value, if 1<2; 0, if 1=2, positive value, if 1>2. \~ - \param[out] base2 - \ru Указатель на второй массив (может быть c3d_null). - \en Pointer to the second array (could be c3d_null). \~ - \param[out] base3 - \ru Указатель на третий массив (может быть c3d_null). - \en Pointer to the third array (could be c3d_null). \~ + \param[out] base2 - \ru Указатель на второй массив (может быть NULL). + \en Pointer to the second array (could be NULL). \~ + \param[out] base3 - \ru Указатель на третий массив (может быть NULL). + \en Pointer to the third array (could be NULL). \~ \ingroup Base_Algorithms */ //--- template void QuickSort( Type * base, size_t num, - KsQSortCompFunc compareFunc, Type2* base2 = c3d_null, Type3* base3 = c3d_null ) + KsQSortCompFunc compareFunc, Type2* base2 = NULL, Type3* base3 = NULL ) { #define QSORT_THRESHOLD 25 // \ru Порог перехода на другой тип сортировки.\en Threshold of transition to another sorting. @@ -317,9 +317,9 @@ void QuickSort( Type * base, if ( num == 2 ) { if ( compareFunc( base, base + 1 ) >= 0 ) { Swap( base, 0, 1 ); - if ( base2 != c3d_null ) { + if ( base2 != NULL ) { Swap( base2, 0, 1 ); - if ( base3 != c3d_null ) + if ( base3 != NULL ) Swap( base3, 0, 1 ); } } @@ -338,9 +338,9 @@ void QuickSort( Type * base, // \ru Выбирается базовый элемент (используется средний). \en Select a base element (use the middle one). midIndex = ( rightIndex + leftIndex ) / 2; Swap( base, midIndex, leftIndex ); - if ( base2 != c3d_null ) { + if ( base2 != NULL ) { Swap( base2, midIndex, leftIndex ); - if ( base3 != c3d_null ) + if ( base3 != NULL ) Swap( base3, midIndex, leftIndex ); } @@ -369,17 +369,17 @@ void QuickSort( Type * base, break; Swap( base, lInd, rInd ); - if ( base2 != c3d_null ) { + if ( base2 != NULL ) { Swap( base2, lInd, rInd ); - if ( base3 != c3d_null ) + if ( base3 != NULL ) Swap( base3, lInd, rInd ); } } Swap( base, leftIndex, rInd ); - if ( base2 != c3d_null ) { + if ( base2 != NULL ) { Swap( base2, leftIndex, rInd ); - if ( base3 != c3d_null ) + if ( base3 != NULL ) Swap( base3, leftIndex, rInd ); } diff --git a/C3d/Include/tool_string_util.h b/C3d/Include/tool_string_util.h index 7e6aa3a..c06b678 100644 --- a/C3d/Include/tool_string_util.h +++ b/C3d/Include/tool_string_util.h @@ -44,7 +44,7 @@ inline const char* strret( const char* str ) { return str; } /// \ru Возвр inline char * strnewdup( const char * str, size_t minLen = 0 ) { if ( !str ) - return c3d_null; + return NULL; size_t len = strlen( str ); @@ -65,7 +65,7 @@ inline char * strnewdup( const char * str, size_t minLen = 0 ) inline wchar_t * wcsnewdup( const wchar_t * str, size_t minLen = 0 ) { if ( !str ) - return c3d_null; + return NULL; size_t len = wcslen( str ); @@ -85,15 +85,15 @@ inline wchar_t * wcsnewdup( const wchar_t * str, size_t minLen = 0 ) //--- inline wchar_t * mbsnewwcs( const char * str ) { - wchar_t * res = c3d_null; + wchar_t * res = NULL; if ( str ) { #ifndef __MOBILE_VERSION__ #ifdef C3D_WINDOWS // _MSC_VER - size_t n = mbstowcs( c3d_null, str, 0 ); + size_t n = mbstowcs( NULL, str, 0 ); #else // C3D_WINDOWS - size_t n = std::mbstowcs( c3d_null, str, 0 ); + size_t n = std::mbstowcs( NULL, str, 0 ); #endif // C3D_WINDOWS if ( n != NSIZE ) @@ -154,15 +154,15 @@ inline wchar_t * mbsnewwcs( const char * str ) //--- inline char * wcsnewmbs( const wchar_t * str ) { - char * res = c3d_null; + char * res = NULL; if ( str ) { // \ru один WCHAR может занять более одного CHAR! \en one WCHAR may replace more than one CHAR! #ifdef C3D_WINDOWS // _MSC_VER - size_t n = wcstombs( c3d_null, str, 0 ); + size_t n = wcstombs( NULL, str, 0 ); #else // C3D_WINDOWS - size_t n = std::wcstombs( c3d_null, str, 0 ); + size_t n = std::wcstombs( NULL, str, 0 ); #endif // C3D_WINDOWS if ( n != NSIZE ) @@ -371,10 +371,10 @@ inline const char * strret( const char * str ) { return str; } /// \ru В \ingroup Base_Tools_String */ //--- -inline uint32* Utf16ToUcs4( uint16* source, size_t* calculateCountSymbol = c3d_null ) +inline uint32* Utf16ToUcs4( uint16* source, size_t* calculateCountSymbol = NULL ) { size_t count = 0; // \ru количество символов в строке \en a number of symbols in string - uint32 * outBuf = c3d_null; + uint32 * outBuf = NULL; if ( source ) { while (source[count] != 0) @@ -400,10 +400,10 @@ inline uint32* Utf16ToUcs4( uint16* source, size_t* calculateCountSymbol = c3d_n \ingroup Base_Tools_String */ //--- -inline uint16* Ucs4ToUtf16( uint32* source, size_t* calculateCountSymbol = c3d_null ) +inline uint16* Ucs4ToUtf16( uint32* source, size_t* calculateCountSymbol = NULL ) { size_t count = 0; // \ru количество символов в строке \en a number of symbols in string - uint16 * outBuf = c3d_null; + uint16 * outBuf = NULL; if ( source ) { while (source[count] != 0) diff --git a/C3d/Include/tool_time_test.h b/C3d/Include/tool_time_test.h index 37943d0..6c6ec3e 100644 --- a/C3d/Include/tool_time_test.h +++ b/C3d/Include/tool_time_test.h @@ -193,7 +193,7 @@ MATH_FUNC(void) TimeTestReport( const TCHAR * fileName ); //------------------------------------------------------------------------------ // \ru выдать все результаты \en return all results // --- -MATH_FUNC(TimeTest *) GetTimeTestResults (); +MATH_FUNC(TimeTest *)GetTimeTestResults (); MATH_FUNC(void) SortResultMeasuring( TimeTest &, std::vector & ); diff --git a/C3d/Include/topology.h b/C3d/Include/topology.h index ecbeb0b..0010e4f 100644 --- a/C3d/Include/topology.h +++ b/C3d/Include/topology.h @@ -249,10 +249,10 @@ public : virtual MbeTopologyType IsA() const; // \ru Тип элемента. \en A type of element. /// \ru Создать новую вершину копированием всех данных исходной вершины. \en Create new vertex by copying all data of the initial vertex. - virtual MbVertex * DataDuplicate( MbRegDuplicate * = c3d_null ) const; - virtual void Transform( const MbMatrix3D &, MbRegTransform * = c3d_null ); // \ru Преобразовать согласно матрице. \en Transform according to the matrix. - virtual void Move ( const MbVector3D &, MbRegTransform * = c3d_null ); // \ru Сдвинуть вдоль вектора. \en Move along a vector. - virtual void Rotate ( const MbAxis3D &, double angle, MbRegTransform * = c3d_null ); // \ru Повернуть вокруг оси. \en Rotate around an axis. + virtual MbVertex * DataDuplicate( MbRegDuplicate * = NULL ) const; + virtual void Transform( const MbMatrix3D &, MbRegTransform * = NULL ); // \ru Преобразовать согласно матрице. \en Transform according to the matrix. + virtual void Move ( const MbVector3D &, MbRegTransform * = NULL ); // \ru Сдвинуть вдоль вектора. \en Move along a vector. + virtual void Rotate ( const MbAxis3D &, double angle, MbRegTransform * = NULL ); // \ru Повернуть вокруг оси. \en Rotate around an axis. virtual double DistanceToPoint( const MbCartPoint3D & ) const; // \ru Вычислить расстояние до точки. \en Calculate the distance to a point. virtual void AddYourGabaritTo( MbCube & ) const; // \ru Добавить свой габарит в присланный габарит. \en Add your own bounding box into the sent bounding box. virtual void CalculateLocalGabarit( const MbMatrix3D & into, MbCube & cube ) const; // \ru Рассчитать габарит в локальной системы координат. \en Calculate bounding box in the local coordinate system. @@ -315,10 +315,10 @@ IMPL_PERSISTENT_OPS( MbVertex ) // --- class MATH_CLASS MbEdge : public MbTopologyItem { protected : - MbCurve3D * curve; ///< \ru Кривая, по которой проходит ребро (всегда не c3d_null). \en A curve, an edge passes by (it is always not c3d_null). + MbCurve3D * curve; ///< \ru Кривая, по которой проходит ребро (всегда не NULL). \en A curve, an edge passes by (it is always not NULL). bool sameSense; ///< \ru Признак совпадения направления ребра с направлением кривой. \en An attribute of coincidence between direction of curve and direction of edge. - MbVertex * begVertex; ///< \ru Вершина-начало (всегда не c3d_null). \en Start vertex (always not c3d_null). - MbVertex * endVertex; ///< \ru Вершина-конец (всегда не c3d_null). \en End vertex (always not c3d_null). + MbVertex * begVertex; ///< \ru Вершина-начало (всегда не NULL). \en Start vertex (always not NULL). + MbVertex * endVertex; ///< \ru Вершина-конец (всегда не NULL). \en End vertex (always not NULL). protected : /// \ru Конструктор копирования. \en Copy constructor. @@ -358,10 +358,10 @@ public : virtual MbeTopologyType IsA() const; // \ru Тип элемента. \en A type of element. /// \ru Создать новое ребро копированием всех данных исходного ребра. \en Create new edge by copying all data of the initial edge. - virtual MbEdge * DataDuplicate( MbRegDuplicate * = c3d_null ) const; - virtual void Transform( const MbMatrix3D &, MbRegTransform * = c3d_null ); // \ru Трансформация. \en Transformation. - virtual void Move ( const MbVector3D &, MbRegTransform * = c3d_null ); // \ru Перемещение. \en Moving. - virtual void Rotate ( const MbAxis3D &, double angle, MbRegTransform * = c3d_null ); // \ru Вращение. \en Rotation. + virtual MbEdge * DataDuplicate( MbRegDuplicate * = NULL ) const; + virtual void Transform( const MbMatrix3D &, MbRegTransform * = NULL ); // \ru Трансформация. \en Transformation. + virtual void Move ( const MbVector3D &, MbRegTransform * = NULL ); // \ru Перемещение. \en Moving. + virtual void Rotate ( const MbAxis3D &, double angle, MbRegTransform * = NULL ); // \ru Вращение. \en Rotation. virtual double DistanceToPoint( const MbCartPoint3D & ) const; // \ru Вычислить расстояние до точки. \en Calculate the distance to a point. virtual void AddYourGabaritTo( MbCube & ) const; // \ru Добавить свой габарит в присланный габарит. \en Add your own bounding box into the sent bounding box. virtual void CalculateLocalGabarit( const MbMatrix3D & into, MbCube & cube ) const; // \ru Рассчитать габарит в локальной системы координат. \en Calculate bounding box in the local coordinate system. @@ -443,7 +443,7 @@ public : bool IsClosed() const; /// \ru Установить метку себе и вершинам. \en Set a label for self and vertices. - void SetLabelThrough( MbeLabelState l, void * key = c3d_null ) const; + void SetLabelThrough( MbeLabelState l, void * key = NULL ) const; /// \ru Установить метку себе и вершинам. \en Set a label for self and vertices. void SetLabelThrough( MbeLabelState l, void * key, bool setLock ) const; /// \ru Удалить частную метку себе и вершинам. \en Remove private label for self and vertices. @@ -585,7 +585,7 @@ public : virtual MbeTopologyType IsA() const; // \ru Тип элемента. \en A type of element. /// \ru Создать новое ребро копированием всех данных исходного ребра. \en Create new edge by copying all data of the initial edge. - virtual MbCurveEdge * DataDuplicate( MbRegDuplicate * = c3d_null ) const; + virtual MbCurveEdge * DataDuplicate( MbRegDuplicate * = NULL ) const; virtual void SetOwnChangedThrough( MbeChangedType ); // \ru Установить флаг изменения в положение измененного объекта. \en Set the flag that the object has been changed. virtual void Reverse(); // \ru Изменить направление ребра на противоположной, не изменяя кривую. \en Change direction of edge without changing a curve. /// \ru Являются ли объекты равными? \en Determine whether objects are equal. @@ -627,7 +627,7 @@ public : bool IsUsual( bool tolerantIsUsual ) const; /// \ru Установить метки ориентированных ребер. \en Set labels of oriented edges. - void SetOrientedEdgesLabel( MbeLabelState, void * key = c3d_null ); + void SetOrientedEdgesLabel( MbeLabelState, void * key = NULL ); /// \ru Найти ориентированное ребро. \en Find an oriented edge. bool FindOrientedEdge( bool orient, const MbFace * face, MbLoop *& findLoop, size_t & index ) const; /// \ru Найти ориентированное ребро. \en Find an oriented edge. @@ -712,7 +712,7 @@ public : The calculation is correct for edges which do not change a convexity. Returns ts_neutral for smooth edges. \~ */ - ThreeStates IsConvex( double angleEps = EXTENT_EPSILON, const MbRect1D * tRange = c3d_null ) const; + ThreeStates IsConvex( double angleEps = EXTENT_EPSILON, const MbRect1D * tRange = NULL ) const; /**\ru Скопировать из копии готовые метрические оценки, которые в оригинале не были рассчитаны. \en Copy from the copy ready estimates which were not calculated in the original. \~ @@ -834,7 +834,7 @@ public : \en Prolong an edge. \~ \details \ru Продолжить кривую пересечения ребра до параметра t, лежащего за пределами области определения. \n \en Continue the intersection curve of edge by the parameter t, lying outside of the curve. \n \~ - \param[in,out] t - \ru Параметра на продолжении кривой ребра. + \param[in/out] t - \ru Параметра на продолжении кривой ребра. \en Parameter outside of the intersection curve. \~ \param[in] begin - \ru Начало (true) или конец (false) ребра продолжить. \en The edge should be prolonged by the beginning (true) or by the ending (false). \~ @@ -855,7 +855,7 @@ public : \en Merging of two connected edges: \n Before the call AddRef should be done on the edges, since one of the edges may be deleted, and after the call and using the edges Release should be done on them. \n \~ - \param[in,out] edge2 - \ru Присоединяемое ребро. + \param[in/out] edge2 - \ru Присоединяемое ребро. \en Merging edge. \~ \param[in] begin1 - \ru К началу (true) или к концу (false) ребра this стыкуется присоединяемое ребро. \en This edge is joined by the beginning (true) or by the ending (false). \~ @@ -925,7 +925,7 @@ IMPL_PERSISTENT_OPS( MbCurveEdge ) // --- class MATH_CLASS MbOrientedEdge : public MbTopItem { protected: - MbCurveEdge * curveEdge; ///< \ru Ребро грани (всегда не c3d_null). \en Face edge (always not c3d_null). + MbCurveEdge * curveEdge; ///< \ru Ребро грани (всегда не NULL). \en Face edge (always not NULL). bool orientation; ///< \ru Направление ребра грани в цикле. \en Direction of a face edge in the loop. mutable MbLabel label; ///< \ru Временная метка для выполнения операций. \en Temporary label for performing of operations. public : @@ -994,7 +994,7 @@ public : template void GetVerticesArray( VerticesVector & vertices, bool findSame = true ) const { - const MbVertex * lastVertex= c3d_null; + const MbVertex * lastVertex= NULL; if ( vertices.size() > 0 ) lastVertex = vertices.back(); @@ -1021,15 +1021,15 @@ public : void SetOrientation( bool o ); /// \ru Получить метку. \en Get label. - MbeLabelState GetLabel( void * key = c3d_null ) const { return (MbeLabelState)label.GetLabel(key);} + MbeLabelState GetLabel( void * key = NULL ) const { return (MbeLabelState)label.GetLabel(key);} /// \ru Установить свою метку. \en Set label. - void SetOwnLabel( MbeLabelState l, void * key = c3d_null ) const { label.SetLabel( l, key ); } + void SetOwnLabel( MbeLabelState l, void * key = NULL ) const { label.SetLabel( l, key ); } /// \ru Установить метку ориентированному ребру, ребру грани и вершинам ребра. \en Set label for oriented edge, face edge and vertices of edge. - void SetLabelThrough( MbeLabelState l, void * key = c3d_null ) const; + void SetLabelThrough( MbeLabelState l, void * key = NULL ) const; /// \ru Установить метку ориентированному ребру, ребру грани и вершинам ребра. \en Set label for oriented edge, face edge and vertices of edge. void SetLabelThrough( MbeLabelState l, void * key, bool setLock ) const; /// \ru Удалить частную метку. \en Remove private label. - void RemovePrivateLabel ( void * key = c3d_null ) const { label.DeletePrivate(key); } + void RemovePrivateLabel ( void * key = NULL ) const { label.DeletePrivate(key); } /// \ru Удалить частную метку ориентированному ребру, ребру грани и вершинам ребра. \en Remove private label for oriented edge, face edge and vertices of edge. void RemovePrivateLabelThrough( void * key ) const; @@ -1126,21 +1126,21 @@ public : size_t GetEdgesCount() const { return edgeList.size(); } /// \ru Получить метку цикла. \en Get a label of the loop. - MbeLabelState GetLabel( void * key = c3d_null ) const { return (MbeLabelState)label.GetLabel(key); } + MbeLabelState GetLabel( void * key = NULL ) const { return (MbeLabelState)label.GetLabel(key); } /// \ru Установить метку. \en Set a label of the loop. - void SetOwnLabel( MbeLabelState l, void * key = c3d_null ) const { label.SetLabel( l, key ); } + void SetOwnLabel( MbeLabelState l, void * key = NULL ) const { label.SetLabel( l, key ); } /// \ru Установить метку себе и ребрам цикла. \en Set a label for self and loop vertices. - void SetLabelThrough( MbeLabelState l, void * key = c3d_null ) const; + void SetLabelThrough( MbeLabelState l, void * key = NULL ) const; /// \ru Установить метку себе и ребрам цикла. \en Set a label for self and loop vertices. void SetLabelThrough( MbeLabelState l, void * key, bool setLock ) const; /// \ru Удалить частную метку себе и ребрам цикла. \en Remove private label for self and loop edges. void RemovePrivateLabelThrough( void * key ) const; /// \ru Установить метку ребрам. \en Set a label for edges. - void SetCurveEdgesLabel( MbeLabelState, void * key = c3d_null ) const; + void SetCurveEdgesLabel( MbeLabelState, void * key = NULL ) const; /// \ru Проверить метки рёбер и установить свою метку. \en Check edges labels and set own label. - void CheckEdgesLabel( void * key = c3d_null ) const; + void CheckEdgesLabel( void * key = NULL ) const; /// \ru Удалить частную метку. \en Remove private label. - void RemovePrivateLabel ( void * key = c3d_null ) const { label.DeletePrivate(key); } + void RemovePrivateLabel ( void * key = NULL ) const { label.DeletePrivate(key); } /// \ru Выдать множество вершин цикла. \en Get a set of loop vertices. template @@ -1183,7 +1183,7 @@ public : /// \ru Замена базового ребра. \en Replacement of the basis edge. void InitOrientedEdge( size_t edgeIndex, MbCurveEdge & initEdge, bool initOrientation, bool replaceVertices ); /// \ru Выдать ориентированное ребро по номеру. \en Get an oriented edge by the number. - MbOrientedEdge * GetOrientedEdge( size_t index ) const { return (index < edgeList.size()) ? edgeList[index] : c3d_null; } + MbOrientedEdge * GetOrientedEdge( size_t index ) const { return (index < edgeList.size()) ? edgeList[index] : NULL; } /// \ru Выдать ориентированное ребро по номеру без проверки корректности индекса. \en Get an oriented edge by the number without check of correctness of the index. MbOrientedEdge *_GetOrientedEdge( size_t index ) const { return edgeList[index]; } @@ -1220,7 +1220,7 @@ public : void Inverse(); /// \ru Принадлежит ли вершина пути. \en Does a vertex belong a path? - bool IsVertexOn( const MbVertex * vertex, size_t * index = c3d_null ) const; + bool IsVertexOn( const MbVertex * vertex, size_t * index = NULL ) const; /// \ru Замена указателей на поверхность. \en Replacement of the pointers to a surface. void ChangeSurface( MbSurface & oldSurf, MbSurface & newSurf, bool orient ); @@ -1264,11 +1264,11 @@ public : void SetProperties( const MbProperties & ); /// \ru Преобразовать объект согласно матрице. \en Transform an object according to the matrix. - void Transform( const MbMatrix3D &, MbRegTransform * = c3d_null ); + void Transform( const MbMatrix3D &, MbRegTransform * = NULL ); /// \ru Сдвинуть объект вдоль вектора. \en Move an object along a vector. - void Move ( const MbVector3D &, MbRegTransform * = c3d_null ); + void Move ( const MbVector3D &, MbRegTransform * = NULL ); /// \ru Повернуть объект вокруг оси на заданный угол. \en Rotate an object at a given angle around an axis. - void Rotate ( const MbAxis3D &, double angle, MbRegTransform * = c3d_null ); + void Rotate ( const MbAxis3D &, double angle, MbRegTransform * = NULL ); /// \ru Сдвинуть двумерные кривые вдоль вектора в области параметров поверхности (все сразу). \en Move two-dimensional curves along the vector in the surface parameter region (all at once). void Move( MbVector &, const MbSurface &, bool ); /// \ru Является ли контур граничным? \en Is a contour boundary? @@ -1301,7 +1301,7 @@ public: const MbCurveEdge * edge; ///< \ru Ребро цикла. \en Loop edge. double curveParam; ///< \ru Параметр двумерной кривой ребра, лежащей на поверхности грани. \en The parameter of two-dimensional curve that lies on the surface of a face and is contained in the edge. public: - LoopCrossParam() : loopIndex( SYS_MAX_T), edge( c3d_null ), curveParam( UNDEFINED_DBL ) {} + LoopCrossParam() : loopIndex( SYS_MAX_T), edge( NULL ), curveParam( UNDEFINED_DBL ) {} LoopCrossParam( size_t li, const MbCurveEdge * e, double t ) : loopIndex( li ), edge( e ), curveParam( t ) {} LoopCrossParam( const LoopCrossParam & obj ) : loopIndex( obj.loopIndex ), edge( obj.edge ), curveParam( obj.curveParam ) {} @@ -1360,7 +1360,7 @@ public: // --- class MATH_CLASS MbFace : public MbTopologyItem, public MbSyncItem { protected: - MbSurface * surface; ///< \ru Поверхность грани (всегда не c3d_null). \en Face surface (always not c3d_null). + MbSurface * surface; ///< \ru Поверхность грани (всегда не NULL). \en Face surface (always not NULL). bool sameSense; ///< \ru Признак совпадения направления нормали грани с нормалью поверхности. \en An attribute of coincidence between the face normal direction and the surface normal direction. RPArray loops; ///< \ru Границы грани (первая граница должна быть внешней). \en Face boundaries (the first boundary should be external). private: @@ -1380,11 +1380,11 @@ public: , loops( bnds.size(), 1 ) , surface( const_cast(&surf) ) , sameSense( sense ) // признак совпадения нормали - , temporal( c3d_null ) + , temporal( NULL ) { surface->AddRef(); for ( size_t i = 0, cnt = bnds.size(); i < cnt; ++i ) { - if ( bnds[i] != c3d_null ) + if ( bnds[i] != NULL ) AddLoop( *bnds[i] ); } } @@ -1401,10 +1401,10 @@ public: virtual MbeTopologyType IsA() const; // \ru Тип элемента. \en A type of element. /// \ru Создать новую грань копированием всех данных исходной грани. \en Create new face by copying all data of the initial face. - virtual MbFace * DataDuplicate( MbRegDuplicate * = c3d_null ) const; - virtual void Transform( const MbMatrix3D &, MbRegTransform * = c3d_null ); // \ru Трансформация. \en Transformation. - virtual void Move ( const MbVector3D &, MbRegTransform * = c3d_null ); // \ru Перемещение. \en Moving. - virtual void Rotate ( const MbAxis3D &, double angle, MbRegTransform * = c3d_null ); // \ru Вращение. \en Rotation. + virtual MbFace * DataDuplicate( MbRegDuplicate * = NULL ) const; + virtual void Transform( const MbMatrix3D &, MbRegTransform * = NULL ); // \ru Трансформация. \en Transformation. + virtual void Move ( const MbVector3D &, MbRegTransform * = NULL ); // \ru Перемещение. \en Moving. + virtual void Rotate ( const MbAxis3D &, double angle, MbRegTransform * = NULL ); // \ru Вращение. \en Rotation. virtual double DistanceToPoint( const MbCartPoint3D & ) const; // \ru Вычислить расстояние до точки. \en Calculate the distance to a point. virtual void AddYourGabaritTo( MbCube & ) const; // \ru Добавить свой габарит в присланный габарит. \en Add your own bounding box into the sent bounding box. virtual void CalculateLocalGabarit( const MbMatrix3D & into, MbCube & cube ) const; // \ru Рассчитать габарит в локальной системы координат. \en Calculate bounding box in the local coordinate system. @@ -1414,7 +1414,7 @@ public: /// \ru Выдать поверхность грани для модификации. \en Get a surface of a face for modifications. virtual MbSurface & SetSurface(); /// \ru Является ли грань плоской? \en Is a face planar? - virtual bool IsPlanar( double accuracy = METRIC_EPSILON ) const; + virtual bool IsPlanar() const; /// \ru Дать плоскость (или только возможность ее выдачи). \en Get a plane (or only a possibility of getting a plane) virtual bool GetPlacement( MbPlacement3D * ) const; /// \ru Выдать направление нормали грани по отношению к нормали поверхности. \en Get direction of face normal in relation to the direction of surface normal. @@ -1441,7 +1441,7 @@ public: /// \ru Выдать количество циклов (границ) грани . \en Get the number of loops (boundaries) of face. size_t GetLoopsCount() const { return loops.size(); } /// \ru Установить метку грани, циклам, рёбрам и вершинам. \en Set a label of face to its loops, edges and vertices. - void SetLabelThrough( MbeLabelState l, void * key = c3d_null ) const; + void SetLabelThrough( MbeLabelState l, void * key = NULL ) const; /// \ru Установить метку грани, циклам, рёбрам и вершинам. \en Set a label of face to its loops, edges and vertices. void SetLabelThrough( MbeLabelState l, void * key, bool setLock ) const; /// \ru Удалить частную метку грани, циклам, рёбрам и вершинам. \en Remove a private label of face to its loops, edges and vertices. @@ -1457,7 +1457,7 @@ public: size_t loopsCnt = loops.size(); vertices.reserve( vertices.size() + loopsCnt * 4 ); for ( size_t i = 0; i < loopsCnt; ++i ) { - if ( loops[i] != c3d_null ) + if ( loops[i] != NULL ) loops[i]->GetVertices( vertices ); } } @@ -1474,7 +1474,7 @@ public: bool HasNeighborFace() const; /// \ru Выдать границу (цикл) с проверкой корректности индекса. \en Get a boundary (a loop) with a check of index correctness. - MbLoop * GetLoop( size_t index ) const { size_t cnt = loops.size(); return cnt ? loops[index % cnt] : c3d_null; } + MbLoop * GetLoop( size_t index ) const { size_t cnt = loops.size(); return cnt ? loops[index % cnt] : NULL; } /// \ru Выдать границу (цикл) без проверки корректности индекса. \en Get a boundary (a loop) without a check of index correctness. MbLoop *_GetLoop( size_t index ) const { return loops[index]; } /// \ru Обнулить количество ребер в цикле с указанным индексом. \en Set to null the number of edges in loop with the given index. @@ -1498,9 +1498,9 @@ public: /// \ru Установить указатели ребер цикла на грань. \en Set the pointers of loop edges to the face. void SetFaceToLoopEdges( MbLoop & ); - /// \ru Установить указатели на грань слева или грань справа в ребрах цикла на c3d_null. \en Set to null the pointers to the face on the left or to the face on the right in edges of loop. + /// \ru Установить указатели на грань слева или грань справа в ребрах цикла на NULL. \en Set to null the pointers to the face on the left or to the face on the right in edges of loop. void SetNullToLoopEdges( MbLoop & ); - /// \ru Установить указатели на грань слева или грань справа в ребрах циклов на c3d_null. \en Set to null the pointers to the face on the left or to the face on the right in edges of loops. + /// \ru Установить указатели на грань слева или грань справа в ребрах циклов на NULL. \en Set to null the pointers to the face on the left or to the face on the right in edges of loops. void SetNullToLoopsEdges(); /// \ru Обнулить указатели на грань слева или грань справа, указывающие на смежную грань delFace, в ребрах циклов. \en Set to null pointers to the face on the left or to the face on the right which point to the adjacent face delFace in edges of loops. void SetNullToFace( const MbFace * delFace ); @@ -1510,7 +1510,7 @@ public: void MakeRight( bool setBounds = false ); /// \ru Принадлежит ли вершина грани? \en Does a vertex belong an edge? - bool IsVertexOn( const MbVertex * vertex, size_t * indLoop = c3d_null, size_t * indEdge = c3d_null ) const; + bool IsVertexOn( const MbVertex * vertex, size_t * indLoop = NULL, size_t * indEdge = NULL ) const; /** \brief \ru Изменить ориентацию грани. \en Change an orientation of a face. \~ @@ -1548,7 +1548,7 @@ public: void CalculateWire( const MbStepData & stepData, MbMesh & mesh ) const // The method deprecated. It will be removed at 2019. Use CalculateMesh( stepData, MbFormNote(true, false), mesh ); \~ { CalculateMesh( stepData, MbFormNote(true, false), mesh ); } /// \ru Связаны ли грани? \en Are faces connected? - bool IsConnectedWith( const MbFace * face, RPArray * commonEdges = c3d_null ) const; + bool IsConnectedWith( const MbFace * face, RPArray * commonEdges = NULL ) const; /// \ru Подобны ли поверхности для объединения трансформацией по матрице (первичная проверка)? \en Are surfaces similar for merge by transformation by the matrix (a primary check)? bool IsSimilarToFace( const MbFace & face, bool & normal, bool & planeType, VERSION version, double precision = METRIC_PRECISION ) const; /// \ru Подобны ли поверхности для объединения путем замены (первичная проверка)? \en Are surfaces similar for merge by replacement (a primary check)? @@ -1594,7 +1594,7 @@ public: const MbCurveEdge * FindEdgeByName( const MbName & ) const; /// \ru Установить метку ориентированного ребра. \en Set a label for an oriented edge. - void SetOrientedLabel ( const MbCurveEdge & edge, MbeLabelState n, void * key = c3d_null ); + void SetOrientedLabel ( const MbCurveEdge & edge, MbeLabelState n, void * key = NULL ); /// \ru Вычислить ближайшее расстояние до ребра и ближайшие точки грани и ребра. \en Calculate the nearest distance to an edge and the nearest points of an edge. double DistanceToEdge ( const MbCurveEdge & edge, MbCartPoint3D & p, MbCartPoint3D & edgeP ) const; /// \ru Вычислить ближайшее расстояние до грани и ближайшие точки граней. \en Calculate the nearest distance to a face and the nearest points of faces. @@ -1772,7 +1772,7 @@ public: public: /// \ru Создан ли временный объект сопровождения грани? \en Is a temporary object for the maintenance of a face created? - bool IsTemporal() const { return (temporal != c3d_null); } + bool IsTemporal() const { return (temporal != NULL); } /// \ru Удалить временный объект сопровождения. \en Delete a temporary maintenance object. void RemoveTemporal() const; /// \ru Создать новый временный объект сопровождения. \en Create new temporary maintenance object. @@ -1803,7 +1803,7 @@ void MbFace::GetEdges( EdgesVector & edges, size_t mapThreshold ) const if ( edges.size() < 1 ) { size_t checkCnt = 0; for ( size_t i = 0; i < loopsCnt; ++i ) { - if ( loops[i] != c3d_null ) { + if ( loops[i] != NULL ) { checkCnt += loops[i]->GetEdgesCount(); if ( checkCnt > mapThreshold ) { useMap = true; @@ -1819,9 +1819,9 @@ void MbFace::GetEdges( EdgesVector & edges, size_t mapThreshold ) const c3d::EdgeSPtr edge; for ( size_t i = 0; i < loopsCnt; ++i ) { MbLoop * loop = loops[i]; - if ( loop != c3d_null ) { + if ( loop != NULL ) { for ( size_t j = 0, edgesCnt = loop->GetEdgesCount(); j < edgesCnt; ++j ) { - if ( loop->_GetOrientedEdge( j ) != c3d_null ) { + if ( loop->_GetOrientedEdge( j ) != NULL ) { edge = &loop->_GetOrientedEdge( j )->GetCurveEdge(); mapIt = mapEdges.find( edge ); if ( mapIt == mapEdges.end() ) { @@ -1838,7 +1838,7 @@ void MbFace::GetEdges( EdgesVector & edges, size_t mapThreshold ) const } if ( !useMap ) { for ( size_t i = 0; i < loopsCnt; ++i ) { - if ( loops[i] != c3d_null ) + if ( loops[i] != NULL ) loops[i]->GetEdges( edges ); } } @@ -1858,7 +1858,7 @@ void MbFace::GetOuterEdges( EdgesVector & edges, size_t mapThreshold ) const if ( edges.size() < 1 ) { size_t checkCnt = 0; - if ( loops.front() != c3d_null ) { + if ( loops.front() != NULL ) { checkCnt += loops.front()->GetEdgesCount(); if ( checkCnt > mapThreshold ) useMap = true; @@ -1871,7 +1871,7 @@ void MbFace::GetOuterEdges( EdgesVector & edges, size_t mapThreshold ) const c3d::EdgeSPtr edge; MbLoop * loop = loops.front(); for ( size_t j = 0, edgesCnt = loop->GetEdgesCount(); j < edgesCnt; ++j ) { - if ( loop->_GetOrientedEdge( j ) != c3d_null ) { + if ( loop->_GetOrientedEdge( j ) != NULL ) { edge = &loop->_GetOrientedEdge( j )->GetCurveEdge(); mapIt = mapEdges.find( edge ); if ( mapIt == mapEdges.end() ) { @@ -1885,7 +1885,7 @@ void MbFace::GetOuterEdges( EdgesVector & edges, size_t mapThreshold ) const } } if ( !useMap ) { - if ( loops.front() != c3d_null ) + if ( loops.front() != NULL ) loops.front()->GetEdges( edges ); } } @@ -1899,12 +1899,12 @@ void MbFace::GetBoundaryEdges( ConstEdgesVector & boundaryEdges ) const { for ( size_t i = 0, loopsCnt = loops.size(); i < loopsCnt; ++i ) { const MbLoop * loop = loops[i]; - if ( loop == c3d_null ) + if ( loop == NULL ) continue; c3d::EdgeSPtr edge; for ( size_t j = 0, edgesCnt = loop->GetEdgesCount(); j < edgesCnt; ++j ) { const MbOrientedEdge * orientEdge = loop->_GetOrientedEdge( j ); - if ( orientEdge == c3d_null ) + if ( orientEdge == NULL ) continue; edge = const_cast( &orientEdge->GetCurveEdge() ); if ( edge->IsBoundaryFace() ) { @@ -1933,7 +1933,7 @@ void MbFace::GetNeighborFaces( FacesVector & neighborFaces ) const size_t neighborsCnt0 = neighborFaces.size(); for ( k = 0; k < neighborsCnt0; k++ ) { const MbFace * neighborFace = neighborFaces[k]; - if ( neighborFace != c3d_null ) + if ( neighborFace != NULL ) facesLabels.push_back( std::make_pair( neighborFace, neighborFace->GetLabel() ) ); } neighborsCnt0 = facesLabels.size(); @@ -1941,14 +1941,14 @@ void MbFace::GetNeighborFaces( FacesVector & neighborFaces ) const // mark neighbour faces by the first label for ( k = 0; k < loopsCnt; ++k ) { const MbLoop * loop = loops[k]; - if ( loop == c3d_null ) + if ( loop == NULL ) continue; for ( size_t edgeInd = 0, edgesCnt = loop->GetEdgesCount(); edgeInd < edgesCnt; ++edgeInd ) { const MbOrientedEdge * edge = loop->_GetOrientedEdge( edgeInd ); - if ( edge == c3d_null ) + if ( edge == NULL ) continue; const MbFace * neighborFace = edge->GetFaceMinus(); - if ( neighborFace != c3d_null && neighborFace != this ) { + if ( neighborFace != NULL && neighborFace != this ) { facesLabels.push_back( std::make_pair( neighborFace, neighborFace->GetLabel() ) ); // save initial label neighborFace->SetOwnLabel( ls_Used ); } diff --git a/C3d/Include/topology_faceset.h b/C3d/Include/topology_faceset.h index 33dfde1..2dd6d92 100644 --- a/C3d/Include/topology_faceset.h +++ b/C3d/Include/topology_faceset.h @@ -162,7 +162,7 @@ public : \return \ru Копия объекта или оригинал(в случае режима копирования cm_Same). \en Copy of an object or original (in a case of the mode cm_Same). \~ */ - MbFaceShell * Copy( MbeCopyMode sameShell, MbShellHistory * history = c3d_null, MbRegDuplicate * iReg = c3d_null ); + MbFaceShell * Copy( MbeCopyMode sameShell, MbShellHistory * history = NULL, MbRegDuplicate * iReg = NULL ); /** \brief \ru Создать копию. \en Create a copy. \~ @@ -171,7 +171,7 @@ public : \return \ru Копия объекта. \en Copy of the object. \~ */ - MbFaceShell * Duplicate( MbRegDuplicate * iReg = c3d_null ) const; + MbFaceShell * Duplicate( MbRegDuplicate * iReg = NULL ) const; /// \ru Замкнутая ли оболочка? \en Is shell closed? bool IsClosed() const { return closed; } @@ -191,7 +191,7 @@ public : bool delTemporal = false; for ( size_t i = 0, cnt = newFaces.size(); i < cnt; ++i ) { const MbFace * newFace = newFaces[i]; - if ( newFace == c3d_null ) + if ( newFace == NULL ) continue; if ( justAdd || ( std::find( faceSet.begin(), faceSet.end(), newFace ) == faceSet.end() ) ) { faceSet.push_back( const_cast(newFace) ); @@ -230,7 +230,7 @@ public : for ( size_t k = 0; k < facesCnt; ++k ) { face = faceSet[k]; ::DecRefItem( faceSet[k] ); - faceSet[k] = c3d_null; + faceSet[k] = C3D_NULL_PTR; detachFaces.push_back( face ); ::DetachItem( face ); } @@ -259,7 +259,7 @@ public : \param[in] iReg - \ru Регистратор объектов. \en Registrator of objects: \~ */ - void Transform( const MbMatrix3D & matr, MbRegTransform * iReg = c3d_null ); + void Transform( const MbMatrix3D & matr, MbRegTransform * iReg = NULL ); /** \brief \ru Сдвинуть вдоль вектора. \en Move along a vector. \~ @@ -274,7 +274,7 @@ public : \param[in] iReg - \ru Регистратор. \en Registrator. \~ */ - void Move( const MbVector3D & to, MbRegTransform * iReg = c3d_null ); + void Move( const MbVector3D & to, MbRegTransform * iReg = NULL ); /** \brief \ru Повернуть вокруг оси. \en Rotate around an axis. \~ @@ -291,7 +291,7 @@ public : \param[in] iReg - \ru Регистратор. \en Registrator. \~ */ - void Rotate( const MbAxis3D & axis, double angle, MbRegTransform * iReg = c3d_null ); + void Rotate( const MbAxis3D & axis, double angle, MbRegTransform * iReg = NULL ); /// \ru Рассчитать расстояние до точки. \en Calculate the distance to a point. double DistanceToPoint( const MbCartPoint3D & to ) const; /// \ru Вывернуть оболочку наизнанку - переориентировать все грани. \en Revert the shell - reorientation of the whole set of faces. @@ -299,7 +299,7 @@ public : /// \ru Являются ли объекты равными. \en Determine whether objects are equal. bool IsSame( const MbFaceShell & faces, double accuracy ) const; /// \ru Установить метки всем объектам, имеющим таковые. \en Set labels for all objects which have them. - void SetLabelThrough( MbeLabelState, void * = c3d_null ) const; + void SetLabelThrough( MbeLabelState, void * = NULL ) const; /// \ru Установить метки всем объектам, имеющим таковые. \en Set labels for all objects which have them. void SetLabelThrough( MbeLabelState, void *, bool ) const; /// \ru Удалить частные метки всем объектам, имеющим таковые. \en Remove private labels for all objects which have them. @@ -307,15 +307,15 @@ public : /// \ru Установить флаги изменённости объектов. \en Set flags that objects have been changed. void SetOwnChangedThrough( MbeChangedType n ); /// \ru Установить флаги в начальное состояние. \en Set flags to initial state. - void ResetFlags( void * = c3d_null ); + void ResetFlags( void * = NULL ); /// \ru Забрать в оболочку множество граней из оболочки faces. \en Move a set of faces to the shell from another shell. - bool UnionWith( MbFaceShell & faces, c3d::FacesSet * sharedSet = c3d_null ); + bool UnionWith( MbFaceShell & faces, c3d::FacesSet * sharedSet = NULL ); /// \ru Установить заданную метку всем вершинам оболочки. \en Set the given label for all vertices of the shell. - size_t SetVerticesLabel( MbeLabelState, void * = c3d_null) const; + size_t SetVerticesLabel( MbeLabelState, void * = NULL) const; /// \ru Установить заданную метку всем рёбрам оболочки. \en Set the given label for all edges of the shell. - size_t SetEdgesLabel ( MbeLabelState, void * = c3d_null) const; + size_t SetEdgesLabel ( MbeLabelState, void * = NULL) const; /// \ru Установить заданную метку всем граням оболочки. \en Set the given label for all faces of the shell. - void SetFacesLabel ( MbeLabelState, void * = c3d_null) const; + void SetFacesLabel ( MbeLabelState, void * = NULL) const; /// \ru Выдать множество вершин оболочки. \en Get a set of vertices of the shell. template @@ -350,7 +350,7 @@ public : void GetFacesSet( FacesSet & faces ) const { for ( size_t k = 0, kcnt = faceSet.size(); k < kcnt; ++k ) { - if ( faceSet[k] != c3d_null ) + if ( faceSet[k] != NULL ) faces.insert( faceSet[k] ); } } @@ -751,7 +751,7 @@ public : bool MergeSimilarFaces( SimpleName simMainName = c3d::SIMPLENAME_MAX ); /// \ru Создан ли временный объект сопровождения? \en Is a temporary object for the maintenance created? - bool IsTemporal() const { return (temporal != c3d_null); } + bool IsTemporal() const { return (temporal != NULL); } /// \ru Удалить временный объект сопровождения. \en Delete a temporary maintenance object. void RemoveTemporal( bool removeFacesTemporal = false ) const; /// \ru Создать новый временный объект сопровождения. \en Create new temporary maintenance object. @@ -795,10 +795,10 @@ MbFaceShell::MbFaceShell( const Faces & initFaces ) : MbTopItem() , faceSet ( initFaces.size(), 1 ) , closed ( true ) - , temporal ( c3d_null ) + , temporal ( NULL ) { for ( size_t i = 0, cnt = initFaces.size(); i < cnt; ++i ) { - if ( initFaces[i] != c3d_null ) + if ( initFaces[i] != NULL ) AddFace( *initFaces[i] ); } } @@ -960,7 +960,7 @@ bool MbFaceShell::FindIndexByFaces( const FacesPointersVector & initFaces, ItemI for ( size_t i = 0; i < initFacesCount; ++i ) { const MbFace * face = initFaces[i]; - if ( face != c3d_null ) { + if ( face != NULL ) { size_t i0 = SYS_MAX_T; c3d::ConstFaceIndexMap::iterator it = fiMap.find( face ); if ( it != fiMap.end() ) @@ -976,7 +976,7 @@ bool MbFaceShell::FindIndexByFaces( const FacesPointersVector & initFaces, ItemI if ( directFind ) { for ( size_t i = 0; i < initFacesCount; ++i ) { const MbFace * face = initFaces[i]; - if ( face != c3d_null ) { + if ( face != NULL ) { size_t i0 = GetFaceIndex( *face ); if ( i0 != SYS_MAX_T ) { index.Init( *face, i0 ); @@ -1001,7 +1001,7 @@ bool MbFaceShell::FindConstFacesByIndex( const ItemIndices & indices, ConstFaces for ( size_t j = 0, indicesCnt = indices.size(); j < indicesCnt; ++j ) { MbItemIndex & index = const_cast(indices[j]); // у stl доступ честный как const, у SArray дает на редактирование findFace = FindFaceByIndex( index ); - if ( findFace != c3d_null ) { + if ( findFace != NULL ) { initFaces.push_back( findFace ); ::DetachItem( findFace ); } @@ -1022,7 +1022,7 @@ bool MbFaceShell::FindFacesByIndex( const ItemIndices & indices, FacesPointersVe for ( size_t j = 0, indicesCnt = indices.size(); j < indicesCnt; ++j ) { MbItemIndex & index = const_cast(indices[j]); // у stl доступ честный как const, у SArray дает на редактирование findFace = const_cast(FindFaceByIndex( index )); - if ( findFace != c3d_null ) { + if ( findFace != NULL ) { initFaces.push_back( findFace ); ::DetachItem( findFace ); } @@ -1041,15 +1041,15 @@ bool MbFaceShell::GetBoundaryEdges( ConstEdgesVector & boundaryEdges ) const const size_t boundaryCnt = boundaryEdges.size(); for ( size_t i = 0, facesCnt = faceSet.size(); i < facesCnt; ++i ) { const MbFace * face = faceSet[i]; - if ( face == c3d_null ) + if ( face == NULL ) continue; for ( size_t j = 0, loopsCnt = face->GetLoopsCount(); j < loopsCnt; ++j ) { const MbLoop * loop = face->_GetLoop( j ); - if ( loop == c3d_null ) + if ( loop == NULL ) continue; for ( size_t k = 0, edgesCnt = loop->GetEdgesCount(); k < edgesCnt; ++k ) { const MbOrientedEdge * orientEdge = loop->_GetOrientedEdge( k ); - if ( orientEdge != c3d_null ) { + if ( orientEdge != NULL ) { c3d::ConstEdgeSPtr edge( &orientEdge->GetCurveEdge() ); if ( edge->IsBoundaryFace() ) boundaryEdges.push_back( edge ); @@ -1174,14 +1174,14 @@ public: if ( controlFaces.size() > 0 && sortedDelFaces.size() > 0 ) { for ( size_t k = controlFaces.size(); k--; ) { if ( std::binary_search( sortedDelFaces.begin(), sortedDelFaces.end(), controlFaces[k] ) ) { - controlFaces[k] = c3d_null; + controlFaces[k] = NULL; res = true; } } if ( res ) { std::sort( controlFaces.begin(), controlFaces.end() ); controlFaces.erase( std::unique( controlFaces.begin(), controlFaces.end() ), controlFaces.end() ); - if ( controlFaces.front() == c3d_null ) + if ( controlFaces.front() == NULL ) controlFaces.erase( controlFaces.begin() ); } } @@ -1215,19 +1215,19 @@ private: public: /// \ru Конструктор по умолчанию \en Default constructor - MbEdgeFunction () : edge(c3d_null), function(c3d_null), slideway(c3d_null) {} + MbEdgeFunction () : edge(NULL), function(NULL), slideway(NULL) {} /// \ru Конструктор по ребру и функции. \en Constructor by an edge and function. - MbEdgeFunction ( const MbCurveEdge * e, const MbFunction * f ) : edge(e), function(f), slideway(c3d_null) {} + MbEdgeFunction ( const MbCurveEdge * e, const MbFunction * f ) : edge(e), function(f), slideway(NULL) {} /// \ru Конструктор по ребру и опорной кривой. \en Constructor by an edge and a supporting curve. - MbEdgeFunction ( const MbCurveEdge * e, const MbCurve3D * c ) : edge(e), function(c3d_null), slideway(c) {} + MbEdgeFunction ( const MbCurveEdge * e, const MbCurve3D * c ) : edge(e), function(NULL), slideway(c) {} /// \ru Конструктор по другому ребру с функцией. \en Constructor by other edge with a function. MbEdgeFunction ( const MbEdgeFunction & other ) : edge(other.edge), function(other.function), slideway(other.slideway) {} ~MbEdgeFunction() {} public: /// \ru Инициализация по ребру и функции. \en Initialization by an edge and a function. - void Init( const MbCurveEdge * e, const MbFunction * f ) { edge = e; function = f; slideway = c3d_null; } + void Init( const MbCurveEdge * e, const MbFunction * f ) { edge = e; function = f; slideway = NULL; } /// \ru Инициализация по ребру и опорной кривой. \en Initialization by an edge and a supporting curve. - void Init( const MbCurveEdge * e, const MbCurve3D * c ) { edge = e; function = c3d_null; slideway = c; } + void Init( const MbCurveEdge * e, const MbCurve3D * c ) { edge = e; function = NULL; slideway = c; } /// \ru Дать ребро. \en Get an edge. const MbCurveEdge * Edge() const { return edge; } /// \ru Дать функцию изменения радиуса. \en Get a function of radius changing. @@ -1425,7 +1425,7 @@ public: /// \ru Конструктор по умолчанию. \en Default constructor. MbPntLoc() : pntLoc ( iloc_Undefined ) - , shell ( c3d_null ) + , shell ( NULL ) , ind ( SYS_MAX_T ) , dist ( MB_MAXDOUBLE ) , n ( MB_MAXDOUBLE ) @@ -1449,7 +1449,7 @@ public: /// \ru Получить положение пространственной точки. \en Get location of spatial point MbeItemLocation GetLocation() const { return pntLoc; } /// \ru Выбрана ли грань? \en Is a face chosen? - bool IsFaceSelected() const { return ((shell != c3d_null) && (ind < shell->GetFacesCount()) && (shell->GetFace(ind) != c3d_null)); } + bool IsFaceSelected() const { return ((shell != NULL) && (ind < shell->GetFacesCount()) && (shell->GetFace(ind) != NULL)); } /// \ru Выполнена ли классификация по грани? \en Is classification by the face performed? bool IsFaceData() const { return (IsFaceSelected() && !shell->IsTemporal(ind)) ? true : false; } /// \ru Выполнена ли классификация по грани сопровождения? \en Is classification by the face of maintenance performed? @@ -1458,7 +1458,7 @@ public: /// \ru Получить индекс грани. \en Get an index of a face. size_t GetFaceIndex() const { return ind; } /// \ru Получить грань. \en Get a face. - const MbFace * GetFace() const { return (IsFaceSelected() ? shell->GetFace(ind) : c3d_null); } + const MbFace * GetFace() const { return (IsFaceSelected() ? shell->GetFace(ind) : NULL); } /// \ru Получить расстояние до точки проекции. \en Get the distance to projection point. double GetDistance() const { return dist; } /// \ru Получить двумерную точку проекции. \en Get two-dimensional projection point. @@ -1478,7 +1478,7 @@ public: bool IsCorner() const { return corn; } /// \ru Получить поверхности грани. \en Get surfaces of a face. - const MbSurface * GetFaceSurface() const { return (IsFaceSelected() ? &shell->GetFace(ind)->GetSurface() : c3d_null); } + const MbSurface * GetFaceSurface() const { return (IsFaceSelected() ? &shell->GetFace(ind)->GetSurface() : NULL); } /// \ru Получить ориентацию грани относительно поверхности. \en Get face orientation relative a surface. bool GetFaceSense() const { return (IsFaceSelected() ? shell->GetFace(ind)->IsSameSense() : true); } /// \ru Получить поверхность смежной грани. \en Get a surface of adjacent face. @@ -1494,7 +1494,7 @@ public: void Reset() { pntLoc = iloc_Undefined; - shell = c3d_null; + shell = NULL; ind = SYS_MAX_T; dist = MB_MAXDOUBLE; n = MB_MAXDOUBLE; @@ -1589,7 +1589,7 @@ bool SetMainName( MbName & name, SimpleName mainName, bool addOldMainName ) */ // --- template -size_t SetEdgesLabel( const FacesVector & faceSet, MbeLabelState label, void * key = c3d_null ) +size_t SetEdgesLabel( const FacesVector & faceSet, MbeLabelState label, void * key = NULL ) { size_t maxCount = 1; diff --git a/C3d/Include/topology_item.h b/C3d/Include/topology_item.h index 79f517a..57be739 100644 --- a/C3d/Include/topology_item.h +++ b/C3d/Include/topology_item.h @@ -103,11 +103,11 @@ public: /// \ru Деструктор. \en Destructor without parameters. ~MbLabel(); /// \ru Установить частную или собственную метку (соответствующую ключу). \en Set own or private label (according to the key). - void SetLabel( const MbeLabelState, void * key = c3d_null ); + void SetLabel( const MbeLabelState, void * key = NULL ); /// \ru Установить частную или собственную метку (соответствующую ключу). \en Set own or private label (according to the key). void SetLabel( const MbeLabelState, void * key, bool setLock ); /// \ru Получить частную или собственную метку (соответствующую ключу). \en Get own or private label (according to thew key). - int8 GetLabel( void * key = c3d_null ); + int8 GetLabel( void * key = NULL ); /// \ru Удалить частные метки(освободить память) соответствующие ключу. \en Remove private labels (free memory) according to the key. void DeletePrivate( void * key ); /// \ru Присвоить значение собственной метке. \en Assign values to own label. @@ -232,7 +232,7 @@ public : \en Registrator. \~ \ingroup Topology_Items */ - virtual void Transform( const MbMatrix3D & matr, MbRegTransform * iReg = c3d_null ) = 0; + virtual void Transform( const MbMatrix3D & matr, MbRegTransform * iReg = NULL ) = 0; /** \brief \ru Сдвинуть вдоль вектора. \en Move along a vector. \~ @@ -250,7 +250,7 @@ public : \en Registrator. \~ \ingroup Topology_Items */ - virtual void Move ( const MbVector3D & to, MbRegTransform * iReg = c3d_null ) = 0; + virtual void Move ( const MbVector3D & to, MbRegTransform * iReg = NULL ) = 0; /** \brief \ru Повернуть вокруг оси. \en Rotate around an axis. \~ @@ -270,7 +270,7 @@ public : \en Registrator. \~ \ingroup Topology_Items */ - virtual void Rotate ( const MbAxis3D & axis, double angle, MbRegTransform * iReg = c3d_null ) = 0; + virtual void Rotate ( const MbAxis3D & axis, double angle, MbRegTransform * iReg = NULL ) = 0; /// \ru Вычислить расстояние до точки. \en Calculate the distance to a point. virtual double DistanceToPoint( const MbCartPoint3D & ) const = 0; @@ -324,15 +324,15 @@ public : bool IsOwnChangedWeakly() const; /// \ru Получить метку. \en Get label. - MbeLabelState GetLabel( void * key = c3d_null ) const { return (MbeLabelState)label.GetLabel(key); } + MbeLabelState GetLabel( void * key = NULL ) const { return (MbeLabelState)label.GetLabel(key); } /// \ru Установить метку. \en Set a label of the loop. - void SetOwnLabel( MbeLabelState l, void * key = c3d_null ) const { label.SetLabel( l, key ); } + void SetOwnLabel( MbeLabelState l, void * key = NULL ) const { label.SetLabel( l, key ); } /// \ru Установить метку. \en Set a label of the loop. void SetOwnLabel( MbeLabelState l, void * key, bool setLock ) const { if ( setLock || GetUseCount() > 1 ) return SetOwnLabel( l, key ); label.SetLabel( l, key ); } /// \ru Предназначен ли объект для удаления? Определяется по меткам. \en Is this object intended for deletion? This is defined by labels. - bool ToDelete() const { return( (MbeLabelState)label.GetLabel(c3d_null) == ls_Delete || (MbeLabelState)label.GetLabel(c3d_null) == ls_Error ); } + bool ToDelete() const { return( (MbeLabelState)label.GetLabel(NULL) == ls_Delete || (MbeLabelState)label.GetLabel(NULL) == ls_Error ); } /// \ru Удалить частную метку. \en Remove private label. - void RemovePrivateLabel ( void * key = c3d_null ) const { label.DeletePrivate(key); } + void RemovePrivateLabel ( void * key = NULL ) const { label.DeletePrivate(key); } /// \ru Копирование данных объекта. \en Copying of the object data. void Assign( const MbTopologyItem & ); @@ -403,11 +403,11 @@ public: /// \ru Тип элемента. \en A type of element. virtual MbeTopologyType IsA() const; // \ru Преобразовать согласно матрице. \en Transform according to the matrix. - virtual void Transform( const MbMatrix3D &, MbRegTransform * = c3d_null ); + virtual void Transform( const MbMatrix3D &, MbRegTransform * = NULL ); // \ru Сдвинуть вдоль вектора. \en Move along a vector. - virtual void Move ( const MbVector3D &, MbRegTransform * = c3d_null ); + virtual void Move ( const MbVector3D &, MbRegTransform * = NULL ); //\ru Повернуть вокруг оси. \en Rotate around an axis. - virtual void Rotate ( const MbAxis3D &, double, MbRegTransform * = c3d_null ); + virtual void Rotate ( const MbAxis3D &, double, MbRegTransform * = NULL ); public: // \ru Вычислить расстояние до точки. \en Calculate the distance to a point. virtual double DistanceToPoint( const MbCartPoint3D & ) const; diff --git a/C3d/Include/tri_lump.h b/C3d/Include/tri_lump.h index 934f116..e2934f5 100644 --- a/C3d/Include/tri_lump.h +++ b/C3d/Include/tri_lump.h @@ -12,21 +12,24 @@ #include -#include -#include +#include #include +class MATH_CLASS MbGrid; + + //---------------------------------------------------------------------------------------- /** \brief \ru Математическая грань и ее рассчитанная решетка. \en Mathematical face and its calculated grid. \~ \ingroup Polygonal_Objects */ // --- -class MATH_CLASS MbFaceAndGrid { - c3d::ConstFaceSPtr face; ///< \ru Грань. \en A face. +class MATH_CLASS MbFaceAndGrid +{ + SPtr face; ///< \ru Грань. \en A face. public: - c3d::ConstGridSPtr grid; ///< \ru Триангуляция грани. \en A face triangulation. + SPtr grid; ///< \ru Триангуляция грани. \en A face triangulation. public: /** \brief \ru Конструктор по грани и ее триангуляции.\n @@ -65,8 +68,7 @@ public: return *this; } - DEPRECATE_DECLARE - const MbFace & GetFace() const { return *face; } // deprecated + const MbFace & GetFace() const { return *face; } // deprecated }; @@ -108,13 +110,13 @@ public: {} /** \brief \ru Добавить грань с триангуляцией. \en Add face with triangulation. \~ - \param[in] face - \ru Грань с триангуляционной решеткой. + \param[in] face - \ru Грань с триангулюционной решеткой. \en A face with triangulation grid. \~ */ void AddFace( const MbFaceAndGrid & face ) { faces.push_back( face ); } // \ru Объявление конструктора копирования и оператора присваивания без реализации, чтобы не было присваивания по умолчанию. \en The declaration without implementation of the copy-constructor and assignment operator to prevent an assignment by default. -OBVIOUS_PRIVATE_COPY(MbLumpAndFaces) + OBVIOUS_PRIVATE_COPY(MbLumpAndFaces); }; diff --git a/C3d/Include/wire_frame.h b/C3d/Include/wire_frame.h index 3945d26..bad9f89 100644 --- a/C3d/Include/wire_frame.h +++ b/C3d/Include/wire_frame.h @@ -63,17 +63,17 @@ public : /// \ru Конструктор без параметров. \en Constructor without parameters. MbWireFrame(); /// \ru Конструктор по кривой и строителю. \en Constructor by a curve and creator. - MbWireFrame( const MbCurve3D &, const MbCreator * = c3d_null ); + MbWireFrame( const MbCurve3D &, const MbCreator * = NULL ); /// \ru Конструктор по множеству кривых и строителю. \en Constructor by a set of curves and creator. - MbWireFrame( const RPArray &, const MbCreator * = c3d_null ); + MbWireFrame( const RPArray &, const MbCreator * = NULL ); /// \ru Конструктор по множеству кривых и строителю. \en Constructor by a set of curves and creator. - MbWireFrame( const c3d::SpaceCurvesSPtrVector &, const MbCreator * = c3d_null ); + MbWireFrame( const c3d::SpaceCurvesSPtrVector &, const MbCreator * = NULL ); /// \ru Конструктор по ребру и строителю. \en Constructor by an edge and creator. - MbWireFrame( const MbEdge &, const MbCreator * = c3d_null, bool same = true ); + MbWireFrame( const MbEdge &, const MbCreator * = NULL, bool same = true ); /// \ru Конструктор по множеству рёбер и строителю. \en Constructor by a set of edges and creator. - MbWireFrame( const RPArray &, const MbCreator * = c3d_null, bool same = true ); + MbWireFrame( const RPArray &, const MbCreator * = NULL, bool same = true ); /// \ru Конструктор по множеству рёбер и строителю. \en Constructor by a set of edges and creator. - MbWireFrame( const c3d::WireEdgesSPtrVector &, const MbCreator * = c3d_null, bool same = true ); + MbWireFrame( const c3d::WireEdgesSPtrVector &, const MbCreator * = NULL, bool same = true ); /// \ru Деструктор. \en Destructor. virtual ~MbWireFrame(); @@ -83,10 +83,10 @@ public : // \ru Общие функции геометрического объекта. \en Common functions of a geometric object. virtual MbeSpaceType IsA() const; // \ru Тип объекта. \en An object type. - virtual MbSpaceItem & Duplicate( MbRegDuplicate * iReg = c3d_null ) const; // \ru Создать копию. \en Create a copy. - virtual void Transform( const MbMatrix3D &, MbRegTransform * = c3d_null ); // \ru Преобразовать согласно матрице. \en Transform according to the matrix. - virtual void Move ( const MbVector3D &, MbRegTransform * = c3d_null ); // \ru Сдвинуть вдоль вектора. \en Translate along a vector. - virtual void Rotate ( const MbAxis3D &, double angle, MbRegTransform * = c3d_null ); // \ru Повернуть вокруг оси. \en Rotate about an axis. + virtual MbSpaceItem & Duplicate( MbRegDuplicate * iReg = NULL ) const; // \ru Создать копию. \en Create a copy. + virtual void Transform( const MbMatrix3D &, MbRegTransform * = NULL ); // \ru Преобразовать согласно матрице. \en Transform according to the matrix. + virtual void Move ( const MbVector3D &, MbRegTransform * = NULL ); // \ru Сдвинуть вдоль вектора. \en Translate along a vector. + virtual void Rotate ( const MbAxis3D &, double angle, MbRegTransform * = NULL ); // \ru Повернуть вокруг оси. \en Rotate about an axis. virtual bool IsSame ( const MbSpaceItem &, double accuracy = LENGTH_EPSILON ) const; // \ru Являются ли объекты равными? \en Are the objects equal? virtual bool IsSimilar( const MbSpaceItem & ) const; // \ru Являются ли объекты подобными? \en Are the objects similar? virtual bool SetEqual ( const MbSpaceItem & ); // \ru Сделать объекты равными. \en Make the objects equal. @@ -114,9 +114,9 @@ public : /// \ru Выдать количество ребер каркаса. \en Get the number of edges of the frame. size_t GetEdgesCount() const { return edges.size(); } /// \ru Выдать объект по индексу. \en Get the item by index. - const MbEdge * GetEdge( size_t i ) const { return (i < edges.size()) ? edges[i] : c3d_null; } + const MbEdge * GetEdge( size_t i ) const { return (i < edges.size()) ? edges[i] : NULL; } /// \ru Выдать объект по индексу для возможного редактирования. \en Get the item by index for the possible editing. - MbEdge * SetEdge( size_t i ) { return (i < edges.size()) ? edges[i] : c3d_null; } + MbEdge * SetEdge( size_t i ) { return (i < edges.size()) ? edges[i] : NULL; } /// \ru Получить ребра. \en Get edges. template @@ -214,10 +214,10 @@ public : If beginSafe == false then the edge saves its ending piece. According to the parameter 'eps' drop out value in the container 'params', coinciding with each other and with the initial and final parameters of the curve. The container 'edges' contains cut parts. \~ - \params[in, out] targetEdge - \ru Ребро для разрезания. Возвращается урезанный кусок с учетом флага beginSafe или c3d_null, + \params[in, out] targetEdge - \ru Ребро для разрезания. Возвращается урезанный кусок с учетом флага beginSafe или NULL, если параметр разрезания находится на расстоянии меньшим еps от соответствующего конца кривой, \en Edge for cutting. The return value of 'targetEdge' is the shortened edge according to 'beginSafe' flag - or c3d_null, if the cut param in 'params' lies at the distance less than 'eps' from the corresponding end of the curve, + or NULL, if the cut param in 'params' lies at the distance less than 'eps' from the corresponding end of the curve, \param[in] params - \ru Параметры кривой для разбиения ребра, \en Parameters of intersection curve of edge to split, \~ \param[in] beginSafe - \ru Ребро сохранит начальную часть (true) или ребро сохранит конечную часть (false), @@ -295,7 +295,7 @@ void MbWireFrame::GetCurves( CurvesVector & curves ) const c3d::SpaceCurveSPtr curve; for ( size_t k = 0; k < edgesCnt; ++k ) { const MbEdge * edge = edges[k]; - if ( edge != c3d_null ) { + if ( edge != NULL ) { curve = const_cast( &edge->GetCurve() ); curves.push_back( curve ); ::DetachItem( curve ); @@ -311,7 +311,7 @@ template void MbWireFrame::AddEdges( const WireEdgesVector & items, bool same ) { bool add = false; - MbRegDuplicate * iReg = c3d_null; + MbRegDuplicate * iReg = NULL; MbAutoRegDuplicate autoReg( iReg ); size_t addCnt = items.size(); @@ -321,7 +321,7 @@ void MbWireFrame::AddEdges( const WireEdgesVector & items, bool same ) for ( size_t k = 0; k < addCnt; ++k ) { const MbEdge * item = items[k]; - if ( item != c3d_null ) { + if ( item != NULL ) { edge = same ? const_cast(item) : item->DataDuplicate( iReg ); edge->AddRef(); edges.push_back( edge ); @@ -351,7 +351,7 @@ template void ExtractCurvesDeleteFrame( MbWireFrame *& wireFrame, CurvesVector & curves ) { - if ( wireFrame != c3d_null ) { + if ( wireFrame != NULL ) { c3d::SpaceCurvesSPtrVector wireCurves; wireFrame->GetCurves( wireCurves ); ::DeleteItem( wireFrame ); @@ -362,7 +362,7 @@ void ExtractCurvesDeleteFrame( MbWireFrame *& wireFrame, curves.reserve( curves.size() + wireCurvesCnt ); for ( size_t k = 0; k < wireCurvesCnt; ++k ) { MbCurve3D * curve = ::DetachItem( wireCurves[k] ); - if ( curve != c3d_null ) { + if ( curve != NULL ) { curves.push_back( curve ); } } @@ -387,14 +387,14 @@ inline void ExtractCurveDeleteFrame( MbWireFrame *& wireFrame, MbCurve3D *& curve ) { - if ( wireFrame != c3d_null ) { + if ( wireFrame != NULL ) { c3d::WireEdgeSPtr edge( wireFrame->DetachEdge( 0 ) ); // \ru Отцепить объект \en Detach an object ::DeleteItem( wireFrame ); - if ( edge != c3d_null ) { + if ( edge != NULL ) { curve = &edge->SetCurve(); ::AddRefItem( curve ); - edge = c3d_null; + edge = NULL; ::DecRefItem( curve ); } } @@ -422,7 +422,7 @@ void ExtractCurveDeleteFrame( MbWireFrame *& wireFrame, MATH_FUNC (bool) CreateWireFrame( MbWireFrame *& result, const RPArray & curves, const MbSNameMaker & snMaker, - const MbCreator * creator = c3d_null ); + const MbCreator * creator = NULL ); //------------------------------------------------------------------------------ @@ -446,7 +446,7 @@ MATH_FUNC (bool) CreateWireFrame( MbWireFrame *& result, MATH_FUNC (bool) CreateWireFrame( MbWireFrame *& result, const MbCurve3D & curve, const MbSNameMaker & snMaker, - const MbCreator * creator = c3d_null ); + const MbCreator * creator = NULL ); #endif // __WIRE_FRAME_H diff --git a/C3d/Lib/x32/Debug/c3d.lib b/C3d/Lib/x32/Debug/c3d.lib index e3be29e..707cd1c 100644 Binary files a/C3d/Lib/x32/Debug/c3d.lib and b/C3d/Lib/x32/Debug/c3d.lib differ diff --git a/C3d/Lib/x32/Release/c3d.lib b/C3d/Lib/x32/Release/c3d.lib index 5919a20..cce4a13 100644 Binary files a/C3d/Lib/x32/Release/c3d.lib and b/C3d/Lib/x32/Release/c3d.lib differ diff --git a/C3d/Lib/x64/Debug/c3d.lib b/C3d/Lib/x64/Debug/c3d.lib index b835024..4574a4f 100644 Binary files a/C3d/Lib/x64/Debug/c3d.lib and b/C3d/Lib/x64/Debug/c3d.lib differ diff --git a/C3d/Lib/x64/Release/c3d.lib b/C3d/Lib/x64/Release/c3d.lib index 0902f36..9d9f1c4 100644 Binary files a/C3d/Lib/x64/Release/c3d.lib and b/C3d/Lib/x64/Release/c3d.lib differ