- C3d aggiornamento delle librerie.
This commit is contained in:
Dario Sassi
2020-09-22 07:55:16 +00:00
parent c8648ee8b4
commit 2c16789909
53 changed files with 2940 additions and 2237 deletions
+60 -3
View File
@@ -76,6 +76,52 @@ MATH_FUNC (bool) IsMultiShell( const MbFaceShell * shell, bool checkNesting = tr
MATH_FUNC (size_t) DetachShells( MbFaceShell & shell, RPArray<MbFaceShell> & parts, bool sort );
//------------------------------------------------------------------------------
/** \brief \ru Отделить части оболочки.
\en Separate parts from a shell. \~
\details \ru Отделить части оболочки без анализа вложенности.
Если sort == true, то наибольшая часть оболочки останется в исходной оболочке,
а отделившиеся от неё части будут сложены в parts с сортировкой по убыванию габарита. \n
\en Separate parts from a shell without inclusion analysis.
If 'sort' == 'true', the greatest part of the shell will remain in the initial shell,
separated parts will be collected in array 'parts' sorted by bounding box size in descending order. \n \~
\param[in] shell - \ru Исходная оболочка.
\en The initial shell. \~
\param[out] parts - \ru Оболочки, полученные из shell.
\en The shells separated from 'shell'. \~
\param[in] sort - \ru Выполнять ли сортировку частей оболочки по убыванию габарита?
\en If 'sort' == true, the parts separated from the initial shell will be sorted by bounding box size in descending order. \~
\result \ru Возвращает количество оболочек в parts.
\en Returns number of shells in 'parts'. \~
\ingroup Algorithms_3D
*/
// ---
MATH_FUNC (size_t) DetachShells( MbFaceShell & shell, c3d::ShellsVector & parts, bool sort );
//------------------------------------------------------------------------------
/** \brief \ru Отделить части оболочки.
\en Separate parts from a shell. \~
\details \ru Отделить части оболочки без анализа вложенности.
Если sort == true, то наибольшая часть оболочки останется в исходной оболочке,
а отделившиеся от неё части будут сложены в parts с сортировкой по убыванию габарита. \n
\en Separate parts from a shell without inclusion analysis.
If 'sort' == 'true', the greatest part of the shell will remain in the initial shell,
separated parts will be collected in array 'parts' sorted by bounding box size in descending order. \n \~
\param[in] shell - \ru Исходная оболочка.
\en The initial shell. \~
\param[out] parts - \ru Оболочки, полученные из shell.
\en The shells separated from 'shell'. \~
\param[in] sort - \ru Выполнять ли сортировку частей оболочки по убыванию габарита?
\en If 'sort' == true, the parts separated from the initial shell will be sorted by bounding box size in descending order. \~
\result \ru Возвращает количество оболочек в parts.
\en Returns number of shells in 'parts'. \~
\ingroup Algorithms_3D
*/
// ---
MATH_FUNC (size_t) DetachShells( MbFaceShell & shell, c3d::ShellsSPtrVector & parts, bool sort );
//------------------------------------------------------------------------------
/** \brief \ru Отделить части оболочки.
\en Separate parts from a shell. \~
@@ -94,7 +140,16 @@ MATH_FUNC (size_t) DetachShells( MbFaceShell & shell, RPArray<MbFaceShell> & par
\ingroup Algorithms_3D
*/
// ---
MATH_FUNC (size_t) CreateShells( MbFaceShell & shell, RPArray<MbFaceShell> & parts );
template <class ShellsVector>
size_t CreateShells( MbFaceShell & shell, ShellsVector & parts, bool sort = true )
{
c3d::ShellSPtr outer( new MbFaceShell( shell ) ); // new shell on the same faces (новая оболочка с теми же гранями)
if ( ::DetachShells( *outer, parts, sort ) > 0 )
parts.push_back( ::DetachItem( outer ) );
return parts.size();
}
//------------------------------------------------------------------------------
@@ -779,7 +834,7 @@ MATH_FUNC (bool) ProjectVectorOn( const MbVector3D & v3d, const MbSurface & surf
MATH_FUNC (MbSurface *) GetExtendedSurfaceCopy( MbCube & gabarit,
const MbSurface & surf,
const MbShellCuttingParams::ProlongState & prolongState,
VERSION version );
VERSION version );// = Math::DefaultMathVersion() );
//------------------------------------------------------------------------------
@@ -877,7 +932,9 @@ MATH_FUNC (MbCurve *) GetProjCurveOnSurface( const MbSurfaceIntersectionCurve &
\ingroup Algorithms_3D
*/
// ---
MATH_FUNC (bool) IsSameSpineDirection( const MbCurve3D & curve, VERSION srcVersion, VERSION dstVersion );
MATH_FUNC (bool) IsSameSpineDirection( const MbCurve3D & curve,
VERSION srcVersion,
VERSION dstVersion );// = Math::DefaultMathVersion() );
//------------------------------------------------------------------------------
+1 -1
View File
@@ -484,7 +484,7 @@ MATH_FUNC (MbContour *) OffsetContour( const MbContour & cntr,
double xEpsilon,
double yEpsilon,
bool modifySegments,
VERSION version = Math::DefaultMathVersion()/*BUG_61694*/ );
VERSION version = Math::DefaultMathVersion() ); // BUG_61694
//------------------------------------------------------------------------------
+28 -7
View File
@@ -56,7 +56,7 @@ struct MATH_CLASS EvolutionValues;
// ---
MATH_FUNC (MbResultType) Line( const MbCartPoint3D & point1,
const MbCartPoint3D & point2,
MbCurve3D *& result );
MbCurve3D *& result );
//------------------------------------------------------------------------------
@@ -77,7 +77,7 @@ MATH_FUNC (MbResultType) Line( const MbCartPoint3D & point1,
// ---
MATH_FUNC (MbResultType) Segment( const MbCartPoint3D & point1,
const MbCartPoint3D & point2,
MbCurve3D *& result );
MbCurve3D *& result );
//------------------------------------------------------------------------------
@@ -180,7 +180,7 @@ MATH_FUNC (MbResultType) SplineCurve( const SArray<MbCartPoint3D> & pointList,
MATH_FUNC (MbResultType) NurbsCurve( const SArray<MbCartPoint3D> & pointList,
const SArray<double> & weightList, size_t degree,
const SArray<double> & knotList, bool curveClosed,
MbCurve3D *& result );
MbCurve3D *& result );
//------------------------------------------------------------------------------
@@ -198,7 +198,7 @@ MATH_FUNC (MbResultType) NurbsCurve( const SArray<MbCartPoint3D> & pointList,
*/
//---
MATH_FUNC (MbResultType) NurbsCopy( const MbCurve3D & curve,
MbCurve3D *& result );
MbCurve3D *& result );
//------------------------------------------------------------------------------
@@ -399,7 +399,7 @@ MATH_FUNC (MbResultType) AddCurveToContour( MbCurve3D & curve,
// ---
MATH_FUNC (MbResultType) PlaneCurve( const MbPlacement3D & place,
const MbCurve & curve,
MbCurve3D *& result );
MbCurve3D *& result );
//------------------------------------------------------------------------------
/** \brief \ru Построить кривую на поверхности по двумерной кривой.
@@ -421,7 +421,7 @@ MATH_FUNC (MbResultType) PlaneCurve( const MbPlacement3D & place,
// ---
MATH_FUNC (MbResultType) SurfaceCurve( const MbSurface & surface,
const MbCurve & curve,
MbCurve3D *& result );
MbCurve3D *& result );
//------------------------------------------------------------------------------
@@ -823,7 +823,13 @@ MATH_FUNC (MbResultType) CreateFairBSplineCurveOnTangentPolyline( MbCurve3D *
// ---
MATH_FUNC(MbResultType) CreateFairBezierCurveOnBasePolyline( MbCurve3D * polyline,
MbFairCurveData & data,
MbCurve3D *& result);
MbCurve3D *& result);
//------------------------------------------------------------------------------
// Создать плавную кривую Безье сопряжения.
// ---
MATH_FUNC(MbResultType) CreateFairBezierFilletOnPolyline( MbCurve3D * pllne,
MbFairCurveData & data,
MbCurve3D *& resCurve );
//------------------------------------------------------------------------------
@@ -1180,6 +1186,15 @@ MATH_FUNC(MbResultType) ExtractChangeNurbs( MbNurbs3D * curve,
MbFairCurveData & data,
MbCurve3D *& result );
//------------------------------------------------------------------------------
// Выделить участок / изменить формат NURBS кривой.
// Передать параметры созданной.
// ---
MATH_FUNC(MbResultType) ExtractChangeNurbsParams( MbNurbs3D * curve,
MbFairCurveData & data,
SArray<double> & resWts,
SArray<double> & resKnots,
MbCurve3D *& resCurve );
//------------------------------------------------------------------------------
/** \brief \ru Вставить узел в NURBS.
@@ -1204,6 +1219,12 @@ MATH_FUNC(MbResultType) AddKnotNurbs( MbNurbs3D * curve,
MbFairCurveData & data,
MbCurve3D *& result );
//------------------------------------------------------------------------------
// Вставить узел в NURBS кривую и выделить один сегмент.
// ---
MATH_FUNC(MbResultType)ExtractExtrapolFromSegment( MbNurbs3D * curve,
MbFairCurveData & data,
MbCurve3D *& resCurve );
//------------------------------------------------------------------------------
/** \brief \ru Преобразовать конический NURBzS в конический NURBS.
+7 -2
View File
@@ -101,6 +101,7 @@ MATH_FUNC (MbResultType) CreateIcosahedron( const MbPlacement3D & place,
const MbFormNote & fn,
MbMesh *& result );
//------------------------------------------------------------------------------
/** \brief \ru Построить параллелепипед в виде полигональной модели.
\en Construct a parallepiped mesh. \~
@@ -129,7 +130,9 @@ MATH_FUNC (MbResultType) CreateIcosahedron( const MbPlacement3D & place,
\ingroup Polygonal_Objects
*/
// ---
MATH_FUNC (MbResultType) CreateBoxMesh( const MbMatrix3D & trans, SPtr<MbMesh> & result );
MATH_FUNC (MbResultType) CreateBoxMesh( const MbMatrix3D & trans,
SPtr<MbMesh> & result );
//------------------------------------------------------------------------------
/** \brief \ru Построить параллелепипед в виде проволочной модели.
@@ -139,7 +142,9 @@ MATH_FUNC (MbResultType) CreateBoxMesh( const MbMatrix3D & trans, SPtr<MbMesh> &
\ingroup Polygonal_Objects
*/
//---
MATH_FUNC (MbResultType) CreateBoxWire( const MbMatrix3D & trans, SPtr<MbMesh> & result );
MATH_FUNC (MbResultType) CreateBoxWire( const MbMatrix3D & trans,
SPtr<MbMesh> & result );
//------------------------------------------------------------------------------
// .
+2 -2
View File
@@ -678,8 +678,8 @@ MATH_FUNC (ptrdiff_t) CurveCurveIntersection( const MbCurve3D & curve1,
const MbCurve3D & curve2,
SArray<double> & result1,
SArray<double> & result2,
double mEps, // = Math::metricRegion );
VERSION version );
double mEps, // = Math::metricRegion,
VERSION version = Math::DefaultMathVersion() );
//------------------------------------------------------------------------------
+3 -3
View File
@@ -2369,8 +2369,8 @@ 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] parameters - \ru Параметры операции.
\en Operation parameters. \~
\param[in/out] parameters - \ru Параметры операции.
\en Operation parameters. \~
\param[in] nameMaker - \ru Именователь.
\en An object for naming the new objects. \~
\param[out] result - \ru Результирующее тело.
@@ -2386,7 +2386,7 @@ MATH_FUNC (MbResultType) ConvertSolidToSheetMetal( MbSolid &
const MbeCopyMode sameShell,
const MbFace & initFace,
bool sence,
const MbSolidToSheetMetalValues & parameters,
MbSolidToSheetMetalValues & parameters,
MbSNameMaker & nameMaker,
MbSolid *& result );
+242
View File
@@ -2033,6 +2033,56 @@ MATH_FUNC (MbResultType) UnionSolid( const RPArray<MbSolid> & solids,
MbSolid *& result );
//------------------------------------------------------------------------------
/** \brief \ru Создать одно тело из присланных тел.
\en Create a solid from the specified solids. \~
\details \ru Создать одно тело из присланных тел, не меняя их. \n
Объединение тел заданного множества выполняется простым перекладыванием
граней всех тел в одно новое тело. \n
\en Create a solid from the specified solids without the modification of the given solids. \n
The union of solids from the specified set is performed by simple moving
the faces of all the solids into a new solid. \n \~
\param[in] solids - \ru Множество тел.
\en An array of solids. \~
\param[in] names - \ru Именователь.
\en An object for naming the new objects. \~
\param[out] result - \ru Построенное тело.
\en The resultant solid. \~
\return \ru Возвращает код результата операции.
\en Returns operation result code. \~
\ingroup Solid_Modeling
*/
// ---
MATH_FUNC (MbResultType) UnionSolid( const c3d::SolidsVector & solids,
const MbSNameMaker & names,
MbSolid *& result );
//------------------------------------------------------------------------------
/** \brief \ru Создать одно тело из присланных тел.
\en Create a solid from the specified solids. \~
\details \ru Создать одно тело из присланных тел, не меняя их. \n
Объединение тел заданного множества выполняется простым перекладыванием
граней всех тел в одно новое тело. \n
\en Create a solid from the specified solids without the modification of the given solids. \n
The union of solids from the specified set is performed by simple moving
the faces of all the solids into a new solid. \n \~
\param[in] solids - \ru Множество тел.
\en An array of solids. \~
\param[in] names - \ru Именователь.
\en An object for naming the new objects. \~
\param[out] result - \ru Построенное тело.
\en The resultant solid. \~
\return \ru Возвращает код результата операции.
\en Returns operation result code. \~
\ingroup Solid_Modeling
*/
// ---
MATH_FUNC (MbResultType) UnionSolid( const c3d::SolidsSPtrVector & solids,
const MbSNameMaker & names,
MbSolid *& result );
//------------------------------------------------------------------------------
/** \brief \ru Разделить тело на отдельные части.
\en Split the solid into separate parts. \~
@@ -2067,6 +2117,74 @@ MATH_FUNC (size_t) DetachParts( MbSolid & solid,
const MbSNameMaker & names );
//------------------------------------------------------------------------------
/** \brief \ru Разделить тело на отдельные части.
\en Split the solid into separate parts. \~
\details \ru Если исходное тело распадается на части, то наибольшая часть остаётся в исходном теле,
а остальные части части будут сложены в присланный контейнер тел. \n
Если флаг сортировки sort == true, то в исходном теле останется часть с наибольшим габаритом,
а отделённые части будут сортированы по убыванию габарита. В противном случае в исходном теле
останется часть, топологически связанная с первой гранью, а отделённые части будут сортированы
по номеру начальной грани в исходном теле. \n
\en If the source solid is decomposed, the greatest part remains in the source solid,
and the other parts are put into the given array of solids. \n
If 'sort' == 'true', the part with the greatest bounding box will remain in the source solid,
and separated parts will be sorted by bounding box size in descending order. Otherwise a part topologically connected with the first face will remain in the source solid
and the separated parts will be sorted
by the number of the initial face in the source solid. \n \~
\param[in,out] solid - \ru Исходное модифицируемое тело.
\en The source solid to be modified. \~
\param[out] parts - \ru Отделённые части тела.
\en The separated parts of the solid. \~
\param[in] sort - \ru Сортировать по убыванию габарита.
\en Whether to sort by the bounding box size in descending order. \~
\param[in] names - \ru Именователь.
\en An object for naming the new objects. \~
\return \ru Возвращает количество отделенных частей.
\en Returns the number of the separated parts. \~
\ingroup Solid_Modeling
*/
// ---
MATH_FUNC (size_t) DetachParts( MbSolid & solid,
c3d::SolidsVector & parts,
bool sort,
const MbSNameMaker & names );
//------------------------------------------------------------------------------
/** \brief \ru Разделить тело на отдельные части.
\en Split the solid into separate parts. \~
\details \ru Если исходное тело распадается на части, то наибольшая часть остаётся в исходном теле,
а остальные части части будут сложены в присланный контейнер тел. \n
Если флаг сортировки sort == true, то в исходном теле останется часть с наибольшим габаритом,
а отделённые части будут сортированы по убыванию габарита. В противном случае в исходном теле
останется часть, топологически связанная с первой гранью, а отделённые части будут сортированы
по номеру начальной грани в исходном теле. \n
\en If the source solid is decomposed, the greatest part remains in the source solid,
and the other parts are put into the given array of solids. \n
If 'sort' == 'true', the part with the greatest bounding box will remain in the source solid,
and separated parts will be sorted by bounding box size in descending order. Otherwise a part topologically connected with the first face will remain in the source solid
and the separated parts will be sorted
by the number of the initial face in the source solid. \n \~
\param[in,out] solid - \ru Исходное модифицируемое тело.
\en The source solid to be modified. \~
\param[out] parts - \ru Отделённые части тела.
\en The separated parts of the solid. \~
\param[in] sort - \ru Сортировать по убыванию габарита.
\en Whether to sort by the bounding box size in descending order. \~
\param[in] names - \ru Именователь.
\en An object for naming the new objects. \~
\return \ru Возвращает количество отделенных частей.
\en Returns the number of the separated parts. \~
\ingroup Solid_Modeling
*/
// ---
MATH_FUNC (size_t) DetachParts( MbSolid & solid,
c3d::SolidsSPtrVector & parts,
bool sort,
const MbSNameMaker & names );
//------------------------------------------------------------------------------
/** \brief \ru Разделить тело на отдельные части.
\en Split the solid into separate parts. \~
@@ -2090,6 +2208,130 @@ MATH_FUNC (size_t) CreateParts( const MbSolid & solid,
const MbSNameMaker & names );
//------------------------------------------------------------------------------
/** \brief \ru Разделить тело на отдельные части.
\en Split the solid into separate parts. \~
\details \ru Если исходное тело распадается на части, то все его части будут сложены в присланный контейнер тел. \n
Исходное тело остаётся неизменённым. \n
\en If the source solid is decomposed, all the parts of the solid will be put into the given array of solids. \n
The source solid remains unchanged. \n \~
\param[in] solid - \ru Исходное тело.
\en The source solid. \~
\param[out] parts - \ru Части тела.
\en The parts of the solid. \~
\param[in] names - \ru Именователь.
\en An object for naming the new objects. \~
\return \ru Возвращает количество созданных частей.
\en Returns the number of created parts. \~
\ingroup Solid_Modeling
*/
// ---
MATH_FUNC (size_t) CreateParts( const MbSolid & solid,
c3d::SolidsVector & parts,
const MbSNameMaker & names );
//------------------------------------------------------------------------------
/** \brief \ru Разделить тело на отдельные части.
\en Split the solid into separate parts. \~
\details \ru Если исходное тело распадается на части, то все его части будут сложены в присланный контейнер тел. \n
Исходное тело остаётся неизменённым. \n
\en If the source solid is decomposed, all the parts of the solid will be put into the given array of solids. \n
The source solid remains unchanged. \n \~
\param[in] solid - \ru Исходное тело.
\en The source solid. \~
\param[out] parts - \ru Части тела.
\en The parts of the solid. \~
\param[in] names - \ru Именователь.
\en An object for naming the new objects. \~
\return \ru Возвращает количество созданных частей.
\en Returns the number of created parts. \~
\ingroup Solid_Modeling
*/
// ---
MATH_FUNC (size_t) CreateParts( const MbSolid & solid,
c3d::SolidsSPtrVector & parts,
const MbSNameMaker & names );
//------------------------------------------------------------------------------
/** \brief \ru Разделить тело на отдельные части.
\en Split the solid into separate parts. \~
\details \ru Если исходное тело распадается на части, то все его части будут сложены в присланный контейнер тел. \n
Исходное тело остаётся неизменённым. \n
\en If the source solid is decomposed, all the parts of the solid will be put into the given array of solids. \n
The source solid remains unchanged. \n \~
\param[in] solid - \ru Исходное тело.
\en The source solid. \~
\param[out] parts - \ru Части тела.
\en The parts of the solid. \~
\param[in] sort - \ru Сортировать по убыванию габарита.
\en Whether to sort by the bounding box size in descending order. \~
\param[in] names - \ru Именователь.
\en An object for naming the new objects. \~
\return \ru Возвращает количество созданных частей.
\en Returns the number of created parts. \~
\ingroup Solid_Modeling
*/
// ---
MATH_FUNC (size_t) CreateParts( const MbSolid & solid,
RPArray<MbSolid> & parts,
bool sort,
const MbSNameMaker & names );
//------------------------------------------------------------------------------
/** \brief \ru Разделить тело на отдельные части.
\en Split the solid into separate parts. \~
\details \ru Если исходное тело распадается на части, то все его части будут сложены в присланный контейнер тел. \n
Исходное тело остаётся неизменённым. \n
\en If the source solid is decomposed, all the parts of the solid will be put into the given array of solids. \n
The source solid remains unchanged. \n \~
\param[in] solid - \ru Исходное тело.
\en The source solid. \~
\param[out] parts - \ru Части тела.
\en The parts of the solid. \~
\param[in] sort - \ru Сортировать по убыванию габарита.
\en Whether to sort by the bounding box size in descending order. \~
\param[in] names - \ru Именователь.
\en An object for naming the new objects. \~
\return \ru Возвращает количество созданных частей.
\en Returns the number of created parts. \~
\ingroup Solid_Modeling
*/
// ---
MATH_FUNC (size_t) CreateParts( const MbSolid & solid,
c3d::SolidsVector & parts,
bool sort,
const MbSNameMaker & names );
//------------------------------------------------------------------------------
/** \brief \ru Разделить тело на отдельные части.
\en Split the solid into separate parts. \~
\details \ru Если исходное тело распадается на части, то все его части будут сложены в присланный контейнер тел. \n
Исходное тело остаётся неизменённым. \n
\en If the source solid is decomposed, all the parts of the solid will be put into the given array of solids. \n
The source solid remains unchanged. \n \~
\param[in] solid - \ru Исходное тело.
\en The source solid. \~
\param[out] parts - \ru Части тела.
\en The parts of the solid. \~
\param[in] sort - \ru Сортировать по убыванию габарита.
\en Whether to sort by the bounding box size in descending order. \~
\param[in] names - \ru Именователь.
\en An object for naming the new objects. \~
\return \ru Возвращает количество созданных частей.
\en Returns the number of created parts. \~
\ingroup Solid_Modeling
*/
// ---
MATH_FUNC (size_t) CreateParts( const MbSolid & solid,
c3d::SolidsSPtrVector & parts,
bool sort,
const MbSNameMaker & names );
//------------------------------------------------------------------------------
/** \brief \ru Построить оболочку тела по поверхности и толщине.
\en Create a shell of the solid from a surface and a thickness. \~
+27 -14
View File
@@ -98,8 +98,10 @@ MATH_FUNC (MbResultType) ElementarySurface( const MbCartPoint3D & point0,
\ingroup Surface_Modeling
*/
// ---
MATH_FUNC (MbResultType) SplineSurface( const MbCartPoint3D & pUMinVMin, const MbCartPoint3D & pUMaxVMin,
const MbCartPoint3D & pUMaxVMax, const MbCartPoint3D & pUMinVMax,
MATH_FUNC (MbResultType) SplineSurface( const MbCartPoint3D & pUMinVMin,
const MbCartPoint3D & pUMaxVMin,
const MbCartPoint3D & pUMaxVMax,
const MbCartPoint3D & pUMinVMax,
size_t uCount, size_t vCount,
size_t uDegree, size_t vDegree,
MbSurface *& result );
@@ -169,8 +171,10 @@ MATH_FUNC (MbResultType) SplineSurface( const SArray<MbCartPoint3D> & pointList,
\ingroup Surface_Modeling
*/
// ---
MATH_FUNC (MbResultType) ExtrusionSurface( MbCurve3D & curve, const MbVector3D & direction,
bool simplify, MbSurface *& result );
MATH_FUNC (MbResultType) ExtrusionSurface( MbCurve3D & curve,
const MbVector3D & direction,
bool simplify,
MbSurface *& result );
//------------------------------------------------------------------------------
@@ -195,8 +199,12 @@ MATH_FUNC (MbResultType) ExtrusionSurface( MbCurve3D & curve, const MbVector3D &
\ingroup Surface_Modeling
*/
// ---
MATH_FUNC (MbResultType) RevolutionSurface( MbCurve3D & curve, const MbCartPoint3D & origin, const MbVector3D & axis, double angle,
bool simplify, MbSurface *& result );
MATH_FUNC (MbResultType) RevolutionSurface( MbCurve3D & curve,
const MbCartPoint3D & origin,
const MbVector3D & axis,
double angle,
bool simplify,
MbSurface *& result );
//------------------------------------------------------------------------------
@@ -317,8 +325,10 @@ MATH_FUNC (MbResultType) SectorSurface( const MbCurve3D & curve,
\ingroup Surface_Modeling
*/
// ---
MATH_FUNC (MbResultType) RuledSurface( MbCurve3D & curve1, MbCurve3D & curve2,
bool simplify, MbSurface *& result );
MATH_FUNC (MbResultType) RuledSurface( MbCurve3D & curve1,
MbCurve3D & curve2,
bool simplify,
MbSurface *& result );
//------------------------------------------------------------------------------
@@ -556,7 +566,7 @@ MATH_FUNC (MbResultType) DeformedSurface( MbSurface & surface,
size_t uCount, size_t vCount,
size_t uDegree, size_t vDegree,
double dist,
MbSurface *& result);
MbSurface *& result );
//------------------------------------------------------------------------------
@@ -597,8 +607,9 @@ MATH_FUNC (MbResultType) BoundedSurface( MbSurface & surface,
\ingroup Surface_Modeling
*/
// ---
MATH_FUNC (MbResultType) BoundedSurface( const MbPlacement3D & place, const MbRegion & region,
MbSurface *& result );
MATH_FUNC (MbResultType) BoundedSurface( const MbPlacement3D & place,
const MbRegion & region,
MbSurface *& result );
//------------------------------------------------------------------------------
@@ -612,14 +623,16 @@ MATH_FUNC (MbResultType) BoundedSurface( const MbPlacement3D & place, const MbRe
\en The initial surface. \~
\param[in] version - \ru Версия исполнения.
\en The version. \~
\param[out] resSurface - \ru Сплайновая поверхность (ограниченная кривыми).
\en The spline surface (bounded by the curves). \~
\param[out] result - \ru Сплайновая поверхность (ограниченная кривыми).
\en The spline surface (bounded by the curves). \~
\result \ru Возвращает код результата операции.
\en Returns operation result code. \~
\ingroup Surface_Modeling
*/
// ---
MATH_FUNC (MbResultType) NurbsSurface( const MbSurface & surf, VERSION version, MbSurface *& resSurface );
MATH_FUNC (MbResultType) NurbsSurface( const MbSurface & surf,
VERSION version,
MbSurface *& result );
//------------------------------------------------------------------------------
+16 -14
View File
@@ -148,21 +148,14 @@ public :
/// \ru Добавить роль автора. \en Add person's role.
inline void AddToRoles( const std::string& role ) { roles.insert( c3d::ToC3Dstring( role ) ); }
/// \ru Получить роли автора. \en Get person's roles.
template< typename T > void GetRoles( T dest ) const { std::copy( roles.begin(), roles.end(), dest ); }
/// \ru Добавить роли к приёмнику. \en Add person's roles to destination.
template< typename T > void AddRolesTo( T dest ) const;
/**
\brief \ru Выдать данные лица. \en Swap person's data. \~
\param[in] oPersonId - \ru Идентификатор лица. \en Identifier of the person. \~
\param[in] oLast - \ru Фамилия. \en Last name. \~
\param[in] oFirst - \ru Имя. \en First name. \~
\param[in] oMiddles - \ru Список отчеств/средних имен. \en List of middle names. \~
\param[in] oPrefixes - \ru Список титулов предшествующих. \en List of prefix titles. \~
\param[in] oSuffixed - \ru Список титулов завершающих. \en List of suffix titles. \~
\param[out] oPersonId - \ru Идентификатор лица. \en Identifier of the person. \~
\param[out] oLast - \ru Фамилия. \en Last name. \~
\param[out] oFirst - \ru Имя. \en First name. \~
\param[out] oMiddles - \ru Список отчеств/средних имен. \en List of middle names. \~
\param[out] oPrefixes - \ru Список титулов предшествующих. \en List of prefix titles. \~
\param[out] oSuffixed - \ru Список титулов завершающих. \en List of suffix titles. \~
*/
void GetPersonDetails( c3d::string_t& oPersonId, c3d::string_t& oLast, c3d::string_t& oFirst,
std::list<c3d::string_t>& oMiddles,
@@ -184,6 +177,15 @@ public :
std::list<c3d::string_t>& oSuffixed );
/// \ru Получить роли автора. \en Get person's roles.
void GetPersonRoles( std::vector<c3d::string_t>& ) const;
/// \ru Получить роли автора. \en Get person's roles.
template< typename T > DEPRECATE_DECLARE void GetRoles( T dest ) const { std::copy( roles.begin(), roles.end(), dest ); }
/// \ru Добавить роли к приёмнику. \en Add person's roles to destination.
template< typename T > DEPRECATE_DECLARE void AddRolesTo( T dest ) const;
/**
\brief \ru Задать данные лица. \en Set person's data. \~
\param[in] oPersonId - \ru Идентификатор лица. \en Identifier of the person. \~
@@ -336,7 +338,7 @@ public :
void GetData( c3d::string_t & oId, c3d::string_t & oName, c3d::string_t & oDesc ) const;
/// \ru Получить данные. \en Get data.
void GetDataStd( std::string & oId, std::string & oName, std::string & oDesc ) const;
DEPRECATE_DECLARE void GetDataStd( std::string & oId, std::string & oName, std::string & oDesc ) const;
/// \ru Задать название. \en Set the name of the product.
void SetNameC3D( const c3d::string_t& oName );
+16 -1
View File
@@ -783,7 +783,7 @@ MATH_FUNC( bool ) RepairEdge( MbCurveEdge & edge, bool updateFacesBounds );
\details \ru Починить некорректное ребро оболочки (псевдо-толерантное, псевдо-точное). \n
\en Repair incorrect edge of a shell (pseudo-tolerant, pseudo-exact). \n \~
\param[in] shell - \ru Оболочка.
\en Shell. \~
\en Shell. \~
\param[in] updateFacesBounds - \ru Обновить границы поверхностей в гранях ребра.
\en Update surface bounds of edge faces. \~
\return \ru Возвращает true, если была выполнена модификация ребра.
@@ -794,4 +794,19 @@ MATH_FUNC( bool ) RepairEdge( MbCurveEdge & edge, bool updateFacesBounds );
MATH_FUNC( bool ) RepairEdges( MbFaceShell & shell, bool updateFacesBounds = true );
//------------------------------------------------------------------------------
/** \brief \ru Устранить наличие общих подложек поверхностей.
\en Remove common surface substrates. \~
\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
*/
//---
MATH_FUNC( bool ) RemoveCommonSurfaceSubstrates( MbFaceShell & shell );
#endif // __CHECK_GEOMETRY_H
+33
View File
@@ -16,6 +16,8 @@
#include <mb_data.h>
#include <conv_predefined.h>
class MbProductInfo;
//------------------------------------------------------------------------------
/** \brief \ru Константы единиц измерения.
\en Length units constants.\~
@@ -255,6 +257,19 @@ enum eMsgDetail {
};
//------------------------------------------------------------------------------
/** \brief \ru Интерфейс генератора однострочного идентификатора компонента.
\en Interface of component's identifier generator. \~
\details \ru Предназначен для для экспорта в форматы, в которых для идентификации компонента предусмотрено одно строковое значение.
\en Demanded for export to formats having one string field for product inetifier. \~
\ingroup Exchange_Interface
*/
struct IProductIdMaker : public MbRefItem
{
virtual c3d::string_t operator()( const MbProductInfo& ) const = 0;
};
//------------------------------------------------------------------------------
/** \brief \ru Интерфейс свойств конвертера.
\en Interface of converter's properties. \~
@@ -370,9 +385,25 @@ public:
virtual bool JoinSimilarFaces() const { return true; }
/// \ru Добавлять ли удаленные грани в качестве оболочек. \en Whether to add removed faces as shells.
virtual bool AddRemovedFacesAsShells() const { return false; }
/// \ru Получить генератор однострочного идентификтора изделия. \en Get generator of one-line product identifier.
virtual SPtr<IProductIdMaker> ProductIdentifierGenerator() const { return SPtr<IProductIdMaker>(); }
}; // IConvertorProperty3D
//------------------------------------------------------------------------------
/** \brief \ru Реализация генератора однострочного идентификатора компонента.
\en Implementation of component's identifier generator. \~
\details \ru Реализация по умолчанию предполагает передачу наименования компонента.
\en Default implementatio implies export of component's name. \~
\ingroup Exchange_Interface
*/
struct NameProductIdMaker : public IProductIdMaker
{
virtual c3d::string_t operator()( const MbProductInfo& ) const;
};
//------------------------------------------------------------------------------
/** \brief \ru Предопределённая реализация интерфейса свойств конвертера.
\en Pre-defined implementation of converter's properties. \~
@@ -492,6 +523,8 @@ public:
virtual bool JoinSimilarFaces() const { return joinSimilarFaces; }
/// \ru Добавлять ли удаленные грани в качестве оболочек. \en Whether to add removed faces as shells.
virtual bool AddRemovedFacesAsShells() const { return addRemovedFacesAsShells; }
/// \ru Получить генератор однострочного идентификтора изделия. \en Get generator of one-line product identifier.
virtual SPtr<IProductIdMaker> ProductIdentifierGenerator() const { return SPtr<IProductIdMaker>( new NameProductIdMaker() ); }
OBVIOUS_PRIVATE_COPY( ConvConvertorProperty3D )
+71 -5
View File
@@ -77,6 +77,7 @@ private :
IMPL_PERSISTENT_OPS( MbDetachSolid )
//------------------------------------------------------------------------------
/** \brief \ru Разделить несвязанные части набора граней на связанные наборы граней.
\en Divide disconnected parts of a face set into connected sets of faces. \~
@@ -102,6 +103,56 @@ MATH_FUNC (size_t) MakeDetachShells( MbFaceShell & solid,
bool sort );
//------------------------------------------------------------------------------
/** \brief \ru Разделить несвязанные части набора граней на связанные наборы граней.
\en Divide disconnected parts of a face set into connected sets of faces. \~
\details \ru Разделить несвязанные части набора граней на связанные наборы граней - оболочки.
Одна связная оболочка (если sort=true, то наибольшая по диагонали габаритного куба) остаётся в исходном наборе граней solid.
Отделенные наборы граней складываются в контейнер partSolid.
\en Divide disconnected parts of a face set into connected sets of faces - shells.
One connected shell (if sort=true, then it is the greatest by the bounding box diagonal) remains in the initial set of faces 'solid'.
Separated face sets are put into container partSolid. \~
\param[in, out] solid - \ru Исходный набор граней, на выходе - одна из связных оболочек.
\en Initial face set, in output - one of the connected shells. \~
\param[out] partSolid - \ru Набор всех связных частей кроме одной.
\en Set of all connected parts except one. \~
\param[in] sort - \ru Если true, то в partSolid сортировать оболочки по убыванию диагоналей габаритного куба.
\en If true, then the shells should be sorted in partSolid by decreasing the bounding box diagonals. \~
\result \ru Количество оболочек в контейнере partSolid.
\en Number of shells in container partSolid. \~
\ingroup Solid_Modeling
*/
// ---
MATH_FUNC (size_t) MakeDetachShells( MbFaceShell & solid,
c3d::ShellsVector & partSolid,
bool sort );
//------------------------------------------------------------------------------
/** \brief \ru Разделить несвязанные части набора граней на связанные наборы граней.
\en Divide disconnected parts of a face set into connected sets of faces. \~
\details \ru Разделить несвязанные части набора граней на связанные наборы граней - оболочки.
Одна связная оболочка (если sort=true, то наибольшая по диагонали габаритного куба) остаётся в исходном наборе граней solid.
Отделенные наборы граней складываются в контейнер partSolid.
\en Divide disconnected parts of a face set into connected sets of faces - shells.
One connected shell (if sort=true, then it is the greatest by the bounding box diagonal) remains in the initial set of faces 'solid'.
Separated face sets are put into container partSolid. \~
\param[in, out] solid - \ru Исходный набор граней, на выходе - одна из связных оболочек.
\en Initial face set, in output - one of the connected shells. \~
\param[out] partSolid - \ru Набор всех связных частей кроме одной.
\en Set of all connected parts except one. \~
\param[in] sort - \ru Если true, то в partSolid сортировать оболочки по убыванию диагоналей габаритного куба.
\en If true, then the shells should be sorted in partSolid by decreasing the bounding box diagonals. \~
\result \ru Количество оболочек в контейнере partSolid.
\en Number of shells in container partSolid. \~
\ingroup Solid_Modeling
*/
// ---
MATH_FUNC (size_t) MakeDetachShells( MbFaceShell & solid,
c3d::ShellsSPtrVector & partSolid,
bool sort );
//------------------------------------------------------------------------------
/** \brief \ru Разделить несвязанные части набора граней на связанные наборы граней.
\en Divide disconnected parts of a face set into connected sets of faces. \~
@@ -124,11 +175,26 @@ MATH_FUNC (size_t) MakeDetachShells( MbFaceShell & solid,
\ingroup Solid_Modeling
*/
// ---
MATH_FUNC (MbCreator *) CreateDetach( MbFaceShell & solid,
RPArray<MbFaceShell> & partSolid,
bool sort,
const MbSNameMaker & n,
MbResultType & res );
template <class ShellsVector>
MbCreator * CreateDetach( MbFaceShell & solid,
ShellsVector & partSolid,
bool sort,
const MbSNameMaker & n,
MbResultType & res )
{
res = rt_Error;
MbCreator * result = NULL;
::MakeDetachShells( solid, partSolid, sort );
if ( partSolid.size() > 0 ) {
if ( !Math::SupressCreators() )
result = new MbDetachSolid( 0, sort, n );
res = rt_Success;
}
return result;
}
#endif // __CR_DETACH_SOLID_H
+1 -1
View File
@@ -105,7 +105,7 @@ MATH_FUNC (MbCreator *) ConvertShellToSheetMetall( MbFaceShell *
const MbeCopyMode sameShell, // флаг способа использования исходной оболочки,
const MbFace & initFace, // базовая грань, относительно которой будет строиться листовое тело,
bool sense, // признак совпадения придания толщины с нормалью базовой грани,
const MbSolidToSheetMetalValues & params, // параметры построения листового тела,
MbSolidToSheetMetalValues & params, // параметры построения листового тела,
MbSNameMaker & nameMaker, // именователь,
MbResultType & res, // флаг успешности операции,
SPtr<MbFaceShell> & resultShell ); // результирующая оболочка.
+3 -3
View File
@@ -314,9 +314,9 @@ public :
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
/// \ru Получить границы участков кривой, на которых сохраняется непрерывность кривизны.
/// \en Get the boundaries of the sections of the curve on which the continuity of curvature is preserved. \~
virtual void GetCurvatureContinuityBounds( std::vector<double> & params ) const;
/// \ru Получить границы участков кривой, которые описываются одной аналитической функцией.
/// \en Get the boundaries of the curve sections that are described by one analytical function. \~
virtual void GetAnalyticalFunctionsBounds( std::vector<double> & params ) const;
/** \} */
+3 -3
View File
@@ -149,9 +149,9 @@ public :
// \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, VERSION version = Math::DefaultMathVersion() ) const;
/// \ru Получить границы участков кривой, на которых сохраняется непрерывность кривизны.
/// \en Get the boundaries of the sections of the curve on which the continuity of curvature is preserved. \~
virtual void GetCurvatureContinuityBounds( std::vector<double> & params ) const;
/// \ru Получить границы участков кривой, которые описываются одной аналитической функцией.
/// \en Get the boundaries of the curve sections that are described by one analytical function. \~
virtual void GetAnalyticalFunctionsBounds( std::vector<double> & params ) const;
// \ru Общие функции полигональной кривой \en Common functions of a polygonal curve
+3 -3
View File
@@ -474,9 +474,9 @@ public:
*/
virtual bool SetContinuousDerivativeLength( VERSION version, double epsilon = EPSILON );
/// \ru Получить границы участков кривой, на которых сохраняется непрерывность кривизны.
/// \en Get the boundaries of the sections of the curve on which the continuity of curvature is preserved. \~
virtual void GetCurvatureContinuityBounds( std::vector<double> & params ) const;
/// \ru Получить границы участков кривой, которые описываются одной аналитической функцией.
/// \en Get the boundaries of the curve sections that are described by one analytical function. \~
virtual void GetAnalyticalFunctionsBounds( std::vector<double> & params ) const;
/** \} */
/** \ru \name Функции работы с сегментами контура
+7 -1
View File
@@ -189,8 +189,11 @@ 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 = NULL,
VERSION version = Math::DefaultMathVersion(), bool * coincParams = NULL ) const; // \ru Дать плоскую проекцию кривой \en Get a planar projection of curve
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.
@@ -239,6 +242,9 @@ public:
*/
virtual bool SetContinuousDerivativeLength( VERSION version, double epsilon = EPSILON );
/// \ru Получить границы участков кривой, которые описываются одной аналитической функцией.
/// \en Get the boundaries of the curve sections that are described by one analytical function. \~
virtual void GetAnalyticalFunctionsBounds( std::vector<double> & params ) const;
/// \ru Найти все особые точки функции кривизны кривой. \en Find all the special points of the curvature function of the curve.
virtual void GetCurvatureSpecialPoints( std::vector<c3d::DoublePair> & points ) const;
+1 -1
View File
@@ -115,7 +115,7 @@ public :
virtual void PrepareIntegralData( const bool forced ) const; // \ru Рассчитать временные (mutable) данные объекта. \en Calculate temporary (mutable) data of an object.
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 SetProperties( const MbProperties & ); // \ru Записать свойства объекта. \en ` properties of the object.
virtual void GetBasisItems ( RPArray<MbSpaceItem> & ); // \ru Дать базовые поверхности. \en Get base surfaces.
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.
+3 -3
View File
@@ -288,9 +288,9 @@ public :
// \ru Сдвинуть параметр t на расстояние len. \en Move parameter t on the metric distance len.
virtual bool DistanceAlong( double & t, double len, int curveDir, double eps = Math::LengthEps,
VERSION version = Math::DefaultMathVersion() ) const;
/// \ru Получить границы участков кривой, на которых сохраняется непрерывность кривизны.
/// \en Get the boundaries of the sections of the curve on which the continuity of curvature is preserved. \~
virtual void GetCurvatureContinuityBounds( std::vector<double> & params ) const;
/// \ru Получить границы участков кривой, которые описываются одной аналитической функцией.
/// \en Get the boundaries of the curve sections that are described by one analytical function. \~
virtual void GetAnalyticalFunctionsBounds( std::vector<double> & params ) const;
/** \} */
/** \ru \name Общие функции полигональной кривой
+3 -3
View File
@@ -297,9 +297,9 @@ public:
virtual bool DistanceAlong( double & t, double len, int curveDir, double eps = Math::metricPrecision,
VERSION version = Math::DefaultMathVersion() ) const;
/// \ru Получить границы участков кривой, на которых сохраняется непрерывность кривизны.
/// \en Get the boundaries of the sections of the curve on which the continuity of curvature is preserved. \~
virtual void GetCurvatureContinuityBounds( std::vector<double> & params ) const;
/// \ru Получить границы участков кривой, которые описываются одной аналитической функцией.
/// \en Get the boundaries of the curve sections that are described by one analytical function. \~
virtual void GetAnalyticalFunctionsBounds( std::vector<double> & params ) const;
// \ru Общие функции полигональной кривой \en Common functions of a polygonal curve
+3 -3
View File
@@ -258,9 +258,9 @@ public :
virtual void CalculateGabarit( MbRect & r ) const; // \ru Определить габариты \en Calculate bounding box
virtual bool DistanceAlong( double & t, double len, int curveDir, double eps = Math::LengthEps,
VERSION version = Math::DefaultMathVersion() ) const;
/// \ru Получить границы участков кривой, на которых сохраняется непрерывность кривизны.
/// \en Get the boundaries of the sections of the curve on which the continuity of curvature is preserved. \~
virtual void GetCurvatureContinuityBounds( std::vector<double> & params ) const;
/// \ru Получить границы участков кривой, которые описываются одной аналитической функцией.
/// \en Get the boundaries of the curve sections that are described by one analytical function. \~
virtual void GetAnalyticalFunctionsBounds( std::vector<double> & params ) const;
virtual bool IsStraight() const; // \ru Признак прямолинейности кривой \en An attribute of curve straightness
+3 -3
View File
@@ -253,9 +253,9 @@ public :
// \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, VERSION version = Math::DefaultMathVersion() ) const;
/// \ru Получить границы участков кривой, на которых сохраняется непрерывность кривизны.
/// \en Get the boundaries of the sections of the curve on which the continuity of curvature is preserved. \~
virtual void GetCurvatureContinuityBounds( std::vector<double> & params ) const;
/// \ru Получить границы участков кривой, которые описываются одной аналитической функцией.
/// \en Get the boundaries of the curve sections that are described by one analytical function. \~
virtual void GetAnalyticalFunctionsBounds( std::vector<double> & params ) const;
// \ru Общие функции полигональной кривой \en Common functions of polygonal curve
+2 -2
View File
@@ -732,8 +732,8 @@ public :
void MakeTangentLine( MbLine * line );
/// \ru Определить выпуклую оболочку сегмента кривой. \en Determine the convex hull of the curve segment.
void ConvexHull( ptrdiff_t seg, MbCartPoint * p ) const;
/// \ru Получить границы участков кривой, на которых сохраняется непрерывность кривизны. \en Get the boundaries of the sections of the curve on which the continuity of curvature is preserved. \~
virtual void GetCurvatureContinuityBounds( std::vector<double> & params ) const;
/// \ru Получить границы участков кривой, которые описываются одной аналитической функцией. \en Get the boundaries of the curve sections that are described by one analytical function. \~
virtual void GetAnalyticalFunctionsBounds( std::vector<double> & params ) const;
/** \} */
/** \ru \name Общие функции полигональной кривой.
+3 -3
View File
@@ -502,9 +502,9 @@ public:
// \ru Вычислить метрическую длину кривой. \en Calculate the metric length of a curve.
virtual double CalculateLength( double t1, double t2 ) const;
/// \ru Получить границы участков кривой, на которых сохраняется непрерывность кривизны.
/// \en Get the boundaries of the sections of the curve on which the continuity of curvature is preserved. \~
virtual void GetCurvatureContinuityBounds( std::vector<double> & params ) const;
/// \ru Получить границы участков кривой, которые описываются одной аналитической функцией.
/// \en Get the boundaries of the curve sections that are described by one analytical function. \~
virtual void GetAnalyticalFunctionsBounds( std::vector<double> & params ) const;
// \ru Общие функции полигональной кривой. \en Common functions of the polygonal curve.
virtual void GetRuleInterval( ptrdiff_t index, double & t1, double & t2 ) const; // \ru Выдать интервал влияния точки B-сплайна. \en Get the range of influence of a B-spline point.
+3 -3
View File
@@ -115,9 +115,9 @@ public :
// \ru Сдвинуть параметр t на расстояние len по направлению \en Shift the parameter t by the distance 'len' in the direction
virtual bool DistanceAlong( double & t, double len, int curveDir, double eps = Math::metricPrecision,
VERSION version = Math::DefaultMathVersion() ) const;
/// \ru Получить границы участков кривой, на которых сохраняется непрерывность кривизны.
/// \en Get the boundaries of the sections of the curve on which the continuity of curvature is preserved. \~
virtual void GetCurvatureContinuityBounds( std::vector<double> & params ) const;
/// \ru Получить границы участков кривой, которые описываются одной аналитической функцией.
/// \en Get the boundaries of the curve sections that are described by one analytical function. \~
virtual void GetAnalyticalFunctionsBounds( std::vector<double> & params ) const;
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.
+3 -3
View File
@@ -212,9 +212,9 @@ public :
virtual bool GetAxisPoint( MbCartPoint & ) 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 size_t GetCount() const; // \ru Количество разбиений для прохода в операциях \en Count of subdivisions for pass in operations
/// \ru Получить границы участков кривой, на которых сохраняется непрерывность кривизны.
/// \en Get the boundaries of the sections of the curve on which the continuity of curvature is preserved. \~
virtual void GetCurvatureContinuityBounds( std::vector<double> & params ) const;
/// \ru Получить границы участков кривой, которые описываются одной аналитической функцией.
/// \en Get the boundaries of the curve sections that are described by one analytical function. \~
virtual void GetAnalyticalFunctionsBounds( std::vector<double> & params ) const;
virtual void GetPointsByEvenLengthDelta( size_t n, std::vector<MbCartPoint> & pnts ) const; // \ru Выдать n точек кривой с равными интервалами по длине дуги \en Get n points of curve equally spaced by the arc length
+3 -3
View File
@@ -238,9 +238,9 @@ public:
// \ru Определить количество разбиений для прохода в операциях. \en Define the number of splittings for one passage in operations.
virtual size_t GetCount() const;
/// \ru Получить границы участков кривой, на которых сохраняется непрерывность кривизны.
/// \en Get the boundaries of the sections of the curve on which the continuity of curvature is preserved. \~
virtual void GetCurvatureContinuityBounds( std::vector<double> & params ) const;
/// \ru Получить границы участков кривой, которые описываются одной аналитической функцией.
/// \en Get the boundaries of the curve sections that are described by one analytical function. \~
virtual void GetAnalyticalFunctionsBounds( std::vector<double> & params ) const;
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.
+3 -3
View File
@@ -159,9 +159,9 @@ public :
// \ru iloc_OnItem = 0 - точка находится на кривой, \en Iloc_OnItem = 0 - point is on the curve,
// \ru iloc_OutOfItem = -1 - точка находится справа от кривой. \en Iloc_OutOfItem = -1 - point is to the right of the curve.
virtual MbeItemLocation PointRelative( const MbCartPoint & pnt, double eps = Math::LengthEps ) const;
/// \ru Получить границы участков кривой, на которых сохраняется непрерывность кривизны.
/// \en Get the boundaries of the sections of the curve on which the continuity of curvature is preserved. \~
virtual void GetCurvatureContinuityBounds( std::vector<double> & params ) const;
/// \ru Получить границы участков кривой, которые описываются одной аналитической функцией.
/// \en Get the boundaries of the curve sections that are described by one analytical function. \~
virtual void GetAnalyticalFunctionsBounds( std::vector<double> & params ) const;
virtual const MbCurve & GetBasisCurve() const; // \ru Вернуть базовую кривую \en Get the base curve
+3 -3
View File
@@ -141,9 +141,9 @@ public :
/// \ru Найти все особые точки функции кривизны кривой.
/// \en Find all the special points of the curvature function of the curve.
virtual void GetCurvatureSpecialPoints( std::vector<c3d::DoublePair> & points ) const;
/// \ru Получить границы участков кривой, на которых сохраняется непрерывность кривизны.
/// \en Get the boundaries of the sections of the curve on which the continuity of curvature is preserved. \~
virtual void GetCurvatureContinuityBounds( std::vector<double> & params ) const;
/// \ru Получить границы участков кривой, которые описываются одной аналитической функцией.
/// \en Get the boundaries of the curve sections that are described by one analytical function. \~
virtual void GetAnalyticalFunctionsBounds( std::vector<double> & params ) const;
// \ru Геометрия базовой кривой тождественна геометрии кривой, отлична параметризация. \en Geometry of base curve is identical to geometry of curve, parameterization is different.
virtual const MbCurve3D & GetSubstrate() const; // \ru Выдать подложку или себя \en Get substrate or itself
+7 -7
View File
@@ -1229,16 +1229,16 @@ public :
/// \ru Вычислить длину вектора производной. \en Calculate the length of derivative vector.
double DerLength( double & t ) const;
/** \brief \ru Получить границы участков кривой, на которых сохраняется непрерывность кривизны.
\en Get the boundaries of the sections of the curve on which the continuity of curvature is preserved. \~
\details \ru Получить границы участков кривой, на которых сохраняется непрерывность кривизны. \n
/** \brief \ru Получить границы участков кривой, которые описываются одной аналитической функцией.
\en Get the boundaries of the curve sections that are described by one analytical function. \~
\details \ru Получить границы участков кривой, которые описываются одной аналитической функцией. \n
Функция введена для оптимизации реализации функции MbCurve3D::GetCurvatureSpecialPoints, чтобы не насчитывать точки разрыва. \n
\en Get the boundaries of the sections of the curve on which the continuity of curvature is preserved. \n
\en Get the boundaries of the curve sections that are described by one analytical function. \n
The function was introduced to optimize the implementation of the function MbCurve3D :: GetCurvatureSpecialPoints, so as not to calculate the break points.\n \~
\param[out] params - \ru Точки, в которых кривизна имеет разрыв.
\en The points at which the curvature has a discontinuity. \~
\param[out] params - \ru Параметры кривой, в которых меняется аналитическая функция..
\en Curve parameters in which the analytical function changes. \~
*/
virtual void GetCurvatureContinuityBounds( std::vector<double> & params ) const;
virtual void GetAnalyticalFunctionsBounds( std::vector<double> & params ) const;
/// \ru Создать собственное свойство. \en Create a custom property.
virtual MbProperty& CreateProperty( MbePrompt name ) const;
+7 -7
View File
@@ -862,17 +862,17 @@ public :
*/
virtual void GetCurvatureSpecialPoints( std::vector<c3d::DoublePair> & points ) const;
/** \brief \ru Получить границы участков кривой, на которых сохраняется непрерывность кривизны.
\en Get the boundaries of the sections of the curve on which the continuity of curvature is preserved. \~
\details \ru Получить границы участков кривой, на которых сохраняется непрерывность кривизны. \n
/** \brief \ru Получить границы участков кривой, которые описываются одной аналитической функцией.
\en Get the boundaries of the curve sections that are described by one analytical function. \~
\details \ru Получить границы участков кривой, которые описываются одной аналитической функцией. \n
Функция введена для оптимизации реализации функции MbCurve3D::GetCurvatureSpecialPoints, чтобы не насчитывать точки разрыва. \n
\en Get the boundaries of the sections of the curve on which the continuity of curvature is preserved. \n
\en Get the boundaries of the curve sections that are described by one analytical function. \n
The function was introduced to optimize the implementation of the function MbCurve3D::GetCurvatureSpecialPoints, so as not to calculate the break points.\n \~
\param[out] params - \ru Точки, в которых кривизна имеет разрыв.
\en The points at which the curvature has a discontinuity. \~
\param[out] params - \ru Параметры кривой, в которых меняется аналитическая функция.
\en Curve parameters in which the analytical function changes. \~
\ingroup Curves_3D
*/
virtual void GetCurvatureContinuityBounds( std::vector<double> & params ) const;
virtual void GetAnalyticalFunctionsBounds( std::vector<double> & params ) const;
/** \brief \ru Вычислить граничную точку.
\en Calculate the boundary point. \~
+1 -1
View File
@@ -399,7 +399,7 @@ const StrHash NullStrHash( 0, StrHash::htp_undef );
\ingroup Base_Tools
*/
// ---
const StrHash UndefStrHash( -1, StrHash::htp_undef );
const StrHash UndefStrHash( SimpleName(-1), StrHash::htp_undef );
//------------------------------------------------------------------------------
-3
View File
@@ -212,9 +212,6 @@
#include <tool_mutex.h>
//#include <tool_memory_leaks_check.h>
#ifdef _MSC_VER // LF-Linux: incomplete type reader/writer errors
#include <templ_s_array_rw.h> // R/W
#endif // _MSC_VER
#ifdef __DEBUG_MEMORY_ALLOCATE_FREE_
#include <tool_memory_debug.h>
#endif
+25 -4
View File
@@ -545,26 +545,37 @@ 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.
double lastCurvature; ///< \ru Значение кривизны в конечной точке. \en Curvature in the last point.
#ifdef C3D_DEBUG_FAIR_CURVES
/*DEBUG*/ FILE *prt;
#endif
public:
/// \ru Пустой конструктор. \en Empty constructor.
MbFairCurveData() :
MbFairCurveData() :
closed( false ), fairing( false ), arrange( false ), subdivision( fairSubdiv_Single ),
accountCurvature( fairCur_No ), accountInflexVector( fairVector_SegmentDir ),
fixPntTng( fixPntTng_NotFix ),
approx( fairApprox_KnotsSpline ), create(1), degreeBSpline( 8 ),
approx( fairApprox_KnotsSpline ), create( 1 ), degreeBSpline( 8 ),
initFormat( fairFormat_Open ), outFormat( fairFormat_Close ),
nSegments( 4 ), numSegment( 0 ), tParam( 0.5 ),
warning( fwarn_Success ), error( rt_Success ), clothoidRMin( 50.0 ),
clothoidLMax( 200.0 ), clothoidSegms( 10 ), numberOfIterationsBSpl( 500 ),
numberOfIterationsVCurve( 192 ),
#ifdef C3D_DEBUG_FAIR_CURVES
prt(C3D_NULL_PTR),
prt( C3D_NULL_PTR ),
#endif
realAccuracyBSpl( METRIC_ACCURACY ), realAccuracyVCurve( METRIC_EPSILON ) {}
realAccuracyBSpl( METRIC_ACCURACY ), realAccuracyVCurve( METRIC_EPSILON ),
switchEndTangents( false ), switchEndCurvature( false ),
firstCurvature( 0.0 ), lastCurvature( 0.0 ) {}
~MbFairCurveData() {}
@@ -589,6 +600,16 @@ 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;
lastCurvature = other.lastCurvature;
return *this;
}
}; // MbFairCurveData
+4 -3
View File
@@ -726,9 +726,10 @@ enum MbeFixPntTng
// ---
enum MbeFairSplineFormat
{
fairFormat_Open = 1, ///< \ru Открытый S-полигон. \en Open S-polygon.
fairFormat_Close = 2, ///< \ru Закрытый S-полигон. \en Close S-polygon.
fairFormat_GB = 3 ///< \ru GB-полигон. \en GB-polygon.
fairFormat_HalfOpened = 0, ///< \ru Полуоткрытый S-полигон. \en HalfOpened S-polygon.
fairFormat_Open = 1, ///< \ru Открытый S-полигон. \en Open S-polygon.
fairFormat_Close = 2, ///< \ru Закрытый S-полигон. \en Close S-polygon.
fairFormat_GB = 3 ///< \ru GB-полигон. \en GB-polygon.
};
//------------------------------------------------------------------------------
+5 -1
View File
@@ -234,7 +234,11 @@ enum MbResultType {
rt_ContourSegmentsOverlapError, ///< \ru В контуре есть наложения сегментов. \en There are segment overlays in the contour.
rt_ContourSegmentsNoTangentJoint,///< \en В контуре есть сегменты с не гладкой стыковкой. \ru In the contour there are segments with a non - smooth connection.
rt_ExtensionOutOfRange, ///< \ru Удлинение не может быть ограничено заданной поверхностью. \en Extension cannot be limited given surface.
rt_ExtensionOutOfRange, ///< \ru Удлинение не может быть ограничено заданной поверхностью. \en Extension cannot be limited given surface.
rt_BuildSheetBySolidError, ///< \ru Ошибка построения листового тела по произвольному телу. \en Build sheet solid based on an arbitary solid error.
rt_BendEdgeError, ///< \ru Ребро не может быть использовано как ребро сгиба. \en The edge can't be processed as bend edge.
// \ru !!! СТРОКИ ВСТАВЛЯТЬ СТРОГО ПЕРЕД ЭТОЙ СТРОКОЙ !!!! \en !!! INSERT LINES STRICTLY BEFORE THIS LINE !!!!
rt_ErrorTotal // \ru НИЖЕ НЕ ДОБАВЛЯТЬ! \en DON'T ADD BELOW!
};
+1 -1
View File
@@ -621,7 +621,7 @@ void ReadMating( reader & in, RPArray< MbPntMatingData<Vector> > & data )
if ( isItem ) {
// \ru тип сопряжения \en conjugation type
uint32 type = trt_None;
uint32 type = uint32(trt_None);
in >> type;
MbVector3D * v1 = C3D_NULL_PTR;
+6 -1
View File
@@ -227,7 +227,7 @@ enum MbePrompt
IDS_ITEM_0522, ///< \ru Паз. \en Groove.
IDS_ITEM_0523, ///< \ru Заплатка. \en Patch.
IDS_ITEM_0524, ///< \ru Тонкая оболочка. \en Thin Shell.
IDS_ITEM_0525, ///< \ru Листовое тело на базе произвольного тела. \en Sheet solid based on an arbitary solid.
IDS_ITEM_0526, ///< \ru Оболочка на семействе кривых. \en Shell Defined by a Set of Curves.
IDS_ITEM_0527, ///< \ru Продолженная оболочка. \en Extended Shell.
IDS_ITEM_0528, ///< \ru Эквидистантная оболочка. \en Offset Shell.
@@ -1208,6 +1208,11 @@ enum MbePrompt
IDS_PROP_2025, ///< \ru Сопряжение на границе 2. \en Conjugation on the boundary 2.
IDS_PROP_2026, ///< \ru Сопряжение на границе 3. \en Conjugation on the boundary 3.
IDS_PROP_2027, ///< \ru Сопряжение на границе 4. \en Conjugation on the boundary 4.
IDS_PROP_2028, ///< \ru Количество ребер сгиба. \en Count of bend edges.
IDS_PROP_2029, ///< \ru Количество ребер стыка. \en Count of rip edges.
IDS_PROP_LAST = 9999, ///< \ru Наибольшее значение. \en The greatest value.
};
+151 -75
View File
@@ -258,92 +258,178 @@ class VersionContainer;
// ---
class MATH_CLASS Math {
public:
/// \ru Установить значения переменных по умолчанию. \en Set default values of variables.
static void SetDefaultValues();
/// \ru Установить значение переменной.
/// Необходимо учитывать, что изменение глобальных переменных может привести
/// к непредсказуемым результатам при распараллеливании вычислений.
/// \en Set value of variable.
/// It is necessary to keep in mind that modification of global variable could lead to
/// unpredictable results when using parallel calculations.
static void SetUserValue( int index, double value );
//------------------------------------------------------------------------------
// \ru Классы переменных, которые могут меняться с помощью функций SetVarValue(), RestoreVarValue() и SetDefaultValues().
// \en Classes of variables which can be changed using SetVarValue(), RestoreVarValue() and SetDefaultValues() functions.
//---
class MATH_CLASS DoubleVariable
{
protected:
size_t _id;
public:
DoubleVariable( double v );
const double & operator()();
double operator()() const;
operator double() const;
void SetVarValue( double val );
void RestoreVarValue();
friend void Math::SetDefaultValues();
private:
DoubleVariable();
DoubleVariable & operator=( double v );
DoubleVariable & operator=( const DoubleVariable & v );
};
class MATH_CLASS SizeVariable
{
protected:
size_t _id;
public:
SizeVariable( size_t v );
const size_t & operator()();
size_t operator()() const;
operator size_t() const;
void SetVarValue( size_t val );
void RestoreVarValue();
friend void Math::SetDefaultValues();
private:
SizeVariable();
SizeVariable & operator=( size_t v );
SizeVariable & operator=( const SizeVariable & v );
};
//------------------------------------------------------------------------------
// \ru Класс переменных, которые могут изменяться только в группе с помощью функций SetUserValue() и SetDefaultValues().
// \en Class of variables which can be changed only in a group using SetUserValue() and SetDefaultValues() functions.
//---
class MATH_CLASS GroupVariable
{
DoubleVariable _var;
public:
GroupVariable( double v ) : _var( v ) {}
const double & operator()() { return _var(); }
double operator()() const { return _var(); }
operator double() const { return _var(); }
friend void Math::SetUserValue( int index, double value );
friend void Math::SetDefaultValues();
protected:
void SetVarValue( double val ) { _var.SetVarValue( val ); }
private:
GroupVariable();
GroupVariable & operator=( double v );
GroupVariable & operator=( const GroupVariable & v );
void RestoreVarValue();
};
// \ru Константы \en Constants
static const double PI2; ///< \ru Отношение длины окружности к её радиусу. \en Relation between circle length and its radius.
static const double invPI2; ///< \ru Отношение радиуса окружности к её длине. \en Relation between circle radius and its length.
static const double RADDEG; ///< \ru Количество угловых градусов в радиане. \en Count of angular degrees in radian.
static const double DEGRAD; ///< \ru Количество радиан в угловом градусе. \en Count of radians in angular degree.
static const double PI2; ///< \ru Отношение длины окружности к её радиусу. \en Relation between circle length and its radius.
static const double invPI2; ///< \ru Отношение радиуса окружности к её длине. \en Relation between circle radius and its length.
static const double RADDEG; ///< \ru Количество угловых градусов в радиане. \en Count of angular degrees in radian.
static const double DEGRAD; ///< \ru Количество радиан в угловом градусе. \en Count of radians in angular degree.
static double doubleRegion; ///< \ru Относительная погрешность double. \en Relative tolerance for double.
static double region; ///< \ru Погрешность (PARAM_REGION). \en Tolerance (PARAM_REGION).
static double precision; ///< \ru Погрешность аппроксимации (PARAM_PRECISION). \en Approximation tolerance (PARAM_PRECISION).
static double accuracy; ///< \ru Погрешность (PARAM_ACCURACY). \en Tolerance (PARAM_ACCURACY).
static const double doubleRegion; ///< \ru Относительная погрешность double. \en Relative tolerance for double.
static const double region; ///< \ru Погрешность (PARAM_REGION). \en Tolerance (PARAM_REGION).
static const double precision; ///< \ru Погрешность аппроксимации (PARAM_PRECISION). \en Approximation tolerance (PARAM_PRECISION).
static const double accuracy; ///< \ru Погрешность (PARAM_ACCURACY). \en Tolerance (PARAM_ACCURACY).
static double determinantMax; ///< \ru Максимально возможное значение определителя (DETERMINANT_MAX). \en Maximum possible value of determinant (DETERMINANT_MAX).
static double determinantMin; ///< \ru Минимально возможное значение определителя (DETERMINANT_MIN). \en Minimum possible value of determinant (DETERMINANT_MIN).
static const double determinantMax; ///< \ru Максимально возможное значение определителя (DETERMINANT_MAX). \en Maximum possible value of determinant (DETERMINANT_MAX).
static const double determinantMin; ///< \ru Минимально возможное значение определителя (DETERMINANT_MIN). \en Minimum possible value of determinant (DETERMINANT_MIN).
static double LengthEps; ///< \ru Точность вычисления длины (PARAM_PRECISION). \en Length calculation tolerance (PARAM_PRECISION).
static double AngleEps; ///< \ru Точность вычисления угла. \en Angular tolerance.
static double NewtonEps; ///< \ru Точность численного решения уравнений. \en Tolerance of numerical solution of equation.
static double NewtonReg; ///< \ru Точность проверки решения уравнений. \en Solution of equation checking tolerance.
static const double lengthEpsilon; ///< \ru Погрешность длины. \en Tolerance for length.
static const double lengthRegion; ///< \ru Погрешность региона. \en Tolerance for region.
static double lengthEpsilon; ///< \ru Погрешность длины. \en Tolerance for length.
static double lengthRegion; ///< \ru Погрешность региона. \en Tolerance for region.
static const double metricEpsilon; ///< \ru Погрешность расстояния в итерационных функциях. \en Tolerance for distance in iterative functions.
static const double metricRegion; ///< \ru Неразличимая метрическая область. \en Indistinguishable metric region.
static const double metricPrecision; ///< \ru Метрическая погрешность. \en Metric tolerance.
static const double metricAccuracy; ///< \ru Наибольшая метрическая погрешность. \en Maximum metric tolerance.
static const double metricNear; ///< \ru Метрическая близость. \en Metric proximity tolerance.
static double metricEpsilon; ///< \ru Погрешность расстояния в итерационных функциях. \en Tolerance for distance in iterative functions.
static double metricRegion; ///< \ru Неразличимая метрическая область. \en Indistinguishable metric region.
static double metricPrecision; ///< \ru Метрическая погрешность. \en Metric tolerance.
static double metricAccuracy; ///< \ru Наибольшая метрическая погрешность. \en Maximum metric tolerance.
static double metricNear; ///< \ru Метрическая близость. \en Metric proximity tolerance.
static const double angleEpsilon; ///< \ru Минимальная различимый угол. \en Minimum distinguishable angle.
static const double angleRegion; ///< \ru Неразличимая угловая область. \en Indistinguishable angular region.
static double paramEpsilon; ///< \ru Точность параметра кривой. \en Curve parameter tolerance.
static double paramRegion; ///< \ru Точность проверки параметра кривой. \en Curve parameter checking tolerance.
static double paramPrecision; ///< \ru Параметрическая погрешность. \en Parametric tolerance.
static double paramAccuracy; ///< \ru Наибольшая параметрическая погрешность. \en The largest parametric tolerance.
static double paramNear; ///< \ru Параметрическая близость. \en Parametric proximity.
static const double lengthMin; ///< \ru Квадрат минимальной различимой длины. \en Square of minimum distinguishable length.
static const double lengthMax; ///< \ru Максимальная метрическая длина в системе. \en Maximum metric length in system.
static double angleEpsilon; ///< \ru Минимальная различимый угол. \en Minimum distinguishable angle.
static double angleRegion; ///< \ru Неразличимая угловая область. \en Indistinguishable angular region.
static const double minLength; ///< \ru Минимально допустимая длина. \en Minimum legal length.
static const double maxLength; ///< \ru Максимально допустимая длина. \en Maximum legal length.
static const double minRadius; ///< \ru Минимально допустимый радиус. \en Minimum legal radius.
static const double maxRadius; ///< \ru Максимально допустимый радиус. \en Maximum legal radius.
static double lowRenderAng; ///< \ru Угол для минимального количества отображаемых сегментов. \en Angle for minimum mapping segments count.
static double higRenderAng; ///< \ru Угол для максимального количества отображаемых сегментов. \en Angle for maximum mapping segments count.
static const double metricDelta; ///< \ru Величина отшагивания. \en Metric offset.
static const double paramDeltaMin; ///< \ru Минимальное приращение параметра. \en Minimum increment of parameter.
static const double paramDeltaMax; ///< \ru Максимальное приращение параметра. \en Maximum increment of parameter.
static double lengthMin; ///< \ru Квадрат минимальной различимой длины. \en Square of minimum distinguishable length.
static double lengthMax; ///< \ru Максимальная метрическая длина в системе. \en Maximum metric length in system.
static const double deltaMin; ///< \ru Минимальное приращение. \en Minimum increment.
static const double deltaMax; ///< \ru Максимальное приращение. \en Maximum increment.
static double deviateSag; ///< \ru Угловая толерантность. \en Angular tolerance.
static double visualSag; ///< \ru Величина стрелки прогиба для визуализации. \en Value of sag for visualization.
static double minLength; ///< \ru Минимально допустимая длина. \en Minimum legal length.
static double maxLength; ///< \ru Максимально допустимая длина. \en Maximum legal length.
static double minRadius; ///< \ru Минимально допустимый радиус. \en Minimum legal radius.
static double maxRadius; ///< \ru Максимально допустимый радиус. \en Maximum legal radius.
//------------------------------------------------------------------------------
// \ru Изменяемые переменные.
// \en Controlled variables.
//---
static double metricDelta; ///< \ru Величина отшагивания. \en Metric offset.
static double paramDeltaMin; ///< \ru Минимальное приращение параметра. \en Minimum increment of parameter.
static double paramDeltaMax; ///< \ru Максимальное приращение параметра. \en Maximum increment of parameter.
// \ru Изменяются только в группе с помощью функций SetUserValue() и SetDefaultValues().
// \en Can be changed only in a group using functions SetUserValue() and SetDefaultValues().
static GroupVariable LengthEps; ///< \ru Точность вычисления длины (PARAM_PRECISION). \en Length calculation tolerance (PARAM_PRECISION).
static GroupVariable AngleEps; ///< \ru Точность вычисления угла. \en Angular tolerance.
static GroupVariable NewtonEps; ///< \ru Точность численного решения уравнений. \en Tolerance of numerical solution of equation.
static GroupVariable NewtonReg; ///< \ru Точность проверки решения уравнений. \en Solution of equation checking tolerance.
static double deltaMin; ///< \ru Минимальное приращение. \en Minimum increment.
static double deltaMax; ///< \ru Максимальное приращение. \en Maximum increment.
static GroupVariable paramEpsilon; ///< \ru Точность параметра кривой. \en Curve parameter tolerance.
static GroupVariable paramRegion; ///< \ru Точность проверки параметра кривой. \en Curve parameter checking tolerance.
static GroupVariable paramPrecision; ///< \ru Параметрическая погрешность. \en Parametric tolerance.
static GroupVariable paramAccuracy; ///< \ru Наибольшая параметрическая погрешность. \en The largest parametric tolerance.
static GroupVariable paramNear; ///< \ru Параметрическая близость. \en Parametric proximity.
static size_t newtonCount; ///< \ru Число приближений в итерационном методе. \en Number of approximations in iterative method.
static size_t newtonLimit; ///< \ru Количество итераций решения системы уравнений методом Newton. \en Iterations count for solving system of equations by Newton method.
static size_t curveDegree; ///< \ru Порядок кривой (NURBS_DEGREE). \en Curve degree (NURBS_DEGREE).
static size_t uSurfaceDegree; ///< \ru Порядок поверхности по U. \en Surface degree by U.
static size_t vSurfaceDegree; ///< \ru Порядок поверхности по V. \en Surface degree by V.
// \ru Изменяются с помощью метода SetVarValue().
// \en Can be changed using SetVarValue method().
static DoubleVariable lowRenderAng; ///< \ru Угол для минимального количества отображаемых сегментов. \en Angle for minimum mapping segments count.
static DoubleVariable higRenderAng; ///< \ru Угол для максимального количества отображаемых сегментов. \en Angle for maximum mapping segments count.
static DoubleVariable deviateSag; ///< \ru Угловая толерантность. \en Angular tolerance.
static DoubleVariable visualSag; ///< \ru Величина стрелки прогиба для визуализации. \en Value of sag for visualization.
static SizeVariable newtonCount; ///< \ru Число приближений в итерационном методе. \en Number of approximations in iterative method.
static SizeVariable newtonLimit; ///< \ru Количество итераций решения системы уравнений методом Newton. \en Iterations count for solving system of equations by Newton method.
static SizeVariable curveDegree; ///< \ru Порядок кривой (NURBS_DEGREE). \en Curve degree (NURBS_DEGREE).
static SizeVariable uSurfaceDegree; ///< \ru Порядок поверхности по U. \en Surface degree by U.
static SizeVariable vSurfaceDegree; ///< \ru Порядок поверхности по V. \en Surface degree by V.
//------------------------------------------------------------------------------
// \ru Временные переменные. \en Temporary variables.
//---
static size_t tempIndex; ///< \ru Временный коэффициент. \en Temporary coefficient.
static size_t nameIndex; ///< \ru Индекс имени. \en Name index.
static size_t currentIndex; ///< \ru Текущее имя. \en Current name.
static size_t mathState; ///< \ru Состояние математического ядра. \en State of mathematical kernel.
private:
static const VersionContainer & defaultVersionContainer; ///< \ru Математическая версия по умолчанию. \en Default mathematical version.
static const MbUuid mathID; ///< \ru Идентификатор ядра как приложения. \en Kernel ID.
static bool namesComplete; ///< \ru Флаг полного именования объекта. \en Flag of object full naming.
///< \ru Проименовать грани, рёбра, вершины оболочки после её создания (true) \en Name faces, edges, vertices of shell after creation (true)
///< \ru Проименовать только грани оболочки после её создания (false) \en Name only faces of shell after creation (false)
static bool supressCreators; ///< \ru Флаг отключения работы построителей. \en Constructor disable flag.
static MbeMultithreadedMode multithreadedMode; ///< \ru Флаг режима многопоточных вычислений (по умолчанию максимальный). \en Flag of multithreading mode (maximum by default).
///< \ru mtm_Off - Многопоточные вычисления отключены. \en Multithreading is off.
///< \ru mtm_Standard - Включена многопоточность ядра при обработке независимых объектов. \en Kernel multithreading is ON for independent objects.
///< \ru mtm_SafeItems - Обеспечивается потокобезопасность объектов типа MbItem. Выключена многопоточность ядра при обработке зависимых объектов. \en Ensured thread-safety of dependent objects MbItem. Kernel multithreading is OFF for objects with shared data.
///< \ru mtm_Items - Обеспечивается потокобезопасность объектов типа MbItem. Включена многопоточность ядра при обработке зависимых объектов. \en Ensured thread-safety of dependent objects MbItem. Kernel multithreading is ON for objects with shared data.
///< \ru mtm_Max - Включена максимальная многопоточность ядра. \en Maximal kernel multithreading is ON.
static c3d::eAssertViolationNotify assertViolationNotification; ///< \ru Способ оповещения о нарушении требований. \en The way of assert violation notification.
public:
static MbRefItem * selectCurve; ///< \ru Запомненный объект (для отладки). \en Stored object (for debug).
static MbRefItem * selectSurface; ///< \ru Запомненный объект (для отладки). \en Stored object (for debug).
@@ -363,16 +449,6 @@ public:
/// \ru Идентификатор ядра как приложения. \en Kernel ID.
static const MbUuid & MathID();
/// \ru Установить значения переменных по умолчанию. \en Set default values of variables.
static void SetDefaultValues();
/// \ru Установить значение переменной.
/// Необходимо учитывать, что изменение глобальных переменных может привести
/// к непредсказуемым результатам при распараллеливании вычислений.
/// \en Set value of variable.
/// It is necessary to keep in mind that modification of global variable could lead to
/// unpredictable results when using parallel calculations.
static void SetUserValue( int index, double value );
/** \brief \ru Необходимо ли полное именование объекта.
\en Is it necessary to full object naming. \~
\details \ru Необходимо ли полное именование объекта.
@@ -469,7 +545,7 @@ public:
*/
static void SetAssertNotify( c3d::eAssertViolationNotify );
};
}; // Math
//------------------------------------------------------------------------------
+3 -3
View File
@@ -420,11 +420,11 @@ inline int MbVector::Relative( const MbVector & rel ) const
double l1 = Length();
double l2 = rel.Length();
if ( l1 < Math::LengthEps || l2 < Math::LengthEps )
if ( l1 < Math::LengthEps() || l2 < Math::LengthEps() )
return 0;
double yy = (- rel.x * y + rel.y * x) / (l1*l2);
return ( ::fabs(yy) < Math::LengthEps ) ? 0 : ( yy > 0.0 ) ? + 1 : - 1;
return ( ::fabs(yy) < Math::LengthEps() ) ? 0 : ( yy > 0.0 ) ? + 1 : - 1;
}
@@ -1011,7 +1011,7 @@ inline void MbDirection::Invert()
inline int MbDirection::Relative( const MbDirection & rel ) const
{
double y = - rel.ax * ay + rel.ay * ax;
return ( ::fabs( y ) < Math::LengthEps ) ? 0 : ( y > 0 ) ? + 1 : - 1;
return ( ::fabs( y ) < Math::LengthEps() ) ? 0 : ( y > 0 ) ? + 1 : - 1;
}
File diff suppressed because it is too large Load Diff
+2 -2
View File
@@ -457,9 +457,9 @@ private:
\en Whether indices of solid parts are created. \~
\ingroup Algorithms_3D
*/
MATH_FUNC (bool) CreatePartSolidIndices( const MbSolid & solid,
MATH_FUNC (bool) CreatePartSolidIndices( const MbSolid & solid,
const SArray<MbPartSolidData> & partInfo,
MbPartSolidIndices & partIndices );
MbPartSolidIndices & partIndices );
#endif // __PART_SOLID_H
+152 -26
View File
@@ -504,7 +504,7 @@ struct MATH_CLASS MbClosedCornerValues {
: cornerWay( other.cornerWay ), bendsWay( other.bendsWay ), circlePos( other.circlePos ),
gap( other.gap ), diameter( other.diameter ), shift( other.shift ),
kPlus( other.kPlus ), kMinus( other.kMinus ), angle( other.angle),
plus( other.plus ), prolong( other.prolong ), acrossBend( other.acrossBend ) {}
plus( other.plus ), prolong( other.prolong ), acrossBend( other.acrossBend ) {}
/// \ru Инициализировать по конкретным параметрам. \en Initialize by specific parameters.
void Init( MbeCloseCornerWay cc, MbeCloseBendsWay cb, MbeCloseBendsCirclePos cp, double g, double dm, double sh,
@@ -1967,54 +1967,180 @@ struct MATH_CLASS MbToolStampingValues {
// ---
struct MATH_CLASS MbSolidToSheetMetalValues {
public:
double k; ///< \ru Коэффициент, определяющий положение нейтрального слоя. \en Coefficient determining the position of the neutral layer.
double sheetThickness; ///< \ru Толщина листового тела. \en Thickness of a sheet solid.
double bendRadius; ///< \ru Внутренний радиус сгиба. \en The internal radius of the bend.
SArray<MbEdgeFacesIndexes> bendEdgesIndices; ///< \ru Индексы ребер сгиба. \en Indicies of bend edges.
SArray<MbEdgeFacesIndexes> cutEdgesIndices; ///< \ru Индексы ребер разреза. \en Indicies of cut edges.
/// \ru Ребро для построения сгиба и параметры сгиба. \en The bend edge and parameters of bending. \~
struct MbBendEdgeValues {
double bendRadius; ///< \ru Внутренний радиус сгиба. \en The internal radius of the bend.
MbEdgeFacesIndexes bendEdgeIndex; ///< \ru Индекс ребра сгиба. \en Index of bend edge.
/// \ru Конструктор по умолчанию. \en Default constructor.
MbBendEdgeValues()
: bendRadius ()
, bendEdgeIndex()
{}
/// \ru Конструктор по конкретным параметрам. \en Constructor by specific parameters.
MbBendEdgeValues( double r, MbEdgeFacesIndexes index )
: bendRadius ( r )
, bendEdgeIndex( index )
{}
/// \ru Конструктор копирования. \en Copy-constructor.
MbBendEdgeValues( const MbBendEdgeValues & other )
: bendRadius ( other.bendRadius )
, bendEdgeIndex( other.bendEdgeIndex )
{}
/// \ru Оператор присваивания. \en Assignment operator.
MbBendEdgeValues & operator = ( const MbBendEdgeValues &other ) { Init( other ); return *this; }
/// \ru Инициализация по другому объекту. \en Initialization by another object.
void Init( const MbBendEdgeValues & other ) {
bendRadius = other.bendRadius;
bendEdgeIndex = other.bendEdgeIndex;
}
///\ru Являются ли объекты равными? \en Determine whether an object is equal?
bool IsSame( const MbBendEdgeValues & other, double accuracy ) const {
bool isSame = false;
if ( ::fabs(bendRadius - other.bendRadius) < accuracy &&
bendEdgeIndex.IsSame(other.bendEdgeIndex,accuracy) )
isSame = true;
return isSame;
}
/// \ru Преобразовать элемент согласно матрице. \en Transform element according to the matrix.
void Transform( const MbMatrix3D & matr ) {
matr.TransformLength( bendRadius );
bendEdgeIndex.Transform( matr );
}
/// \ru Сдвинуть объект вдоль вектора. \en Move an object along a vector.
void Move( const MbVector3D & to ) {
bendEdgeIndex.Move( to );
}
/// \ru Повернуть объект вокруг оси на заданный угол. \en Rotate an object at a given angle around an axis.
void Rotate( const MbAxis3D & axis, double ang ) {
bendEdgeIndex.Rotate( axis, ang );
}
KNOWN_OBJECTS_RW_REF_OPERATORS( MbBendEdgeValues ) // \ru Для работы со ссылками и объектами класса \en For treatment of references and objects of the class
};
/// \ru Ребро разъема и параметры замыкания углов. \en The rip edge and closing corner parameters. \~
struct MbRipEdgeValues {
MbEdgeFacesIndexes ripEdgeIndex; ///< \ru Индекс ребра разъема. \en Index of rip edge.
MbClosedCornerValues cornerValues;
/// \ru Конструктор по умолчанию. \en Default constructor.
MbRipEdgeValues()
: ripEdgeIndex()
, cornerValues()
{}
/// \ru Конструктор по конкретным параметрам. \en Constructor by specific parameters.
MbRipEdgeValues( MbEdgeFacesIndexes index, const MbClosedCornerValues & cValues )
: ripEdgeIndex( index )
, cornerValues( cValues )
{}
/// \ru Конструктор копирования. \en Copy-constructor.
MbRipEdgeValues( const MbRipEdgeValues & other )
: ripEdgeIndex( other.ripEdgeIndex )
, cornerValues( other.cornerValues )
{}
/// \ru Оператор присваивания. \en Assignment operator.
MbRipEdgeValues & operator = ( const MbRipEdgeValues &other ) { Init( other ); return *this; }
/// \ru Инициализация по другому объекту. \en Initialization by another object.
void Init( const MbRipEdgeValues & other ) {
ripEdgeIndex = other.ripEdgeIndex;
cornerValues = other.cornerValues;
}
///\ru Являются ли объекты равными? \en Determine whether an object is equal?
bool IsSame( const MbRipEdgeValues & other, double accuracy ) const {
bool isSame = false;
if ( ripEdgeIndex.IsSame(other.ripEdgeIndex, accuracy) &&
cornerValues.IsSame(other.cornerValues, accuracy) )
isSame = true;
return isSame;
}
/// \ru Преобразовать элемент согласно матрице. \en Transform element according to the matrix.
void Transform( const MbMatrix3D & matr ) {
ripEdgeIndex.Transform( matr );
cornerValues.Transform( matr );
}
/// \ru Сдвинуть объект вдоль вектора. \en Move an object along a vector.
void Move( const MbVector3D & to ) {
ripEdgeIndex.Move( to );
}
/// \ru Повернуть объект вокруг оси на заданный угол. \en Rotate an object at a given angle around an axis.
void Rotate( const MbAxis3D & axis, double ang ) {
ripEdgeIndex.Rotate( axis, ang );
}
KNOWN_OBJECTS_RW_REF_OPERATORS( MbRipEdgeValues ) // \ru Для работы со ссылками и объектами класса \en For treatment of references and objects of the class
};
public:
double k; ///< \ru Коэффициент, определяющий положение нейтрального слоя. \en Coefficient determining the position of the neutral layer.
double sheetThickness; ///< \ru Толщина листового тела. \en Thickness of a sheet solid.
std::vector<MbBendEdgeValues> bendEdges; ///< \ru Набор ребер и параметров сгиба. \en Indicies of bend edges.
std::vector<MbRipEdgeValues> ripEdges; ///< \ru Набор ребер и параметров разъемов. \en Indicies of cut edges.
MbClosedCornerValues defaultCornerValues;
/// \ru Конструктор по умолчанию. \en Default constructor.
MbSolidToSheetMetalValues() :
sheetThickness ( 1.0 ),
bendRadius ( 0.0 ),
bendEdgesIndices( ),
cutEdgesIndices ( )
MbSolidToSheetMetalValues()
: k ( 0.0 )
, sheetThickness ( 0.0 )
, bendEdges ( )
, ripEdges ( )
, defaultCornerValues ( )
{}
/// \ru Конструктор копирования. \en Copy-constructor.
MbSolidToSheetMetalValues( const MbSolidToSheetMetalValues & other ) :
sheetThickness ( other.sheetThickness ),
bendRadius ( other.bendRadius ),
bendEdgesIndices( other.bendEdgesIndices ),
cutEdgesIndices ( other.cutEdgesIndices )
MbSolidToSheetMetalValues( const MbSolidToSheetMetalValues & other )
: k ( other.k )
, sheetThickness ( other.sheetThickness )
, bendEdges ( other.bendEdges )
, ripEdges ( other.ripEdges )
, defaultCornerValues( other.defaultCornerValues )
{}
/// \ru Конструктор по конкретным параметрам. \en Constructor by specific parameters.
MbSolidToSheetMetalValues( double thick, double rad, SArray<MbEdgeFacesIndexes> & bIndicies, SArray<MbEdgeFacesIndexes> & cIndicies ) :
sheetThickness ( thick ),
bendRadius ( rad ),
bendEdgesIndices( bIndicies ),
cutEdgesIndices ( cIndicies )
MbSolidToSheetMetalValues( double thick, double koeff, std::vector<MbBendEdgeValues> & bEdges, std::vector<MbRipEdgeValues> & rEdges, const MbClosedCornerValues & defCornerParams )
: k ( koeff )
, sheetThickness ( thick )
, bendEdges ( bEdges )
, ripEdges ( rEdges )
, defaultCornerValues( defCornerParams )
{}
/// \ru Оператор присваивания. \en Assignment operator.
MbSolidToSheetMetalValues & operator = ( const MbSolidToSheetMetalValues &other ) { Init( other ); return *this; }
/// \ru Инициализация по другому объекту. \en Initialization by another object.
void Init( const MbSolidToSheetMetalValues & other ) {
k = other.k;
sheetThickness = other.sheetThickness;
bendRadius = other.bendRadius;
bendEdgesIndices = other.bendEdgesIndices;
cutEdgesIndices = other.cutEdgesIndices;
bendEdges = other.bendEdges;
ripEdges = other.ripEdges;
defaultCornerValues = other.defaultCornerValues;
}
///\ru Являются ли объекты равными? \en Determine whether an object is equal?
bool IsSame( const MbSolidToSheetMetalValues & other, double accuracy ) const {
bool isSame = false;
if ( ::fabs(sheetThickness - other.sheetThickness) < accuracy &&
::fabs(bendRadius - other.bendRadius) < accuracy )
::fabs( k - other.k ) < accuracy &&
defaultCornerValues.IsSame(other.defaultCornerValues, accuracy) )
isSame = true;
return isSame;
}
/// \ru Преобразовать элемент согласно матрице. \en Transform element according to the matrix.
void Transform( const MbMatrix3D & matr ) {
matr.TransformLength( sheetThickness );
for ( size_t bEdgeIndex = bendEdges.size(); bEdgeIndex--; )
bendEdges[bEdgeIndex].Transform( matr );
for ( size_t rEdgeIndex = ripEdges.size(); rEdgeIndex--; )
ripEdges[rEdgeIndex].Transform( matr );
defaultCornerValues.Transform( matr );
}
/// \ru Сдвинуть объект вдоль вектора. \en Move an object along a vector.
void Move( const MbVector3D & to ) {
for ( size_t bEdgeIndex = bendEdges.size(); bEdgeIndex--; )
bendEdges[bEdgeIndex].Move( to );
for ( size_t rEdgeIndex = ripEdges.size(); rEdgeIndex--; )
ripEdges[rEdgeIndex].Move( to );
}
/// \ru Повернуть объект вокруг оси на заданный угол. \en Rotate an object at a given angle around an axis.
void Rotate( const MbAxis3D & axis, double ang ) {
for ( size_t bEdgeIndex = bendEdges.size(); bEdgeIndex--; )
bendEdges[bEdgeIndex].Rotate( axis, ang );
for ( size_t rEdgeIndex = ripEdges.size(); rEdgeIndex--; )
ripEdges[rEdgeIndex].Rotate( axis, ang );
}
KNOWN_OBJECTS_RW_REF_OPERATORS( MbSolidToSheetMetalValues ) // \ru Для работы со ссылками и объектами класса \en For treatment of references and objects of the class
};
+6 -2
View File
@@ -122,10 +122,14 @@ public :
explicit MbSolid( MbFaceShell * shell, MbCreator * creator );
/// \ru Конструктор по оболочке и строителю. \en Constructor by shell and creator.
explicit MbSolid( MbFaceShell & shell, MbCreator & creator );
/// \ru Конструктор по оболочке и набору строителей, флагу копирования строителей и регистратору дублирования объектов. \en Constructor by shell and set of creators, flag of creators copying and registrator of objects duplicating.
MbSolid( MbFaceShell & shell, RPArray<MbCreator> & creators, bool sameCreators, MbRegDuplicate * iReg ); // BUG_40923
MbSolid( MbFaceShell & shell, RPArray<MbCreator> & creators, bool sameCreators, MbRegDuplicate * iReg );
/// \ru Конструктор по оболочке и набору строителей, флагу копирования строителей и регистратору дублирования объектов. \en Constructor by shell and set of creators, flag of creators copying and registrator of objects duplicating.
MbSolid( MbFaceShell & shell, c3d::CreatorsSPtrVector & creators, bool sameCreators, MbRegDuplicate * iReg ); // BUG_40923
MbSolid( MbFaceShell & shell, c3d::CreatorsVector & creators, bool sameCreators, MbRegDuplicate * iReg );
/// \ru Конструктор по оболочке и набору строителей, флагу копирования строителей и регистратору дублирования объектов. \en Constructor by shell and set of creators, flag of creators copying and registrator of objects duplicating.
MbSolid( MbFaceShell & shell, c3d::CreatorsSPtrVector & creators, bool sameCreators, MbRegDuplicate * iReg );
/// \ru Конструктор по оболочке, телу, у которого берутся строители, и строителю. \en Constructor by shells, creator and solid which has creators.
MbSolid( MbFaceShell & shell, const MbSolid & solid, MbCreator & creator );
/// \ru Конструктор по оболочке, телу, у которого берутся строители, и строителю. \en Constructor by shells, creator and solid which has creators.
+3 -2
View File
@@ -244,10 +244,11 @@ SignedType abs_t( const SignedType x ) { return ((x >= 0) ? x : -x); } //KYA K13
// have to be disabled
//#pragma warning(disable: 4018) // W3: comparison : signed/unsigned mismatch
//#pragma warning(disable: 4201) // W4: nonstandard extension used : nameless struct/union
#pragma warning(disable: 4201) // W4: nonstandard extension used : nameless struct/union
#pragma warning(disable: 4245) // W4: const conversion, signed/unsigned mismatch
#pragma warning(disable: 4365) // W4: value conversion, signed/unsigned mismatch
//#pragma warning(disable: 4365) // W4: value conversion, signed/unsigned mismatch
//#pragma warning(disable: 4516) // W4: access-declarations are deprecated; member using-declarations provide a better alternative
//#pragma warning(disable: 4786) // \ru Иначе map сыпет такое!!! _ANN_PARAM_MAP_ Чтобы не ругалась на урезание отладочной информации \en Otherwise map output such a things!!! _ANN_PARAM_MAP_ For not swearing on reduction of debugging information
+1 -1
View File
@@ -167,7 +167,7 @@ inline void CSSArray<Type>::AddArray( const SArray<Type> & arr, bool doSort )
//-------------------------------------------------------------------------------
// \ru поиск объека в массиве \en search of an element in array
// \ru поиск объекта в массиве \en search of an element in array
// ---
template <class Type>
inline size_t CSSArray<Type>::Find( const Type & el ) {
+8
View File
@@ -20,6 +20,11 @@
#include <queue>
#include <vector>
#if defined (C3D_WINDOWS) && !defined(ALL_WARNINGS) // _MSC_VER // Set warnings level
#pragma warning(push) // Preserve current state of warning settings
#pragma warning(disable: 4201) // warning C4201: nonstandard extension used: nameless struct/union
#endif
//-----------------------------------------------------------------------------
/** \brief \ru Очередь с приоритетом с использованием кучи.
@@ -502,5 +507,8 @@ size_t KdTree<Scalar>::createTree( size_t nodeId, size_t start, size_t end, size
return rightLevel;
}
#if defined (C3D_WINDOWS) && !defined(ALL_WARNINGS) // _MSC_VER // Set warnings level
#pragma warning(pop) // Restore state of warning settings
#endif
#endif //__MB_KDTREE_H
+6
View File
@@ -20,6 +20,7 @@
#include <mb_data.h>
#include <mb_enum.h>
#include <topology_item.h>
#include <list>
#include <set>
#include <vector>
#include <surface.h>
@@ -104,6 +105,9 @@ typedef std::vector<const MbCurveEdge *> ConstEdgesVector;
typedef std::vector<EdgeSPtr> EdgesSPtrVector;
typedef std::vector<ConstEdgeSPtr> ConstEdgesSPtrVector;
typedef std::list<MbCurveEdge *> EdgesList;
typedef std::list<const MbCurveEdge *> ConstEdgesList;
typedef std::set<MbCurveEdge *> EdgesSet;
typedef EdgesSet::iterator EdgesSetIt;
typedef EdgesSet::const_iterator EdgesSetConstIt;
@@ -589,6 +593,8 @@ public :
/// \ru Замена кривой ребра на кривую crv. \en Replacement of a curve by the curve 'crv'.
virtual bool ChangeCurve( MbCurve3D & crv );
/// \ru Замена кривой ребра на кривую crv. \en Replacement of a curve by the curve 'crv'.
void ChangeIntersectionCurve( MbSurfaceIntersectionCurve & crv, bool sense );
/// \ru Выдать кривую пересечения поверхностей. \en Get surfaces intersection curve.
const MbSurfaceIntersectionCurve & GetIntersectionCurve() const { return (const MbSurfaceIntersectionCurve &)*curve; }
+1 -1
View File
@@ -750,7 +750,7 @@ public :
/// \ru Создан ли временный объект сопровождения? \en Is a temporary object for the maintenance created?
bool IsTemporal() const { return (temporal != NULL); }
/// \ru Удалить временный объект сопровождения. \en Delete a temporary maintenance object.
void RemoveTemporal() const;
void RemoveTemporal( bool removeFacesTemporal = true ) const;
/// \ru Создать новый временный объект сопровождения. \en Create new temporary maintenance object.
const MbFaceSetTemp * CreateTemporal( bool keepExisting ) const;
/// \ru Обновить временный объект сопровождения грани. \en Update a temporary maintenance object of a face.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.