- C3d aggiornamento delle librerie ( 116287).
This commit is contained in:
SaraP
2022-02-03 17:35:40 +01:00
parent f4419d2844
commit ae5417de3e
61 changed files with 4087 additions and 1072 deletions
+36
View File
@@ -856,13 +856,49 @@ MATH_FUNC (MbSurface *) GetExtendedSurfaceCopy( MbCube &
\return \ru Возвращает true, если получилось построить грани.
\en Returns true if new faces have been successfully created. \~
\ingroup Algorithms_3D
\deprecated \ru Функция устарела, взамен использовать #CreateFaces с #FacesSPtrVector.
\en The function is deprecated, instead use #CreateFaces with #FacesSPtrVector. \~
*/
// ---
// DEPRECATE_DECLARE_REPLACE( CreateFaces with FacesSPtrVector )
MATH_FUNC (bool) CreateFaces( const MbPlacement3D & place, const MbContour & contour,
const MbVector3D & der, bool sense, const MbSNameMaker & n,
RPArray<MbFace> & faces, bool useAddCount = false );
//------------------------------------------------------------------------------
/** \brief \ru Построить набор граней с топологией призмы.
\en Create a set of faces with topology of a prism. \~
\details \ru Построить набор граней с топологией призмы. \n
\en Create a set of faces with topology of a prism. \n \~
\param[in] place - \ru Локальная система координат (ЛСК).
\en A local coordinate system (LCS). \~
\param[in] contour - \ru Двумерный контур в ЛСК.
\en A two-dimensional curve in LCS. \~
\param[in] der - \ru Направление выдавливания.
\en An extrusion direction. \~
\param[in] sense - \ru Ориентация выходного массива граней как замкнутой оболочки.
\en An orientation of the output array of faces as a closed shell. \~
\param[in] n - \ru Именователь.
\en An object for naming the new objects. \~
\param[in,out] faces - \ru Множество созданных граней.
\en The array of created faces. \~
\param[in] useAddCount - \ru Использовать количество граней initFaces на входе для именования новых граней.
\en The number of input faces initFaces is to be used for naming the new faces. \~
\return \ru Возвращает true, если получилось построить грани.
\en Returns true if new faces have been successfully created. \~
\ingroup Algorithms_3D
*/
// ---
MATH_FUNC (bool) CreateFaces( const MbPlacement3D & place,
const MbContour & contour,
const MbVector3D & der,
bool sense,
const MbSNameMaker & n,
c3d::FacesSPtrVector & faces,
bool useAddCount = false );
//------------------------------------------------------------------------------
/** \brief \ru Оценить параметры выдавливания для ребра жёсткости.
\en Estimate parameters of extrusion for a rib. \~
+5 -5
View File
@@ -22,6 +22,7 @@
#include <mb_cart_point3d.h>
#include <space_item.h>
#include <mb_operation_result.h>
#include <wire_frame.h>
#include <vector>
@@ -31,7 +32,6 @@ class MATH_CLASS MbNurbs3D;
class MATH_CLASS MbContour3D;
class MATH_CLASS MbFace;
class MATH_CLASS MbSurface;
class MATH_CLASS MbWireFrame;
class MATH_CLASS MbItem;
class MATH_CLASS MbName;
class MATH_CLASS MbSweptData;
@@ -837,8 +837,9 @@ MATH_FUNC(MbResultType) CreateFairBezierCurveOnBasePolyline( MbCurve3D * p
//------------------------------------------------------------------------------
/** \brief \ru Создать плавную кривую Безье сопряжения на опорной ломаной.
\en Create a fair Bezier curve on base polyline. \~
\details \ru Создать плавную V-кривую на опорной ломаной и аппроксимировать рациональной кубической кривой Безье. \n
\en Create a fillet fair Bezier curve on base polyline. \~
\details \ru Создать плавную V-кривую на опорной ломаной и аппроксимировать рациональной кубической кривой Безье.
\en Create a fillet fair Bezier curve on base polyline and approximate a rational cubic Bezier curve. \~
\param[in] polyline - \ru Исходная ломаная. \en An initial polyline. \~
\param[in] data - \ru Данные построения кривой. \en The curve construction data. \~
@@ -1387,8 +1388,7 @@ MATH_FUNC ( MbCurve3D * ) SetProportionalParametrization( MbCurve3D * curve,
// ---
MATH_FUNC( MbResultType ) ExtendCurve( const MbCurve3D & sourceCurve,
const MbCurveExtensionParameters & parameters,
const MbSNameMaker & snMaker,
MbWireFrame *& resFrame );
c3d::WireFrameSPtr & resFrame );
//------------------------------------------------------------------------------
+19
View File
@@ -341,6 +341,24 @@ MATH_FUNC (MbFunction *) CreateFunction( const MbCurve3D & curve,
size_t coordinate );
//------------------------------------------------------------------------------
/** \brief \ru Вычисление данных фантома для торцев поверхности переменного сечения.
\en Calculation of the phantom data for the ends of the mutable section surface. \~
\details \ru Вычисление плоскости сечения, точек направляющих, сторон охватывающего треугольника и вершины на торце поверхности. \n
\en Calculating the section plane, guide points, sides of the enclosing triangle, and apex at the ends of the surface. \n
\param[in] sectionData - \ru Параметры поверхности переменного сечения.
\en The parameters of the mutable section surface. \~
\param[out] sctionPhantom - \ru Данные охватывающих треугольников на торцах поверхности переменного сечения.
\en The data of the enclosing triangles at the ends of the mutable section surface. \~
\return \ru Возвращает код результата построения.
\en Returns the creation result code. \~
\ingroup Algorithms_3D
*/
// ---
MATH_FUNC (MbResultType) SectionPhantom( const MbSectionData & sectionData,
MbSectionPhantom & sctionPhantom );
//------------------------------------------------------------------------------
/** \brief \ru Вычисление данных фантома для торцев поверхности переменного сечения.
\en Calculation of the phantom data for the ends of the mutable section surface. \~
@@ -377,6 +395,7 @@ MATH_FUNC (MbFunction *) CreateFunction( const MbCurve3D & curve,
\ingroup Algorithms_3D
*/
// ---
//DEPRECATE_DECLARE_REPLACE(SectionPhantom with MbSectionPhantom)
MATH_FUNC (MbResultType) SectionPhantom( const MbSectionData & sectionData,
MbPlacement3D & begPlace,
MbCartPoint3D & begGuideP1,
+65
View File
@@ -1048,12 +1048,42 @@ MATH_FUNC(MbResultType) CreateStampWithToolSolidParts( MbSolid &
\en The resultant solid. \~
\result \ru - Код результата операции.
\en - The operation result code. \~
\deprecated \ru Функция устарела, взамен использовать #NormalizeCutSides с параметром #cutOnly.
\en The function is deprecated, instead use #NormalizeCutSides with the parameter #cutOnly. \~
\ingroup Sheet_Metal_Modeling
*/
// ---
//DEPRECATE_DECLARE_REPLACE( NormalizeCutSides with cutOnly )
MATH_FUNC(MbResultType) NormalizeCutSides ( MbSolid & solid,
MbeCopyMode sameShell,
const MbSNameMaker & nameMaker,
MbSolid *& result );
//------------------------------------------------------------------------------
/** \brief \ru Нормализовать кромки выреза листового тела.
\en Normalize cut sides of the sheet solid. \~
\details \ru Нормализовать кромки выреза листового тела. \n
\en Normalize cut sides of the sheet solid. \n \~
\param[in] solid - \ru Исходное тело.
\en The source solid. \~
\param[in] sameShell - \ru Флаг удаления оболочки исходного тела.
\en Whether to delete the shell of the source solid. \~
\param[in] nameMaker - \ru Именователь.
\en An object for naming the new objects. \~
\param[in] cutOnly - \ru Нормализовать только вырез.
\en Normalize only cut. \~
\param[out] result - \ru Результирующее тело.
\en The resultant solid. \~
\result \ru - Код результата операции.
\en - The operation result code. \~
\ingroup Sheet_Metal_Modeling
*/
// ---
MATH_FUNC(MbResultType) NormalizeCutSides ( MbSolid & solid,
MbeCopyMode sameShell,
const MbSNameMaker & nameMaker,
bool cutOnly,
MbSolid *& result );
@@ -1128,9 +1158,12 @@ MATH_FUNC (MbResultType) Stamp( MbSolid & solid,
\en The resultant solid. \~
\result \ru - Код результата операции.
\en - The operation result code. \~
\deprecated \ru Функция устарела, взамен использовать #StampWithToolSolid с набором параметров #MbStampWithToolParams.
\en The function is deprecated, instead use #StampWithToolSolid with the parameter list #MbStampWithToolParams. \~
\ingroup Sheet_Metal_Modeling
*/
// ---
//DEPRECATE_DECLARE_REPLACE( StampWithToolSolid with 'MbStampWithToolParams' argument )
MATH_FUNC( MbResultType ) StampWithToolSolid( MbSolid & solid,
MbeCopyMode sameShell,
const MbFace & targetFace,
@@ -1143,6 +1176,38 @@ MATH_FUNC( MbResultType ) StampWithToolSolid( MbSolid & solid
MbSolid *& result );
//------------------------------------------------------------------------------
/** \brief \ru Штамповка телом-инструментом (пуансоном или матрицей).
\en Stamping with a tool solid (punch or die). \~
\details \ru Штамповка строится на основе произвольного тела-инструмента и заданной плоской листовой грани.
Штамповка подрезается границами листовой грани, которую пересекает тело.\n
\en The stamping is created based on a tool body and a flat sheet face.
The stamping is trimmed by the boundary of the sheet face which contains the sketch.\n \~
\param[in] solid - \ru Исходное листовое тело.
\en The source sheet solid. \~
\param[in] sameShell - \ru Флаг удаления оболочки исходного тела.
\en Whether to delete the shell of the source solid. \~
\param[in] toolSolid - \ru Оболочка тела-инструмента.
\en A shell of tool solid. \~
\param[in] sameShellTool - \ru Флаг удаления оболочки тела-инструмента.
\en Whether to delete the shell of the tool solid. \~
\param[in] params - \ru Параметры штамповки.
\en The parameters of stamping. \~
\param[out] result - \ru Результирующее тело.
\en The resultant solid. \~
\result \ru - Код результата операции.
\en - The operation result code. \~
\ingroup Sheet_Metal_Modeling
*/
// ---
MATH_FUNC( MbResultType ) StampWithToolSolid( c3d::SolidSPtr & solid,
MbeCopyMode sameShell,
c3d::SolidSPtr & toolSolid,
MbeCopyMode sameShellTool,
const MbStampWithToolParams & params,
c3d::SolidSPtr & result );
//------------------------------------------------------------------------------
/** \brief \ru Создание составляющих частей сферической штамповки.
\en Creation of spherical stamping's components. \~
+281 -45
View File
@@ -63,7 +63,7 @@ class IProgressIndicator;
*/
// ---
MATH_FUNC( MbResultType ) PatchShell( const MbPatchShellParams & params,
c3d::SolidSPtr & result );
c3d::SolidSPtr & result );
//------------------------------------------------------------------------------
@@ -120,6 +120,26 @@ MATH_FUNC (MbResultType) PatchShell( const RPArray<MbCurve3D> & initCurves,
MbSolid *& result );
//------------------------------------------------------------------------------
/** \brief \ru Построить незамкнутое тело по множеству групп точек.
\en Create an open solid given a set of point groups. \~
\details \ru Построить незамкнутое тело по сечениям, образованным сплайнами, построенными по группе контрольных точек. \n
\en Create an open lofted solid whose profiles are defined by splines created from the specified groups of points. \n \~
\param[in] params - \ru Параметры операции.
Содержат информацию о наборе точек, именователе, идентификаторе.
\en Operation parameters.
Contains information about points, object defining names generation in the operation, identifier. \~
\param[out] result - \ru Результирующая оболочка.
\en The required shell. \~
\return \ru Возвращает код результата операции.
\en Returns operation result code. \~
\ingroup Shell_Modeling
*/
// ---
MATH_FUNC (MbResultType) LoftedShell( const MbLoftedPointsShellParams & params,
c3d::SolidSPtr & result );
//------------------------------------------------------------------------------
/** \brief \ru Построить незамкнутое тело по множеству групп точек.
\en Create an open solid given a set of point groups. \~
@@ -135,15 +155,38 @@ MATH_FUNC (MbResultType) PatchShell( const RPArray<MbCurve3D> & initCurves,
\en The required shell. \~
\return \ru Возвращает код результата операции.
\en Returns operation result code. \~
\deprecated \ru Функция устарела, взамен использовать #LoftedShell с набором параметров #MbLoftedPointsShellParams.
\en The function is deprecated, instead use #LoftedShell with the parameter list #MbLoftedPointsShellParams. \~
\ingroup Shell_Modeling
*/
// ---
// DEPRECATE_DECLARE_REPLACE( LoftedShell with MbLoftedPointsShellParams )
MATH_FUNC (MbResultType) LoftedShell( const RPArray< SArray<MbCartPoint3D> > & points,
const MbSNameMaker & names,
SimpleName name,
MbSolid *& result );
//------------------------------------------------------------------------------
/** \brief \ru Построить незамкнутое тело по множеству кривых.
\en Create an open solid from a set of curves. \~
\details \ru Построить незамкнутое тело по сечениям, образованным кривыми. \n
\en Create an open lofted solids whose profiles are defined by the curves. \n \~
\param[in] params - \ru Параметры операции.
Содержат информацию о наборе кривых, именователе, идентификаторе.
\en Operation parameters.
Contains information about curves, object defining names generation in the operation, identifier. \~
\param[out] result - \ru Результирующая оболочка.
\en The required shell. \~
\return \ru Возвращает код результата операции.
\en Returns operation result code. \~
\ingroup Shell_Modeling
*/
// ---
MATH_FUNC (MbResultType) LoftedShell( const MbLoftedCurvesShellParams & params,
c3d::SolidSPtr & result );
//------------------------------------------------------------------------------
/** \brief \ru Построить незамкнутое тело по множеству кривых.
\en Create an open solid from a set of curves. \~
@@ -159,9 +202,12 @@ MATH_FUNC (MbResultType) LoftedShell( const RPArray< SArray<MbCartPoint3D> > & p
\en The required shell. \~
\return \ru Возвращает код результата операции.
\en Returns operation result code. \~
\deprecated \ru Функция устарела, взамен использовать #LoftedShell с набором параметров #MbLoftedCurvesShellParams.
\en The function is deprecated, instead use #LoftedShell with the parameter list #MbLoftedCurvesShellParams. \~
\ingroup Shell_Modeling
*/
// ---
// DEPRECATE_DECLARE_REPLACE( LoftedShell with MbLoftedCurvesShellParams )
MATH_FUNC (MbResultType) LoftedShell( const RPArray<MbCurve3D> & curves,
const MbSNameMaker & names,
SimpleName name,
@@ -236,6 +282,8 @@ MATH_FUNC (MbResultType) NurbsSurfacesShell( NurbsSurfaceValues & params,
\en Create an open solid from a set of curves. \~
\details \ru Построить незамкнутое тело по сети кривых, заданных в параметрах построения. \n
\en Create an open solid from a set of curves specified in the parameters. \n \~
\deprecated \ru Функция устарела, взамен использовать #MeshShell с набором параметров #MbMeshShellParameters.
\en The function is deprecated, instead use #MeshShell with the parameter list #MbMeshShellParameters. \~
\param[in] pars - \ru Параметры операции.
\en The operation parameters. \~
\param[in] operNames - \ru Именователь.
@@ -249,11 +297,29 @@ MATH_FUNC (MbResultType) NurbsSurfacesShell( NurbsSurfaceValues & params,
\ingroup Shell_Modeling
*/
// ---
MATH_FUNC (MbResultType) MeshShell( MeshSurfaceValues & pars,
//DEPRECATE_DECLARE_REPLACE( MeshShell with MbMeshShellParameters )
MATH_FUNC (MbResultType) MeshShell( MeshSurfaceValues & pars,
const MbSNameMaker & operNames,
bool isPhantom,
MbSolid *& result );
//------------------------------------------------------------------------------
/** \brief \ru Построить тело по сети кривых.
\en Create a solid from a set of curves. \~
\details \ru Построить тело по сети кривых, заданных в параметрах построения. \n
\en Create a solid from a set of curves specified in the parameters. \n \~
\param[in] params - \ru Параметры операции.
\en The operation parameters. \~
\param[out] result - \ru Результирующая оболочка.
\en The required shell. \~
\return \ru Возвращает код результата операции.
\en Returns operation result code. \~
\ingroup Shell_Modeling
*/
// ---
MATH_FUNC (MbResultType) MeshShell( const MbMeshShellParameters & params,
c3d::SolidSPtr & result );
//------------------------------------------------------------------------------
/** \brief \ru Усечь (обрезать) незамкнутое тело.
@@ -300,12 +366,89 @@ MATH_FUNC (MbResultType) TruncateShell( MbSolid & initSolid,
MbPlacement3D *& resultPlace );
//------------------------------------------------------------------------------
/** \brief \ru Построить продолжение незамкнутого тела выдавливанием.
\en Create an extension of an open solid by extrusion. \~
\details \ru Построить продолжение незамкнутого тела путём продления указанных краевых рёбер тела. \n
Продление может быть выполнено следующими способами.
Может быть удлинена на заданное расстояние указанная грань.
К указанной грани может быть добавлена гладко стыкующаяся с ней грань.
К указанной грани может быть добавлена грань, полученная выдавливанием крайнего ребра в заданном направлении.
\en Create an extension of an open solid by extension of specified boundary edges of the solid. \n \~
An extension can be performed in the following ways:
The specified faces can be extended on the given distance.
A smoothly connected face can be added to the given face.
A face obtained by extrusion of a boundary edge in the given direction can be added to the specified face.
\param[in] solid - \ru Исходная оболочка.
\en The initial shell. \~
\param[in] sameShell - \ru Режим копирования оболочки.
\en Whether to copy the shell. \~
\param[in] face - \ru Одна из продляемых граней в исходной оболочке.
\en One of the face of the initial shell to be extended. \~
\param[in] edges - \ru Множество краевых ребер, через которые выполняется продление.
\en An array of boundary edges through which to extend the face. \~
\param[in] params - \ru Параметры операции.
\en The operation parameters. \~
\param[in] operNames - \ru Именователь.
\en An object for naming the new objects. \~
\param[out] result - \ru Результирующая оболочка.
\en The required shell. \~
\return \ru Возвращает код результата операции.
\en Returns operation result code. \~
\deprecated \ru Функция устарела, взамен использовать #ExtensionShell с набором параметров #MbExtensionShellParams.
\en The function is deprecated, instead use #ExtensionShell with the parameter list #MbExtensionShellParams. \~
\ingroup Shell_Modeling
*/
// ---
//DEPRECATE_DECLARE_REPLACE( ExtensionShell with MbExtensionShellParams )
MATH_FUNC (MbResultType) ExtensionShell( MbSolid & solid,
MbeCopyMode sameShell,
MbFace & face,
const RPArray<MbCurveEdge> & edges,
const ExtensionValues & params,
const MbSNameMaker & operNames,
MbSolid *& result );
//------------------------------------------------------------------------------
/** \brief \ru Построить продолжение незамкнутого тела выдавливанием.
\en Create an extension of an open solid by extrusion. \~
\details \ru Построить продолжение незамкнутого тела путём продления указанных краевых рёбер тела. \n
Продление может быть выполнено следующими способами.
Может быть удлинена на заданное расстояние указанная грань.
К указанной грани может быть добавлена гладко стыкующаяся с ней грань.
К указанной грани может быть добавлена грань, полученная выдавливанием крайнего ребра в заданном направлении.
\en Create an extension of an open solid by extension of specified boundary edges of the solid. \n \~
An extension can be performed in the following ways:
The specified faces can be extended on the given distance.
A smoothly connected face can be added to the given face.
A face obtained by extrusion of a boundary edge in the given direction can be added to the specified face.
\param[in] solid - \ru Исходная оболочка.
\en The initial shell. \~
\param[in] sameShell - \ru Режим копирования оболочки.
\en Whether to copy the shell. \~
\param[in] params - \ru Параметры продления оболочки (#MbExtensionShellParams).
\en Parameters of extension shell. \~
\param[out] result - \ru Результирующая оболочка.
\en The required shell. \~
\return \ru Возвращает код результата операции.
\en Returns operation result code. \~
\ingroup Shell_Modeling
*/
//---
MATH_FUNC (MbResultType) ExtensionShell( MbSolid & solid,
MbeCopyMode sameShell,
const MbExtensionShellParams & params,
c3d::SolidSPtr & result );
//------------------------------------------------------------------------------
/** \brief \ru Построить линейчатое незамкнутое тело.
\en Create an open ruled solid. \~
\details \ru Построить линейчатое незамкнутое тело по двум кривым, заданным в параметрах. \n
\en Create an open ruled solid from two curves specified in parameters. \n \~
\param[in] pars - \ru Параметры операции.
\param[in,out] pars - \ru Параметры операции.
\en The operation parameters. \~
\param[in] operNames - \ru Именователь.
\en An object for naming the new objects. \~
@@ -315,15 +458,36 @@ MATH_FUNC (MbResultType) TruncateShell( MbSolid & initSolid,
\en The required shell. \~
\return \ru Возвращает код результата операции.
\en Returns operation result code. \~
\deprecated \ru Функция устарела, взамен использовать #RuledShell с набором параметров #MbRuledShellParams.
\en The function is deprecated, instead use #RuledShell with the parameter list #MbRuledShellParams. \~
\ingroup Shell_Modeling
*/
// ---
//DEPRECATE_DECLARE_REPLACE( RuledShell with RuledShellParams )
MATH_FUNC (MbResultType) RuledShell( RuledSurfaceValues & pars,
const MbSNameMaker & operNames,
bool isPhantom,
MbSolid *& result );
//------------------------------------------------------------------------------
/** \brief \ru Построить линейчатое незамкнутое тело.
\en Create an open ruled solid. \~
\details \ru Построить линейчатое незамкнутое тело по двум кривым, заданным в параметрах. \n
\en Create an open ruled solid from two curves specified in parameters. \n \~
\param[in] ruledParams - \ru Параметры для построения линейчатого незамкнутого тела.
\en The operation parameters for the creation an open ruled solid. \~
\param[out] outParams - \ru Выходные параметры операции.
\en Output operation parameters. \~
\return \ru Возвращает код результата операции.
\en Returns operation result code. \~
\ingroup Shell_Modeling
*/
// ---
MATH_FUNC (MbResultType) RuledShell( const MbRuledShellParams & ruledParams,
MbRuledShellResult & outParams );
//------------------------------------------------------------------------------
/** \brief \ru Проверить кривую для построения линейчатого тела.
\en Check the curve for a ruled solid creation. \~
@@ -376,52 +540,13 @@ MATH_FUNC (bool) CheckRuledParams( const MbCurve3D & curve,
bool isAscending );
//------------------------------------------------------------------------------
/** \brief \ru Построить продолжение незамкнутого тела выдавливанием.
\en Create an extension of an open solid by extrusion. \~
\details \ru Построить продолжение незамкнутого тела путём продления указанных краевых рёбер тела. \n
Продление может быть выполнено следующими способами.
Может быть удлинена на заданное расстояние указанная грань.
К указанной грани может быть добавлена гладко стыкующаяся с ней грань.
К указанной грани может быть добавлена грань, полученная выдавливанием крайнего ребра в заданном направлении.
\en Create an extension of an open solid by extension of specified boundary edges of the solid. \n \~
An extension can be performed in the following ways:
The specified faces can be extended on the given distance.
A smoothly connected face can be added to the given face.
A face obtained by extrusion of a boundary edge in the given direction can be added to the specified face.
\param[in] solid - \ru Исходная оболочка.
\en The initial shell. \~
\param[in] sameShell - \ru Режим копирования оболочки.
\en Whether to copy the shell. \~
\param[in] face - \ru Одна из продляемых граней в исходной оболочке.
\en One of the face of the initial shell to be extended. \~
\param[in] edges - \ru Множество краевых ребер, через которые выполняется продление.
\en An array of boundary edges through which to extend the face. \~
\param[in] params - \ru Параметры операции.
\en The operation parameters. \~
\param[in] operNames - \ru Именователь.
\en An object for naming the new objects. \~
\param[out] result - \ru Результирующая оболочка.
\en The required shell. \~
\return \ru Возвращает код результата операции.
\en Returns operation result code. \~
\ingroup Shell_Modeling
*/
// ---
MATH_FUNC (MbResultType) ExtensionShell( MbSolid & solid,
MbeCopyMode sameShell,
MbFace & face,
const RPArray<MbCurveEdge> & edges,
const ExtensionValues & params,
const MbSNameMaker & operNames,
MbSolid *& result );
//------------------------------------------------------------------------------
/** \brief \ru Построить тело соединения по двум кривым.
\en Create a joint solid from two curves. \~
\details \ru Построить незамкнутое тело соединения по двум кривым на поверхности. \n
\en Create an open joint solid from two curves on a surface. \n \~
\deprecated \ru Функция устарела, взамен использовать #JoinShell с набором параметров #MbJoinShellParams.
\en The function is deprecated, instead use #JoinShell with the parameter list #MbJoinShellParams. \~
\param[in] curve1 - \ru Первая поверхностная кривая.
\en The first curve on a surface. \~
\param[in] curve2 - \ru Вторая поверхностная кривая.
@@ -437,6 +562,7 @@ MATH_FUNC (MbResultType) ExtensionShell( MbSolid & solid,
\ingroup Shell_Modeling
*/
//---
//DEPRECATE_DECLARE_REPLACE( JoinShell with MbJoinShellParams )
MATH_FUNC (MbResultType) JoinShell( MbSurfaceCurve & curve1,
MbSurfaceCurve & curve2,
JoinSurfaceValues & parameters,
@@ -449,6 +575,8 @@ MATH_FUNC (MbResultType) JoinShell( MbSurfaceCurve & curve1,
\en Create a joint solid from two sets of edges. \~
\details \ru Построить незамкнутое тело соединения по двум множествам ребер. \n
\en Create an open joint solid from two sets of edges. \n \~
\deprecated \ru Функция устарела, взамен использовать #JoinShell с набором параметров #MbJoinShellParams.
\en The function is deprecated, instead use #JoinShell with the parameter list #MbJoinShellParams. \~
\param[in] edges1 - \ru Первая группа ребер.
\en The first group of edges. \~
\param[in] orients1 - \ru Ориентации ребер в первой группе.
@@ -474,6 +602,7 @@ MATH_FUNC (MbResultType) JoinShell( MbSurfaceCurve & curve1,
\ingroup Shell_Modeling
*/
//---
//DEPRECATE_DECLARE_REPLACE( JoinShell with MbJoinShellParams )
MATH_FUNC (MbResultType) JoinShell( const RPArray<MbCurveEdge> & edges1,
const SArray<bool> & orients1,
const RPArray<MbCurveEdge> & edges2,
@@ -486,6 +615,24 @@ MATH_FUNC (MbResultType) JoinShell( const RPArray<MbCurveEdge> & edges1,
bool isPhantom = false );
//------------------------------------------------------------------------------
/** \brief \ru Построить тело соединения по параметрам.
\en Create a joint solid from parameters. \~
\details \ru Построить незамкнутое тело соединения по параметрам. \n
\en Create an open joint solid from parameters. \n \~
\param[in] parameters - \ru Параметры операции.
\en The operation parameters. \~
\param[out] result - \ru Результаты операции.
\en The operation results. \~
\return \ru Возвращает код результата операции.
\en Returns operation result code. \~
\ingroup Shell_Modeling
*/
//---
MATH_FUNC (MbResultType) JoinShell( const MbJoinShellParams & parameters,
MbJoinShellResults & result );
//------------------------------------------------------------------------------
/** \brief \ru Разделить оболочку на части по заданному набору ребер.
\en Divide a shell into parts using a given set of edges. \~
@@ -533,6 +680,7 @@ MATH_FUNC (MbResultType) DivideShell( MbSolid & solid,
*/
//---
MATH_FUNC (MbResultType) DivideShell( MbSolid & solid,
MbeCopyMode sameShell,
const MbDivideShellParams & params,
c3d::SolidSPtr & resSolid );
@@ -639,8 +787,11 @@ MATH_FUNC (MbCurve3D *) CreateJoinedCurve( const RPArray<MbCurveEdge> & edges,
\return \ru Возвращает код результата операции.
\en Returns operation result code. \~
\ingroup Shell_Modeling
\deprecated \ru Функция устарела, взамен использовать #FacesFillet с #MbFacesFilletParams.
\en The function is deprecated, use #FacesFillet with #MbFacesFilletParams instead. \~
*/
// ---
//DEPRECATE_DECLARE_REPLACE( FacesFillet with MbFacesFilletParams )
MATH_FUNC (MbResultType) FacesFillet( const MbSolid & solid1,
const MbFace & face1,
const MbSolid & solid2,
@@ -650,6 +801,24 @@ MATH_FUNC (MbResultType) FacesFillet( const MbSolid & solid1,
MbSolid *& result );
//------------------------------------------------------------------------------
/** \brief \ru Построить тело сопряжения несвязанных граней.
\en Create a solid of two non-connected faces. \~
\details \ru Построить незамкнутое тело, состоящее из грани скругления между двумя несвязанными гранями. \n
\en Create an open solid that consists of a fillet face between two non-connected faces. \n \~
\param[in] params - \ru Параметры операции.
\en Operation parameters. \~
\param[out] result - \ru Построенная оболочка (тело).
\en The resultant shell (solid). \~
\return \ru Возвращает код результата операции.
\en Returns operation result code. \~
\ingroup Shell_Modeling
*/
// ---
MATH_FUNC (MbResultType) FacesFillet( const MbFacesFilletParams & params,
c3d::SolidSPtr & result );
//------------------------------------------------------------------------------
/** \brief \ru Построить тело на базе элементарной поверхности.
\en Create a solid given an elementary surface. \~
@@ -767,6 +936,24 @@ MATH_FUNC (MbeStitchResType) StitchShells( const c3d::SolidsSPtrVector & initial
c3d::SolidSPtr & resultSolid );
//------------------------------------------------------------------------------
/** \brief \ru Определение оси токарного сечения и построение кривых сечения для тела.
\en Search for lathe axis and construction of lathe elements for the solid. \~
\details \ru Функция выполняет поиск токарной оси граней вращения и строит токарное сечение в некоторой плоскости. \n
\en The function searches for lathe axis of rotation faces and builds the curves of lathe-section in a plane. \n \~
\param[in] params - \ru Параметры для определения оси токарного сечения и построения кривых сечения для тела.
\en Parameters for looking the lathe axis and construction of lathe elements for the solid. \~
\param[out] result - \ru Построенные двумерные кривые сечения, расположенные в плоскости XY локальной системы координат. \n
\en The two-dimensional curves located in the XY plane of the local coordinate system. \n \~
\return \ru Возвращает код результата операции.
\en Returns operation result code. \~
\ingroup Shell_Modeling
*/
// ---
MATH_FUNC (MbResultType) LatheCurves( const MbLatheCurvesParams & params,
MbLatheCurvesResult & result );
//------------------------------------------------------------------------------
/** \brief \ru Определение оси токарного сечения и построение кривых сечения для тела.
\en Search for lathe axis and construction of lathe elements for the solid. \~
@@ -782,6 +969,7 @@ MATH_FUNC (MbeStitchResType) StitchShells( const c3d::SolidsSPtrVector & initial
\ingroup Shell_Modeling
*/
// ---
//DEPRECATE_DECLARE_REPLACE( LatheCurves )
MATH_FUNC (MbResultType) LatheCurves( const MbSolid & solid,
const MbAxis3D * axis,
double angle,
@@ -905,6 +1093,8 @@ MATH_FUNC (MbResultType) RectifyFace( const MbFace & face,
\en Create a lattice shell. \~
\details \ru Создать решетчатую оболочку по трем управляющим точкам, параметрам решетки и количеству элементов. \n
\en Create a lattice shell on the three control points of the lattice parameters and the number of elements. \~
\deprecated \ru Функция устарела, взамен использовать #OctaLattice с набором параметров #MbOctaLatticeParams.
\en The function is deprecated, instead use #OctaLattice with the parameter list #MbOctaLatticeParams. \~
\param[in] point0 - \ru Точка, определяющая начало локальной системы координат поверхности.
\en The origin of the surface local coordinate system. \~
\param[in] point1 - \ru Точка, определяющая направление оси X локальной системы и размер элемента.
@@ -930,7 +1120,8 @@ MATH_FUNC (MbResultType) RectifyFace( const MbFace & face,
\ingroup Shell_Modeling
*/
// ---
MATH_FUNC (MbResultType) OctaLattice( const MbCartPoint3D & point0,
//DEPRECATE_DECLARE_REPLACE( OctaLattice with MbOctaLatticeParams )
MATH_FUNC (MbResultType) OctaLattice( const MbCartPoint3D & point0,
const MbCartPoint3D & point1,
const MbCartPoint3D & point2,
double xRadius,
@@ -943,6 +1134,50 @@ MATH_FUNC (MbResultType) OctaLattice( const MbCartPoint3D & point0,
MbSolid *& result );
//------------------------------------------------------------------------------
/** \brief \ru Создать решетчатую оболочку.
\en Create a lattice shell. \~
\details \ru Создать решетчатую оболочку по трем управляющим точкам, параметрам решетки и количеству элементов. \n
\en Create a lattice shell on the three control points of the lattice parameters and the number of elements. \~
\param[in] params - \ru Параметры операции.
\en Operation parameters. \~
\param[out] result - \ru Построенное тело.
\en The constructed solid. \~
\result \ru Возвращает код результата операции.
\en Returns operation result code. \~
\ingroup Shell_Modeling
*/
// ---
MATH_FUNC (MbResultType) OctaLattice( const MbOctaLatticeParams & params,
c3d::SolidSPtr result );
//------------------------------------------------------------------------------
/** \brief \ru Построить обологчку на поверхности переменного сечения.
\en Create a shell on swept mutable section surface. \~
\details \ru Построить грань тела путём движения образующей кривой по направляющей кривой
и выполнить булеву операцию с оболочкой, если последняя задана. \n
Одновременно с построением оболочки функция создаёт её строитель.\n
\en Create a face of shell by moving the generating curve along the spine curve
and perform the Boolean operation with the shell if it is specified. \n
The function simultaneously creates the shell and its constructor.\n \~
\param[in] solid - \ru Обологчка, к которой дополняется построение.
\en The shell the construction is complemented with respect to. \~
\param[in] sameShell - \ru Способ копирования граней обологчки.
\en The method of copying faces of shell. \~
\param[in] data - \ru Данные о поверхности переменного сечения.
\en Data about swept mutable section surface. \~
\param[out] result - \ru Построенная обологчка.
\en The constructed shell. \~
\result \ru Возвращает код результата операции.
\en Returns operation result code. \~
\ingroup Shell_Modeling
*/
// ---
MATH_FUNC( MbResultType ) SectionShell( c3d::SolidSPtr & solid,
MbeCopyMode sameShell,
const MbSectionData & data,
c3d::SolidSPtr & result );
//------------------------------------------------------------------------------
/** \brief \ru Построить обологчку на поверхности переменного сечения.
\en Create a shell on swept mutable section surface. \~
@@ -967,6 +1202,7 @@ MATH_FUNC (MbResultType) OctaLattice( const MbCartPoint3D & point0,
\ingroup Shell_Modeling
*/
// ---
//DEPRECATE_DECLARE_REPLACE( SectionShell with 'MbSectionData' argument )
MATH_FUNC( MbResultType ) SectionShell( MbSolid * solid,
MbeCopyMode sameShell,
const MbSectionData & data,
+472 -251
View File
File diff suppressed because it is too large Load Diff
+2 -2
View File
@@ -794,8 +794,8 @@ MATH_FUNC (MbResultType) MiddlePlaces( const MbCurve3D & curve1
\en The reference curve (spine). \~
\param[in] g1 - \ru Первая направляющая кривая.
\en The first guide curve. \~
\param[in] g2 - \ru Вторая направляющая кривая (g1==g2 совпадает с первой при cs_Cycle).
\en The second guide curve (g1==g2 the same first guide for cs_Cycle). \~
\param[in] g2 - \ru Вторая направляющая кривая (g1==g2 совпадает с первой при cs_Round).
\en The second guide curve (g1==g2 the same first guide for cs_Round). \~
\param[in] c0 - \ru Дополнительная направляющая кривая (может быть nullptr).
\en The additional guide curve (may be nullptr). \~
\param[in] form - \ru Форма сечения поверхности (0, 1, 2, 3).
+63 -143
View File
@@ -117,8 +117,8 @@ MbShellsIntersectionData::MbShellsIntersectionData( const EdgesVector & initEdge
: edges ( )
, faceIndices1 ( )
, faceIndices2 ( )
, solid ( nullptr )
, pointFrame ( nullptr )
, solid ( nullptr )
, pointFrame ( nullptr )
, isTangentCurve( false )
, isSolid ( isSolidEgdes )
{
@@ -143,13 +143,13 @@ template <class EdgesVector, class FaceIndicesVector>
MbShellsIntersectionData::MbShellsIntersectionData( const EdgesVector & initEdges,
const FaceIndicesVector & faceInds1,
const FaceIndicesVector & faceInds2 )
: edges ( )
, faceIndices1 ( )
, faceIndices2 ( )
, solid ( nullptr )
, pointFrame ( nullptr )
, isTangentCurve( false )
, isSolid ( false )
: edges ( )
, faceIndices1 ( )
, faceIndices2 ( )
, solid ( nullptr )
, pointFrame ( nullptr )
, isTangentCurve( false )
, isSolid ( false )
{
size_t edgesCnt = initEdges.size();
@@ -174,13 +174,13 @@ MbShellsIntersectionData::MbShellsIntersectionData( const EdgesVector & in
template <class EdgesVector>
MbShellsIntersectionData::MbShellsIntersectionData( const EdgesVector & initEdges,
const c3d::IndicesPairsVector & faceIndicesPairs )
: edges ( )
, faceIndices1 ( )
, faceIndices2 ( )
, solid ( nullptr )
, pointFrame ( nullptr )
, isTangentCurve( false )
, isSolid ( false )
: edges ( )
, faceIndices1 ( )
, faceIndices2 ( )
, solid ( nullptr )
, pointFrame ( nullptr )
, isTangentCurve( false )
, isSolid ( false )
{
size_t edgesCnt = initEdges.size();
@@ -267,8 +267,7 @@ void MbShellsIntersectionData::GetFaceNumbersPairs( OutputIndicesPairsVector & o
\return \ru Возвращает состояние вырожденности кривой.
\en Returns the state of the curve degeneration. \~
\ingroup Algorithms_3D
*/
//---
*/ //---
MATH_FUNC (bool) IsDegeneratedCurve( const MbCurve3D & curve, double eps );
@@ -284,8 +283,7 @@ MATH_FUNC (bool) IsDegeneratedCurve( const MbCurve3D & curve, double eps );
\return \ru Возвращает состояние замкнутости оболочки.
\en Returns the state of shell closedness. \~
\ingroup Algorithms_3D
*/
//---
*/ //---
MATH_FUNC (bool) CheckShellClosure( const MbFaceShell & shell, bool checkChangedOnly = false );
@@ -295,8 +293,7 @@ MATH_FUNC (bool) CheckShellClosure( const MbFaceShell & shell, bool checkChanged
\details \ru Проверка оболочки тела на замкнутость. \n
\en Check of solid's shell for closedness. \n \~
\ingroup Algorithms_3D
*/
//---
*/ //---
MATH_FUNC (bool) CheckSolidClosure( const MbSolid & solid );
@@ -330,8 +327,7 @@ MATH_FUNC (bool) CheckSolidClosure( const MbSolid & solid );
\return \ru Возвращает true, если найдено хотя бы одно краевое ребро.
\en Returns true if at least one boundary edges is found. \~
\ingroup Algorithms_3D
*/
// ---
*/ // ---
template <class EdgesVector>
bool CheckBoundaryEdges( const EdgesVector & allEdges, EdgesVector * boundaryEdges )
{
@@ -357,31 +353,10 @@ bool CheckBoundaryEdges( const EdgesVector & allEdges, EdgesVector * boundaryEdg
//------------------------------------------------------------------------------
/** \brief \ru Поиск некорректных ребер.
\en Search of incorrect edges. \~
\details \ru Поиск некорректных ребер. Не ищет краевые ребра замкнутой оболочки. \n
Для поиска краевых ребер используйте функцию CheckBoundaryEdges. \n
Функция проверяет следующие варианты некорректности ребер :
1. Ребро с типом граница (cbt_Boundary) должно указывать только на одну грань \n
2. Поверхности в кривой пересечения ребра должны быть такие же как и поверхности в смежных гранях ребра \n
3. Граничные точки поверхностных кривых в кривой пересечения ребра должны совпадать с точностью не хуже 1e-6 или толерантности в вершинах ребра \n
4. Опорные точки сплайнов поверхностных кривых в уточняемой кривой пересечения (cbt_Specific) должны совпадать в пространстве c точностью не хуже 1e-6 \n
Наличие некорректных ребер является серьезным дефектом оболочки. \n
\en Search of incorrect edges. Does not look for the boundary edges of a closed shell. \n
Use function CheckBoundaryEdges for searching for boundary edges. \n
The function checks the next parameters of an edge as signs of its incorrectness :
1. An edge with the border type cbt_Boundary must point to only one face. \n
2. The surfaces of the intersection curve of the edge have to be the same as the surfaces in the adjacent faces of the edge. \n
3. The boundary points of the surface curves in the curve of intersection of the edge must coincide with an accuracy not worse than 1e-6 or tolerance at the vertices of the edge. \n
4. The reference points of the splines of the surface curves in the intersection curve with the border type cbt_Specific must coincide in space with an accuracy not worse than 1e-6. \n
The presence of incorrect edges is a serious defect of the shell. \n \~
\param[in] allEdges - \ru Множество ребер оболочки.
\en Set of edges of a shell. \~
\param[in] badEdges - \ru Множество найденных некорректных ребер.
\en Set of found incorrect edges. \~
\return \ru Возвращает true, если найдено хотя бы одно некорректное ребро.
\en Returns true if at least one incorrect edge is found. \~
\deprecated \ru Метод устарел.
\en The method is deprecated. \~
\ingroup Algorithms_3D
*/
// ---
*/ // ---
DEPRECATE_DECLARE_REPLACE( CheckBadEdges )
MATH_FUNC (bool) CheckBadEdges( const RPArray<MbCurveEdge> & allEdges,
RPArray<MbCurveEdge> * badEdges );
@@ -413,8 +388,7 @@ MATH_FUNC (bool) CheckBadEdges( const RPArray<MbCurveEdge> & allEdges,
\return \ru Возвращает true, если найдено хотя бы одно некорректное ребро.
\en Returns true if at least one incorrect edge is found. \~
\ingroup Algorithms_3D
*/
// ---
*/ // ---
MATH_FUNC (bool) CheckBadEdges( const c3d::ConstEdgesVector & allEdges,
c3d::ConstEdgesVector * badEdges );
@@ -439,8 +413,7 @@ MATH_FUNC (bool) CheckBadEdges( const c3d::ConstEdgesVector & allEdges,
\return \ru Возвращает true, если найдена хотя бы одна неточная вершина.
\en Returns true if at least one inexact vertex is found. \~
\ingroup Algorithms_3D
*/
// ---
*/ // ---
template <class VerticesVector>
bool CheckInexactVertices( const VerticesVector & vertArr, double mAcc, VerticesVector * inexactVerts )
{
@@ -483,8 +456,7 @@ bool CheckInexactVertices( const VerticesVector & vertArr, double mAcc, Vertices
\return \ru Возвращает true, если ребро неточное.
\en Returns true, if the edge is inaccurate. \~
\ingroup Algorithms_3D
*/
// ---
*/ // ---
MATH_FUNC (bool) IsInexactEdge( const MbCurveEdge & edge, double mMaxAcc );
@@ -508,8 +480,7 @@ MATH_FUNC (bool) IsInexactEdge( const MbCurveEdge & edge, double mMaxAcc );
\return \ru Возвращает true, если найдено хотя бы одно неточное ребро.
\en Returns true if at least one inexact edge is found. \~
\ingroup Algorithms_3D
*/
// ---
*/ // ---
template <class EdgesVector>
bool CheckInexactEdges( const EdgesVector & allEdges, double mAcc, EdgesVector * inexactEdges )
{
@@ -547,6 +518,7 @@ bool CheckInexactEdges( const EdgesVector & allEdges, double mAcc, EdgesVector *
return isInexactEdge;
}
//------------------------------------------------------------------------------
/** \brief \ru Проверка подложек и указаний на грани.
\en Check of substrates and pointers to faces. \~
@@ -563,8 +535,7 @@ bool CheckInexactEdges( const EdgesVector & allEdges, double mAcc, EdgesVector *
\param[out] areBadFacePointers - \ru Наличие неверных указателей на соседние грани.
\en Whether there are invalid pointers to neighboring faces. \~
\ingroup Algorithms_3D
*/
// ---
*/ // ---
MATH_FUNC (void) CheckBadFaces( const MbFaceShell & shell,
bool & areIdenticalBaseSurfaces,
bool & areBadFacePointers );
@@ -584,8 +555,7 @@ MATH_FUNC (void) CheckBadFaces( const MbFaceShell & shell,
\return \ru Возвращает true, если расположение и ориентация циклов корректны.
\en Returns true if interposition of loops and their orientations are correct. \~
\ingroup Algorithms_3D
*/
//---
*/ //---
MATH_FUNC (bool) CheckLoopsInterposition( const MbFace & face );
@@ -611,8 +581,7 @@ MATH_FUNC (bool) CheckLoopsInterposition( const MbFace & face );
\return \ru Возвращает true, если связность ребер не нарушена.
\en Returns true if the connectivity is good. \~
\ingroup Algorithms_3D
*/
//---
*/ //---
MATH_FUNC (bool) CheckLoopConnection( const MbFace & face,
const MbLoop & loop,
double & lengthTolerance,
@@ -623,29 +592,10 @@ MATH_FUNC (bool) CheckLoopConnection( const MbFace & face,
//------------------------------------------------------------------------------
/** \brief \ru Проверка связности ребер цикла.
\en Check for connectivity of a loop edges. \~
\details \ru Проверка связности ребер цикла грани.
Возвращает максимальные метрическую и параметрическую (опционально) погрешности построения цикла. \n
Наличие неточных стыковок в циклах грани не обязательно является серьезным дефектом оболочки. \n
\en Check for connectivity of a loop edges.
Returns the maximal metric and parametric (optionally) tolerances of the loop construction. \n
The presence of inaccurate connection in face loops (chains of oriented edges) is not necessarily a serious shell defect. \n \~
\param[in] face - \ru Грань, содержащая проверяемый цикл.
\en Face containing the loop under test. \~
\param[in] loop - \ru Цикл грани.
\en Face loop. \~
\param[out] lengthTolerance - \ru Максимальное метрическое значение разрыва между ребрами.
\en The maximal metric value of a gap between edges. \~
\param[out] paramTolerance - \ru Максимальное параметрическое значение разрыва между ребрами.
\en The maximal parametric value of a gap between edges. \~
\param[out] badConnectedEdges - \ru Ребра с плохой связностью.
\en Edges with bad connectivity. \~
\param[out] badVertexEdges - \ru Ребра с неправильными вершинами.
\en Edges with incorrect vertices. \~
\return \ru Возвращает true, если связность ребер не нарушена.
\en Returns true if the connectivity is good. \~
\deprecated \ru Метод устарел.
\en The method is deprecated. \~
\ingroup Algorithms_3D
*/
//---
*/ //---
DEPRECATE_DECLARE_REPLACE( CheckLoopConnection )
MATH_FUNC (bool) CheckLoopConnection( const MbFace & face,
const MbLoop & loop,
@@ -679,8 +629,7 @@ MATH_FUNC (bool) CheckLoopConnection( const MbFace & face
\return \ru Возвращает true, если связность ребер не нарушена.
\en Returns true if the connectivity is good. \~
\ingroup Algorithms_3D
*/
//---
*/ //---
MATH_FUNC (bool) CheckLoopConnection( const MbFace & face,
const MbLoop & loop,
double & lengthTolerance,
@@ -692,27 +641,10 @@ MATH_FUNC (bool) CheckLoopConnection( const MbFace & face,
//------------------------------------------------------------------------------
/** \brief \ru Проверка связности ребер цикла.
\en Check for connectivity of a loop edges. \~
\details \ru Проверка связности ребер цикла грани.
Возвращает максимальные метрическую и параметрическую (опционально) погрешности построения цикла. \n
Наличие неточных стыковок в циклах грани не обязательно является серьезным дефектом оболочки. \n
\en Check for connectivity of a loop edges.
Returns the maximal metric and parametric (optionally) tolerances of the loop construction. \n
The presence of inaccurate connection in face loops (chains of oriented edges) is not necessarily a serious shell defect. \n \~
\param[in] face - \ru Грань, содержащая проверяемый цикл.
\en Face containing the loop under test. \~
\param[in] loop - \ru Цикл грани.
\en Face loop. \~
\param[out] lengthTolerance - \ru Максимальное метрическое значение разрыва между ребрами.
\en The maximal metric value of a gap between edges. \~
\param[out] paramTolerance - \ru Максимальное параметрическое значение разрыва между ребрами.
\en The maximal parametric value of a gap between edges. \~
\param[out] badConnectedEdges - \ru Ребра с плохой связностью.
\en Edges with bad connectivity. \~
\return \ru Возвращает true, если связность ребер не нарушена.
\en Returns true if the connectivity is good. \~
\deprecated \ru Метод устарел.
\en The method is deprecated. \~
\ingroup Algorithms_3D
*/
//---
*/ //---
DEPRECATE_DECLARE_REPLACE( CheckLoopConnection )
MATH_FUNC (bool) CheckLoopConnection( const MbFace & face,
const MbLoop & loop,
@@ -743,8 +675,7 @@ MATH_FUNC (bool) CheckLoopConnection( const MbFace & face
\return \ru Возвращает true, если связность ребер не нарушена.
\en Returns true if the connectivity is good. \~
\ingroup Algorithms_3D
*/
//---
*/ //---
MATH_FUNC (bool) CheckLoopConnection( const MbFace & face,
const MbLoop & loop,
double & lengthTolerance,
@@ -772,8 +703,7 @@ MATH_FUNC (bool) CheckLoopConnection( const MbFace & face,
\return \ru Возвращает true, если связность ребер не нарушена.
\en Returns true if the connectivity is good. \~
\ingroup Algorithms_3D
*/
//---
*/ //---
MATH_FUNC (bool) CheckLoopConnection( const MbFace & face,
const MbLoop & loop,
double & lengthTolerance,
@@ -816,8 +746,7 @@ MATH_FUNC (bool) FindLoopsSelfIntersections( const MbFace & face, const MbSNameM
\return \ru Возвращает true, все грани топологически связаны.
\en Returns true if all the faces are topologically connected. \~
\ingroup Algorithms_3D
*/
//---
*/ //---
MATH_FUNC (bool) CheckFacesConnection( const RPArray<MbFace> & faces );
@@ -831,8 +760,7 @@ MATH_FUNC (bool) CheckFacesConnection( const RPArray<MbFace> & faces );
\return \ru Возвращает true, все грани топологически связаны.
\en Returns true if all the faces are topologically connected. \~
\ingroup Algorithms_3D
*/
//---
*/ //---
MATH_FUNC (bool) CheckFacesConnection( const c3d::FacesVector & faces );
@@ -846,8 +774,7 @@ MATH_FUNC (bool) CheckFacesConnection( const c3d::FacesVector & faces );
\return \ru Возвращает true, все грани топологически связаны.
\en Returns true if all the faces are topologically connected. \~
\ingroup Algorithms_3D
*/
//---
*/ //---
MATH_FUNC (bool) CheckFacesConnection( const c3d::ConstFacesVector & faces );
@@ -869,8 +796,7 @@ MATH_FUNC (bool) CheckFacesConnection( const c3d::ConstFacesVector & faces );
\return \ru Возвращает true, все найдено хоть одно соответствие.
\en Returns true if at least one correspondence is found. \~
\ingroup Algorithms_3D
*/
//---
*/ //---
MATH_FUNC (bool) FindOverlappingSimilarFaces( const MbFaceShell & srcShell,
const MbFaceShell & dstShell,
bool sameNormals,
@@ -897,8 +823,7 @@ MATH_FUNC (bool) FindOverlappingSimilarFaces( const MbFaceShell & sr
\return \ru Возвращает true, все найдено хоть одно соответствие.
\en Returns true if at least one correspondence is found. \~
\ingroup Algorithms_3D
*/
//---
*/ //---
MATH_FUNC (bool) FindFacesEdgesCarriers( const c3d::ConstEdgesVector & edges,
const MbFaceShell & shell,
bool sameNormals,
@@ -916,8 +841,7 @@ MATH_FUNC (bool) FindFacesEdgesCarriers( const c3d::ConstEdgesVector & edges,
\return \ru Возвращает true, если была выполнена модификация ребра.
\en Returns true if edge modification was performed. \~
\ingroup Algorithms_3D
*/
//---
*/ //---
MATH_FUNC( bool ) RepairEdge( MbCurveEdge & edge, bool updateFacesBounds );
@@ -933,26 +857,17 @@ MATH_FUNC( bool ) RepairEdge( MbCurveEdge & edge, bool updateFacesBounds );
\return \ru Возвращает true, если была выполнена модификация ребра.
\en Returns true if edge modification was performed. \~
\ingroup Algorithms_3D
*/
//---
*/ //---
MATH_FUNC( bool ) RepairEdges( MbFaceShell & shell, bool updateFacesBounds = true );
//------------------------------------------------------------------------------
/** \brief \ru Устранить наличие общих подложек поверхностей.
\en Remove common surface substrates. \~
\details \ru Найти и устранить общие поверхности-подложки в гранях оболочки. \n
Функция устарела и будет удалена. Замените вызовы на RemoveCommonSurfaceSubstrates. \n
\en Find and eliminate common underlying surfaces of a shell faces. \n
The function is deprecated and will be removed. Replace calls with RemoveCommonSurfaceSubstrates. \~
\deprecated \ru Метод устарел. \en The method is deprecated. \~
\param[in] shell - \ru Модифицируемая оболочка.
\en A shell to be modified. \~
\return \ru Возвращает true, если была выполнена модификация оболочки.
\en Returns true if the shell modification was performed. \~
\deprecated \ru Метод устарел.
\en The method is deprecated. \~
\ingroup Algorithms_3D
*/
// ---
*/ // ---
DEPRECATE_DECLARE_REPLACE( RemoveCommonSurfaceSubstrates )
MATH_FUNC( bool ) CheckIdenticalBaseSufaces( MbFaceShell & shell );
@@ -969,8 +884,7 @@ MATH_FUNC( bool ) CheckIdenticalBaseSufaces( MbFaceShell & shell );
\return \ru Возвращает true, если была выполнена модификация оболочки.
\en Returns true if the shell modification was performed. \~
\ingroup Algorithms_3D
*/
//---
*/ //---
MATH_FUNC( bool ) RemoveCommonSurfaceSubstrates( MbFaceShell & shell, bool checkEdges = true );
@@ -986,8 +900,7 @@ MATH_FUNC( bool ) RemoveCommonSurfaceSubstrates( MbFaceShell & shell, bool check
\return \ru Возвращает true, если была выполнена модификация оболочки.
\en Returns true if the shell modification was performed. \~
\ingroup Algorithms_3D
*/
//---
*/ //---
MATH_FUNC( bool ) ResetSurfacesBoundingBoxes( MbFaceShell & shell, bool updateBasisParameticLimits = false );
@@ -1003,14 +916,21 @@ MATH_FUNC( bool ) ResetSurfacesBoundingBoxes( MbFaceShell & shell, bool updateBa
\return \ru Возвращает true, если была выполнена модификация поверхности.
\en Returns true if the surface modification was performed. \~
\ingroup Algorithms_3D
*/
//---
*/ //---
MATH_FUNC( bool ) ResetSurfaceBoundingBoxes( MbSurface & surface, bool updateBasisParameticLimits = false );
//------------------------------------------------------------------------------
// проверка ориентированности оболочки наружу по угловым точкам расширенного габарита
//---
/** \brief \ru Проверка ориентированности оболочки наружу.
\en Checking shell orientation. \~
\details \ru Проверка ориентированности оболочки наружу по угловым точкам расширенного габарита. \n
\en Checking the shell orientation outward by the corner points of the extended bounding box. \n \~
\param[in] shell - \ru Оболочка.
\en A shell. \~
\return \ru Возвращает состояние ориентации оболочки (ts_positive - наружу, ts_negative - внутрь, ts_neutral - не получилось определить).
\en Returns the orientation state of the shell (ts_positive - outward, ts_negative - inward, ts_neutral - failed to determine). \~
\ingroup Algorithms_3D
*/ //---
MATH_FUNC( ThreeStates ) IsOrientedOutward( const MbFaceShell & shell );
+21
View File
@@ -825,6 +825,27 @@ public:
*/
virtual void SetPreliminaryCallbacks( IAttributeNamesCollector* attrCollector, IConfigurationSelector* configSelector) = 0;
/** \brief \ru Прочитать файл обменного формата в модель.
\en Read a file of an exchange format into model. \~
\details \ru Если свойства конвертера заданы, аргумент fileName игнорируется, а имя файла берётся из свойств конвертера.
В противном случае импорт идёт с умолчательными параметрами, соответствующими реализации ConvConvertorProperty3D. \~
\en The fileName argument is not used if converter properties are defined obviously, file path comes from the FullFilePath
method. Otherwise default parameters corresponding ConvConvertorProperty3D implementation are used for import.
\param[out] mDoc - \ru Модельный документ.
\en The model. \~
\param[in] filePath - \ru Путь файла.
\en File path. \~
\param[in] prop - \ru Реализация интерфейса свойств конвертера.
\en Implementation of converter's properties interface. \~
\param[in] indicator - \ru Индикатор хода процесса.
\en The process progress indicator. \~
\return \ru Код завершения операции.
\en Code of the operation termination. \~
\ingroup Exchange_Interface
*/
virtual MbeConvResType ImportFromFile( ItModelDocument& mDoc, const c3d::path_string& filePath, IConvertorProperty3D* prop = nullptr, IProgressIndicator* indicator = nullptr ) = 0;
}; // IConvertor3D
+76 -20
View File
@@ -14,6 +14,7 @@
class MATH_CLASS MbSolid;
class MATH_CLASS MbBooleanOperationParams;
struct MATH_CLASS MbBooleanFlags;
@@ -27,15 +28,15 @@ struct MATH_CLASS MbBooleanFlags;
// ---
class MATH_CLASS MbBooleanSolid : public MbCreator {
protected :
RPArray<MbCreator> creators; ///< \ru Журнал построения: 0<=i<countOne - оболочки первого тела-операнда; countOne<=i<creators.Count() - оболочки второго тела-операнда. \en History tree: 0<=i<countOne - shells of the first operand-solid; countOne<=i<creators.Count() - shells of the second operand-solid.
size_t sharedCount; ///< \ru Количество общих строителей обоих тел. \en The number of the common creators of both solids..
size_t firstCount; ///< \ru Количество строителей первого тела. \en The number of first-solid creators.
OperationType operation; ///< \ru Тип булевой операции над оболочками. \en Type of Boolean operation on shells.
bool mergeFaces; ///< \ru Сливать подобные грани (true). \en Whether to merge similar faces (true).
bool mergeEdges; ///< \ru Сливать подобные ребра (true). \en Whether to merge similar edges (true).
bool closed; ///< \ru Замкнутость оболочек операндов. \en Closedness of operands' shells.
bool allowNonIntersecting; ///< \ru Выдавать конечную оболочку, если нет пересечений. \en Allow a final result if there is no intersection.
double buildSag; ///< \ru Угловое отклонение при движении по кривым и поверхностям. \en Angular deviation while moving along curves and surfaces.
c3d::CreatorsSPtrVector creators; ///< \ru Журнал построения: 0<=i<countOne - оболочки первого тела-операнда; countOne<=i<creators.Count() - оболочки второго тела-операнда. \en History tree: 0<=i<countOne - shells of the first operand-solid; countOne<=i<creators.Count() - shells of the second operand-solid.
size_t sharedCount; ///< \ru Количество общих строителей обоих тел. \en The number of the common creators of both solids..
size_t firstCount; ///< \ru Количество строителей первого тела. \en The number of first-solid creators.
OperationType operation; ///< \ru Тип булевой операции над оболочками. \en Type of Boolean operation on shells.
bool mergeFaces; ///< \ru Сливать подобные грани (true). \en Whether to merge similar faces (true).
bool mergeEdges; ///< \ru Сливать подобные ребра (true). \en Whether to merge similar edges (true).
bool closed; ///< \ru Замкнутость оболочек операндов. \en Closedness of operands' shells.
bool allowNonIntersecting; ///< \ru Выдавать конечную оболочку, если нет пересечений. \en Allow a final result if there is no intersection.
double buildSag; ///< \ru Угловое отклонение при движении по кривым и поверхностям. \en Angular deviation while moving along curves and surfaces.
public:
MbBooleanSolid( const MbCreator & solid2,
@@ -57,6 +58,16 @@ public:
OperationType operType,
const MbBooleanFlags & booleanFlags,
const MbSNameMaker & n );
MbBooleanSolid( const c3d::CreatorsSPtrVector & solid2,
bool sameCreators2,
const MbBooleanOperationParams & params );
MbBooleanSolid( const c3d::CreatorsSPtrVector & solids12,
size_t firstCount,
bool sameCreators1,
bool sameCreators2,
const MbBooleanOperationParams & params );
private :
MbBooleanSolid( const MbBooleanSolid & init, MbRegDuplicate * ireg );
// \ru Объявление конструктора копирования без реализации, чтобы не было копирования по умолчанию. \en Declaration without implementation of the copy-constructor to prevent copying by default.
@@ -122,6 +133,8 @@ IMPL_PERSISTENT_OPS( MbBooleanSolid )
//------------------------------------------------------------------------------
/** \brief \ru Создать оболочку булевой операции.
\en Create the shell of Boolean operation. \~
\deprecated \ru Функция устарела, взамен использовать #CreateBoolean с набором параметров #MbBooleanOperationParams.
\en The function is deprecated, instead use #CreateBoolean with the parameter list #MbBooleanOperationParams. \~
\details \ru Для указанных оболочек построить оболочку как результат булевой операции над оболочками тел.
Одновременно с построением оболочки функция создаёт её строитель. \n
\en Create a shell as a result of Boolean operation on the given shells of solids.
@@ -155,18 +168,61 @@ IMPL_PERSISTENT_OPS( MbBooleanSolid )
\ingroup Model_Creators
*/
// ---
MATH_FUNC (MbCreator *) CreateBoolean( MbFaceShell * shell1,
MbeCopyMode sameShell1,
MbFaceShell * shell2,
MbeCopyMode sameShell2,
//DEPRECATE_DECLARE_REPLACE( CreateBoolean with MbBooleanOperationParams )
MATH_FUNC (MbCreator *) CreateBoolean( MbFaceShell * shell1,
MbeCopyMode sameShell1,
MbFaceShell * shell2,
MbeCopyMode sameShell2,
const RPArray<MbCreator> & creators,
size_t & sharedCount,
size_t & firstCount,
OperationType oType,
const MbSNameMaker & operNames,
const MbBooleanFlags & flags,
MbResultType & res,
MbFaceShell *& shell );
size_t & sharedCount,
size_t & firstCount,
OperationType oType,
const MbSNameMaker & operNames,
const MbBooleanFlags & flags,
MbResultType & res,
MbFaceShell *& shell );
//------------------------------------------------------------------------------
/** \brief \ru Создать оболочку булевой операции.
\en Create the shell of Boolean operation. \~
\details \ru Для указанных оболочек построить оболочку как результат булевой операции над оболочками тел.
Одновременно с построением оболочки функция создаёт её строитель. \n
\en Create a shell as a result of Boolean operation on the given shells of solids.
The function simultaneously constructs the shell and creates its constructor. \n \~
\param[in] shell1 - \ru Набор граней первого тела.
\en The set of faces of the first solid. \~
\param[in] sameShell1 - \ru Способ копирования граней первого тела.
\en Method of copying the faces of the first solid. \~
\param[in] shell2 - \ru Набор граней второго тела.
\en The second solid face set. \~
\param[in] sameShell2 - \ru Способ копирования граней второго тела.
\en Method of copying the faces of the second solid. \~
\param[in] creators - \ru Набор строителей первого и второго набора граней.
\en The set of creators of the first and the second face sets. \~
\param[in] sharedCount - \ru Количество общих строителей обоих наборов граней.
\en The number of shared creators of the both face sets. \~
\param[in] firstCount - \ru Количество строителей первого набора граней.
\en The number of creators of the first face set. \~
\param[in] params - \ru Параметры операции.
\en A Boolean operation parameters. \~
\param[out] res - \ru Код результата операции.
\en Operation result code. \~
\param[out] shell - \ru Построенный набор граней.
\en Constructed set of faces. \~
\result \ru Возвращает строитель, если операция была выполнена успешно.
\en Returns the constructor if the operation has been successfully performed. \~
\ingroup Model_Creators
*/
// ---
MATH_FUNC (MbCreator *) CreateBoolean( c3d::ShellSPtr & shell1,
MbeCopyMode sameShell1,
c3d::ShellSPtr & shell2,
MbeCopyMode sameShell2,
const c3d::CreatorsSPtrVector & creators,
size_t & sharedCount,
size_t & firstCount,
const MbBooleanOperationParams & params,
MbResultType & res,
c3d::ShellSPtr & shell );
#endif // __CR_BOOLEAN_SOLID_H
+44 -8
View File
@@ -114,28 +114,64 @@ IMPL_PERSISTENT_OPS( MbCuttingSolid )
\en For a given shell create a shell without a part of faces cut from it by :
(1) the given surface, (2) a set of faces obtained by extrusion of a planar contour, (3) the given shell. \n
The function simultaneously constructs the shell and creates its constructor. \n \~
\param[in] solid - \ru Исходная оболочка.
\param[in] initShell - \ru Исходная оболочка.
\en The source shell. \~
\param[in] sameShell - \ru Способ копирования граней исходной оболочки.
\en Method of copying the source shell faces. \~
\param[in] cuttingParams - \ru Параметры операции.
\en Operation parameters. \~
\param[out] res - \ru Код результата операции.
\param[out] resCode - \ru Код результата операции.
\en Operation result code. \~
\param[out] shell1 - \ru Построенный первый набор граней.
\param[out] resShell1 - \ru Построенный первый набор граней.
\en Constructed first set of faces. \~
\param[out] shell2 - \ru Построенный второй набор граней.
\param[out] resShell2 - \ru Построенный второй набор граней.
\en Constructed second set of faces. \~
\result \ru Возвращает строитель, если операция была выполнена успешно.
\en Returns the constructor if the operation has been successfully performed. \~
\ingroup Model_Creators
*/
// ---
MATH_FUNC (MbCuttingSolid *) CreatePart( MbFaceShell * solid,
DEPRECATE_DECLARE_REPLACE( CreatePart )
MATH_FUNC (MbCuttingSolid *) CreatePart( MbFaceShell * initShell,
MbeCopyMode sameShell,
const MbShellCuttingParams & cuttingParams,
MbResultType & res,
MbFaceShell *& shell1,
MbFaceShell *& shell2 );
MbResultType & resCode,
MbFaceShell *& resShell1,
MbFaceShell *& resShell2 );
//------------------------------------------------------------------------------
/** \brief \ru Отрезать от оболочки некоторую её часть.
\en Cut a part of the shell. \~
\details \ru Для указанной оболочки построить оболочку без части граней, отрезанных от неё :
(1) указанной поверхностью, (2) набором граней, полученной выдавливанием плоского контура, (3) оболочкой. \n
Одновременно с построением оболочки функция создаёт её строитель. \n
\en For a given shell create a shell without a part of faces cut from it by :
(1) the given surface, (2) a set of faces obtained by extrusion of a planar contour, (3) the given shell. \n
The function simultaneously constructs the shell and creates its constructor. \n \~
\param[in] initShell - \ru Исходная оболочка.
\en The source shell. \~
\param[in] sameShell - \ru Способ копирования граней исходной оболочки.
\en Method of copying the source shell faces. \~
\param[in] cuttingParams - \ru Параметры операции.
\en Operation parameters. \~
\param[out] resCode - \ru Код результата операции.
\en Operation result code. \~
\param[out] resShell1 - \ru Построенный первый набор граней.
\en Constructed first set of faces. \~
\param[out] resShell2 - \ru Построенный второй набор граней.
\en Constructed second set of faces. \~
\result \ru Возвращает строитель, если операция была выполнена успешно.
\en Returns the constructor if the operation has been successfully performed. \~
\ingroup Model_Creators
*/
// ---
MATH_FUNC (MbCuttingSolid *) CreatePart( c3d::ShellSPtr & initShell,
MbeCopyMode sameShell,
const MbShellCuttingParams & cuttingParams,
MbResultType & resCode,
c3d::ShellSPtr & resShell1,
c3d::ShellSPtr & resShell2 );
#endif // __CR_CUTTING_SOLID_H
+30
View File
@@ -14,6 +14,7 @@
#include <mb_enum.h>
class MATH_CLASS MbElementarySurface;
class MATH_CLASS MbElementarySolidParams;
//------------------------------------------------------------------------------
@@ -197,6 +198,8 @@ MbElementarySolid::MbElementarySolid( const PointsVector & pnts, ElementaryShell
solidType = et_Pyramid - a pyramid (points count is equal to the base vertices count + 1), \n
solidType = et_Plate - a plate (4 points). \n
The function simultaneously constructs the shell and creates its constructor. \n \~
\deprecated \ru Функция устарела, взамен использовать #CreateElementary с набором параметров #MbElementarySolidParams.
\en The function is deprecated, instead use #CreateElementary with the parameter list #MbElementarySolidParams. \~
\param[in] points - \ru Набор опорных точек.
\en Set of support points. \~
\param[in] t - \ru Тип элементарного тела.
@@ -212,6 +215,7 @@ MbElementarySolid::MbElementarySolid( const PointsVector & pnts, ElementaryShell
\ingroup Solid_Modeling
*/
// ---
//DEPRECATE_DECLARE_REPLACE( CreateElementary with MbElementarySolidParams )
MATH_FUNC (MbCreator *) CreateElementary( const SArray<MbCartPoint3D> & points,
const ElementaryShellType t,
const MbSNameMaker & n,
@@ -226,6 +230,8 @@ MATH_FUNC (MbCreator *) CreateElementary( const SArray<MbCartPoint3D> & points,
Одновременно с построением оболочки функция создаёт её строитель. \n
\en Create an elementary solid shell by an elementary surface.\n
The function simultaneously constructs the shell and creates its constructor. \n \~
\deprecated \ru Функция устарела, взамен использовать #CreateElementary с набором параметров #MbElementarySolidParams.
\en The function is deprecated, instead use #CreateElementary with the parameter list #MbElementarySolidParams. \~
\param[in] surface - \ru Элементарная поверхность.\n
Допускается тип поверхности - шар, тор, цилиндр, конус.
\en Elementary surface.\n
@@ -241,10 +247,34 @@ MATH_FUNC (MbCreator *) CreateElementary( const SArray<MbCartPoint3D> & points,
\ingroup Solid_Modeling
*/
// ---
//DEPRECATE_DECLARE_REPLACE( CreateElementary with MbElementarySolidParams )
MATH_FUNC (MbCreator *) CreateElementary( const MbElementarySurface & surface,
const MbSNameMaker & n,
MbResultType & res,
c3d::ShellSPtr & shell );
//------------------------------------------------------------------------------
/** \brief \ru Создать оболочку элементарного тела.
\en Create a shell of an elementary solid. \~
\details \ru Создать оболочку элементарного тела.\n
Одновременно с построением оболочки функция создаёт её строитель. \n
\en Create an elementary solid shell.\n
The function simultaneously constructs the shell and creates its constructor. \n \~
\param[in] params - \ru Параметры операции.
\en Parameters of operation. ~
\param[out] res - \ru Код результата операции.
\en Operation result code. \~
\param[out] shell - \ru Оболочка - результат операции.
\en Shell - the result of operation. \~
\result \ru Возвращает строитель оболочки.
\en Returns the shell constructor. \~
\ingroup Solid_Modeling
*/
// ---
MATH_FUNC (MbCreator *) CreateElementary( const MbElementarySolidParams & params,
MbResultType & res,
c3d::ShellSPtr & shell );
#endif // __CR_ELEMENTARY_SOLID_H
+13 -12
View File
@@ -11,6 +11,8 @@
#include <creator.h>
#include <curve3d.h>
#include <wire_frame.h>
#include <op_curve_parameter.h>
//------------------------------------------------------------------------------
@@ -26,8 +28,8 @@
class MATH_CLASS MbExtendCurveCreator : public MbCreator
{
private:
SPtr<MbCurve3D> sourceCurve; // \ru Исходная (расширяемая) кривая. Всегда не ноль. \en Source (extended) curve. It is not nullptr. \~
MbCurveExtensionParameters parameters; // \ru Параметры продления. \en Extension parameters. \~
c3d::SpaceCurveSPtr _sourceCurve; // \ru Исходная (расширяемая) кривая. Всегда не ноль. \en Source (extended) curve. It is not nullptr. \~
MbCurveExtensionValues _parameters; // \ru Параметры продления. \en Extension parameters. \~
protected:
/// \ru Конструктор копирования. \en Copy-constructor.
@@ -38,7 +40,7 @@ private:
public:
/// \ru Конструктор по параметрам. \en Constructor by parameters.
MbExtendCurveCreator( const MbCurve3D & curve, const MbCurveExtensionParameters & extendParams, const MbSNameMaker & nm );
MbExtendCurveCreator( const MbCurve3D & curve, const MbCurveExtensionValues & extendParams, const MbSNameMaker & nm );
/// \ru Деструктор. \en Destructor.
~MbExtendCurveCreator() override;
@@ -61,7 +63,9 @@ public:
/** \} */
//DEPRECATE_DECLARE_REPLACE( CreateWireFrame with 'c3d::WireFrameSPtr' argument )
bool CreateWireFrame( MbWireFrame *&, MbeCopyMode, RPArray<MbSpaceItem> * ) override; // \ru Построить кривую по журналу построения. \en Create a curve from the history tree. \~
bool CreateWireFrame( c3d::WireFrameSPtr & result ); // \ru Построить кривую по журналу построения. \en Create a curve from the history tree. \~
private:
// \ru Объявление оператора присваивания без реализации, чтобы не было присваивания по умолчанию. \en The declaration of the assignment operator without implementation, to prevent an assignment by default.
@@ -79,10 +83,8 @@ IMPL_PERSISTENT_OPS( MbExtendCurveCreator )
\en Create a constructor of extending curve.\n \~
\param[in] sourceCurve - \ru Исходная (удлиняемая) кривая.
\en Source (extended) curve. \~
\param[in] parameters - \ru Параметры удлинения.
\en Parameters of extension. \~
\param[in] names - \ru Именователь построенного ребра.
\en An object defining the edges names. \~
\param[in] parameters - \ru Параметры операции.
\en Parameters of the operation. \~
\param[out] res - \ru Код результата операции.
\en Operation result code. \~
\param[out] resCurve - \ru Возвращаемая (удлиненная) кривая. Может быть nullptr.
@@ -94,10 +96,9 @@ IMPL_PERSISTENT_OPS( MbExtendCurveCreator )
\en Under development. \~
*/
// ---
MATH_FUNC (MbCreator *) CreateExtendedCurve( const MbCurve3D & sourceCurve,
const MbCurveExtensionParameters & parameters,
const MbSNameMaker & names,
MbResultType & res,
MbCurve3D *& resCurve );
MATH_FUNC( c3d::CreatorSPtr ) CreateExtendedCurve( const MbCurve3D & sourceCurve,
const MbCurveExtensionParameters & parameters,
MbResultType & res,
c3d::SpaceCurveSPtr & resCurve );
#endif // __CR_EXTENDING_CURVE_H
+45 -8
View File
@@ -81,15 +81,15 @@ IMPL_PERSISTENT_OPS( MbExtensionShell )
/** \brief \ru Построить удлинённую грань оболочки.
\en Construct the extended face of a shell. \~
\details \ru Построить удлинённую грань оболочки. Удлинение может быть выполнено следующими способами.
Может быть удлинена на заданное расстояние указанная грань.
К указанной грани может быть добавлена гладко стыкующаяся с ней грань.
К указанной грани может быть добавлена грань, полученная выдавливанием крайнего ребра в заданном направлении.
Одновременно с построением оболочки функция создаёт её строитель.\n
Может быть удлинена на заданное расстояние указанная грань.
К указанной грани может быть добавлена гладко стыкующаяся с ней грань.
К указанной грани может быть добавлена грань, полученная выдавливанием крайнего ребра в заданном направлении.
Одновременно с построением оболочки функция создаёт её строитель.\n
\en Construct the extended face of a shell. An extension can be performed in the following ways:
The specified faces can be extended on the given distance.
A smoothly connected face can be added to the given face.
A face obtained by extrusion of a boundary edge in the given direction can be added to the specified face.
The function simultaneously creates the shell and its constructor.\n \~
The specified faces can be extended on the given distance.
A smoothly connected face can be added to the given face.
A face obtained by extrusion of a boundary edge in the given direction can be added to the specified face.
The function simultaneously creates the shell and its constructor.\n \~
\param[in] solid - \ru Исходная оболочка.
\en The initial shell. \~
\param[in] sameShell - \ru Режим копирования исходной оболочки.
@@ -106,9 +106,12 @@ IMPL_PERSISTENT_OPS( MbExtensionShell )
\en The resultant shell. \~
\result \ru Возвращает строитель оболочки.
\en Returns the shell constructor. \~
\deprecated \ru Функция устарела, взамен использовать #CreateExtensionShell с набором параметров #MbExtensionShellParams.
\en The function is deprecated, instead use #ExtensionShellShell with the parameter list #MbExtensionShellParams. \~
\ingroup Model_Creators
*/
// ---
//DEPRECATE_DECLARE_REPLACE( ExtensionShellShell with MbExtensionShellParams )
MATH_FUNC (MbCreator *) CreateExtensionShell( MbFaceShell * solid,
MbeCopyMode sameShell,
const RPArray<MbCurveEdge> & edges,
@@ -118,4 +121,38 @@ MATH_FUNC (MbCreator *) CreateExtensionShell( MbFaceShell * solid
MbFaceShell *& shell );
//------------------------------------------------------------------------------
/** \brief \ru Построить удлинённую грань оболочки.
\en Construct the extended face of a shell. \~
\details \ru Построить удлинённую грань оболочки. Удлинение может быть выполнено следующими способами.
Может быть удлинена на заданное расстояние указанная грань.
К указанной грани может быть добавлена гладко стыкующаяся с ней грань.
К указанной грани может быть добавлена грань, полученная выдавливанием крайнего ребра в заданном направлении.
Одновременно с построением оболочки функция создаёт её строитель.\n
\en Construct the extended face of a shell. An extension can be performed in the following ways:
The specified faces can be extended on the given distance.
A smoothly connected face can be added to the given face.
A face obtained by extrusion of a boundary edge in the given direction can be added to the specified face.
The function simultaneously creates the shell and its constructor.\n \~
\param[in] solid - \ru Исходная оболочка.
\en The initial shell. \~
\param[in] sameShell - \ru Режим копирования исходной оболочки.
\en Mode of copying the initial shell. \~
\param[in] parameters - \ru Параметры построения.
\en Parameters of a shell creation. \~
\param[out] res - \ru Код результата операции.
\en Operation result code. \~
\param[out] shell - \ru Построенная оболочка.
\en The resultant shell. \~
\result \ru Возвращает строитель оболочки.
\en Returns the shell constructor. \~
\ingroup Model_Creators
*/
// ---
MATH_FUNC (MbCreator *) CreateExtensionShell( c3d::ShellSPtr & solid,
MbeCopyMode sameShell,
const MbExtensionShellParams & parameters,
MbResultType & res,
c3d::ShellSPtr & shell );
#endif // __CR_EXTENSION_SHELL_H
+2 -2
View File
@@ -121,7 +121,7 @@ IMPL_PERSISTENT_OPS( MbFilletSolid )
\ingroup Model_Creators
*/
// ---
//DEPRECATE_DECLARE_REPLACE( CreateFillet with 'MbShellFilletValues' parameter )
DEPRECATE_DECLARE_REPLACE( CreateFillet with 'MbShellFilletValues' parameter )
MATH_FUNC (MbCreator *) CreateFillet( MbFaceShell * solid,
MbeCopyMode sameShell,
RPArray<MbCurveEdge> & initCurves,
@@ -162,7 +162,7 @@ MATH_FUNC (MbCreator *) CreateFillet( MbFaceShell * solid,
\ingroup Curve3D_Modeling
*/
// ---
//DEPRECATE_DECLARE_REPLACE( CreateFillet with 'MbShellFilletValues' parameter)
DEPRECATE_DECLARE_REPLACE( CreateFillet with 'MbShellFilletValues' parameter)
MATH_FUNC (MbCreator *) CreateFillet( MbFaceShell * solid,
MbeCopyMode sameShell,
SArray<MbEdgeFunction> & initCurves,
+30
View File
@@ -111,6 +111,8 @@ IMPL_PERSISTENT_OPS( MbHoleSolid )
Одновременно с построением оболочки функция создаёт её строитель. \n
\en For a given shell construct a shell with a hole, a pocket or a groove. \n
The function simultaneously constructs the shell and creates its constructor. \n \~
\deprecated \ru Функция устарела, взамен использовать #CreateHole с набором параметров #MbHoleSolidParams.
\en The function is deprecated, instead use #CreateHole with the parameter list #MbHoleSolidParams. \~
\param[in] solid - \ru Набор граней, к которым дополняется построение.
\en Face set the construction is complemented with respect to. \~
\param[in] sameShell - \ru Способ копирования граней.
@@ -130,6 +132,7 @@ IMPL_PERSISTENT_OPS( MbHoleSolid )
\ingroup Model_Creators
*/
// ---
//DEPRECATE_DECLARE_REPLACE( CreateHole with MbHoleSolidParams )
MATH_FUNC (MbCreator *) CreateHole( MbFaceShell * solid,
MbeCopyMode sameShell,
const MbPlacement3D & place,
@@ -138,6 +141,33 @@ MATH_FUNC (MbCreator *) CreateHole( MbFaceShell * solid,
MbResultType & res,
MbFaceShell *& shell );
//------------------------------------------------------------------------------
/** \brief \ru Создать оболочку с отверстием, карманом, или фигурным пазом.
\en Create a shell with a hole, a pocket or a groove. \~
\details \ru Для указанной оболочки построить оболочку с отверстием, карманом, или фигурным пазом. \n
Одновременно с построением оболочки функция создаёт её строитель. \n
\en For a given shell construct a shell with a hole, a pocket or a groove. \n
The function simultaneously constructs the shell and creates its constructor. \n \~
\param[in] solid - \ru Набор граней, к которым дополняется построение.
\en Face set the construction is complemented with respect to. \~
\param[in] sameShell - \ru Способ копирования граней.
\en The method of copying faces. \~
\param[in] params - \ru Параметры операции.
\en Parameters of operation. ~
\param[out] res - \ru Код результата операции выдавливания.
\en The extrusion operation result code. \~
\param[out] shell - \ru Построенный набор граней.
\en Constructed set of faces. \~
\result \ru Возвращает строитель.
\en Returns the constructor. \~
\ingroup Model_Creators
*/
// ---
MATH_FUNC (MbCreator *) CreateHole( const c3d::ShellSPtr & solid,
MbeCopyMode sameShell,
const MbHoleSolidParams & params,
MbResultType & res,
c3d::ShellSPtr & shell );
//------------------------------------------------------------------------------
/** \brief \ru Определить глубину отверстия "до указанной поверхности" при построении оболочки с отверстием.
+37 -5
View File
@@ -30,7 +30,7 @@ protected:
MbCurve3D * curve2; ///< \ru Вторая образующая кривая. \en The second generating curve.
JoinSurfaceValues parameters; ///< \ru Параметры поверхности соединения. \en Parameters of a join surface.
public :
MbJoinShell( MbCurve3D & c1, MbCurve3D & c2, const JoinSurfaceValues & p, const MbSNameMaker & n );
MbJoinShell( const MbCurve3D & c1, const MbCurve3D & c2, const JoinSurfaceValues & p, const MbSNameMaker & n );
private :
MbJoinShell( const MbJoinShell & init, MbRegDuplicate * ireg );
public :
@@ -147,8 +147,8 @@ MbCurve3D * CreateJoinedShellCurve( const RPArray<MbCurveEdge> & edges,
\ingroup Model_Creators
*/
// ---
MbFaceShell * MakeJoinShell( MbSurfaceCurve & curve1,
MbSurfaceCurve & curve2,
MbFaceShell * MakeJoinShell( const MbSurfaceCurve & curve1,
const MbSurfaceCurve & curve2,
JoinSurfaceValues & parameters,
const MbSNameMaker & names,
bool isPhantom,
@@ -161,7 +161,9 @@ MbFaceShell * MakeJoinShell( MbSurfaceCurve & curve1,
\details \ru Построить оболочку, соединяющую две грани по двум кривым на них.
Одновременно с построением оболочки функция создаёт её строитель.\n
\en Construct a shell joining two faces by two curves on them.
The function simultaneously creates the shell and its constructor.\n \~
The function simultaneously creates the shell and its constructor.\n \~
\deprecated \ru Функция устарела, взамен использовать #CreateJoinShell с набором параметров #MbJoinShellParams.
\en The function is deprecated, instead use #CreateJoinShell with the parameter list #MbJoinShellParams. \~
\param[in] curve1 - \ru Кривая на первой соединяемой поверхности.
\en A curve on the first surface to join. \~
\param[in] curve2 - \ru Кривая на второй соединяемой поверхности.
@@ -179,6 +181,7 @@ MbFaceShell * MakeJoinShell( MbSurfaceCurve & curve1,
\ingroup Model_Creators
*/
// ---
//DEPRECATE_DECLARE_REPLACE( CreateJoinShell with MbJoinShellParams )
MATH_FUNC (MbCreator *) CreateJoinShell( MbSurfaceCurve & curve1,
MbSurfaceCurve & curve2,
JoinSurfaceValues & parameters,
@@ -195,7 +198,9 @@ MATH_FUNC (MbCreator *) CreateJoinShell( MbSurfaceCurve & curve1,
Одновременно с построением оболочки функция создаёт её строитель.\n
\en Construct a shell of join given two sets of edges.
Edges of two sets define a set of join faces each of which is constructed by two curves.
The function simultaneously creates the shell and its constructor.\n \~
The function simultaneously creates the shell and its constructor.\n \~
\deprecated \ru Функция устарела, взамен использовать #CreateJoinShell с набором параметров #MbJoinShellParams.
\en The function is deprecated, instead use #CreateJoinShell with the parameter list #MbJoinShellParams. \~
\param[in] edges1 - \ru Первый набор ребер.
\en The first set of edges. \~
\param[in] orients1 - \ru Ориентация рёбер первого набора.
@@ -223,6 +228,7 @@ MATH_FUNC (MbCreator *) CreateJoinShell( MbSurfaceCurve & curve1,
\ingroup Model_Creators
*/
// ---
//DEPRECATE_DECLARE_REPLACE( CreateJoinShell with MbJoinShellParams )
MATH_FUNC (MbCreator *) CreateJoinShell( const RPArray<MbCurveEdge> & edges1,
const SArray<bool> & orients1,
const RPArray<MbCurveEdge> & edges2,
@@ -236,4 +242,30 @@ MATH_FUNC (MbCreator *) CreateJoinShell( const RPArray<MbCurveEdge> & edges1,
bool isPhantom );
//------------------------------------------------------------------------------
/** \brief \ru Построить оболочку соединения по параметрам.
\en Create a joint shell from parameters. \~
\details \ru Построить оболочку соединения по параметрам..
Одновременно с построением оболочки функция создаёт её строитель.\n
\en Create a joint shell from parameters.
The function simultaneously creates the shell and its constructor.\n \~
\param[in] parameters - \ru Параметры операции.
\en Parameters of operation. ~
\param[out] res - \ru Код результата операции.
\en Operation result code. \~
\param[out] result - \ru Результаты операции.
\en The operation results. \~
\param[out] shell - \ru Результирующая оболочка.
\en The resulting shell. \~
\result \ru Возвращает строитель оболочки.
\en Returns the shell constructor. \~
\ingroup Model_Creators
*/
// ---
MATH_FUNC (MbCreator *) CreateJoinShell( const MbJoinShellParams & parameters,
MbResultType & res,
MbJoinShellResults & result,
c3d::ShellSPtr & shell );
#endif // __CR_JOIN_SHELL_H
+81 -38
View File
@@ -15,6 +15,7 @@
#include <cr_swept_solid.h>
#include <templ_sptr.h>
class MATH_CLASS MbLoftedSolidParams;
//------------------------------------------------------------------------------
/** \brief \ru Строитель оболочки тела по сечениям.
@@ -102,6 +103,36 @@ private :
IMPL_PERSISTENT_OPS( MbCurveLoftedSolid )
//------------------------------------------------------------------------------
/** \brief \ru Создать тело по плоским сечениям.
\en Create a solid from a planar sections. \~
\details \ru Построить оболочку тела, проходящую по заданным сечениям
и выполнить Булеву операцию с оболочкой, если последняя задана. \n
Одновременно с построением оболочки функция создаёт её строитель.\n
\en Create a solid's shell passing through the given sections
and perform the Boolean operation with the shell if it is specified. \n
The function simultaneously creates the shell and its constructor.\n \~
\param[in] srcSolid - \ru Первое тело для булевой операции.
\en The first solid for a boolean operation. \~
\param[in] copyMode - \ru Режим копирования тела.
\en Whether to copy the solid. \~
\param[in] loftSolParams - \ru Исходные данные для выполнения операции.
\en The source data to make the operation. \~
\param[out] res - \ru Код результата операции.
\en Operation result code. \~
\param[out] resShell - \ru Оболочка - результат построения.
\en Shell - the result of construction. \~
\result \ru Возвращает строитель.
\en Returns the constructor. \~
\ingroup Model_Creators
*/
// ---
MATH_FUNC (c3d::CreatorSPtr) CreateCurveLofted( c3d::ShellSPtr & srcSolid,
MbeCopyMode copyMode,
const MbLoftedSolidParams & loftSolParams,
MbResultType & res,
c3d::ShellSPtr & resShell );
//------------------------------------------------------------------------------
/** \brief \ru Создать тело по плоским сечениям.
\en Create a solid from a planar sections. \~
@@ -113,20 +144,23 @@ IMPL_PERSISTENT_OPS( MbCurveLoftedSolid )
The function simultaneously creates the shell and its constructor.\n \~
\result \ru Возвращает строитель.
\en Returns the constructor. \~
\deprecated \ru Функция устарела, взамен использовать #LoftedSolid с набором параметров #LoftedSolidParams.
\en The function is deprecated, instead use #LoftedSolid with the parameter list #LoftedSolidParams. \~
\ingroup Model_Creators
*/
// ---
MATH_FUNC (MbCreator *) CreateCurveLofted( MbFaceShell * solid,
MbeCopyMode sameShell,
SArray<MbPlacement3D> & pl,
RPArray<MbContour> & c,
const LoftedValues & p,
OperationType oType,
const MbSNameMaker & operNames,
RPArray<MbSNameMaker> & ns,
SArray<MbCartPoint3D> * ps,
MbResultType & res,
MbFaceShell *& shell );
//DEPRECATE_DECLARE_REPLACE( CreateCurveLofted with 'MbLoftedSolidParams' argument )
MATH_FUNC (MbCreator *) CreateCurveLofted( MbFaceShell * solid,
MbeCopyMode sameShell,
SArray<MbPlacement3D> & places,
RPArray <MbContour> & planeConours,
const LoftedValues & params,
OperationType oType,
const MbSNameMaker & operName,
RPArray<MbSNameMaker> & contourNames,
SArray<MbCartPoint3D> * guidePoints,
MbResultType & res,
MbFaceShell *& resShell );
//------------------------------------------------------------------------------
@@ -140,21 +174,24 @@ MATH_FUNC (MbCreator *) CreateCurveLofted( MbFaceShell * solid,
The function simultaneously creates the shell and its constructor.\n \~
\result \ru Возвращает строитель.
\en Returns the constructor. \~
\deprecated \ru Функция устарела, взамен использовать #LoftedSolid с набором параметров #LoftedSolidParams.
\en The function is deprecated, instead use #LoftedSolid with the parameter list #LoftedSolidParams. \~
\ingroup Model_Creators
*/
// ---
//DEPRECATE_DECLARE_REPLACE( CreateCurveLofted with 'MbLoftedSolidParams' argument )
MATH_FUNC (MbCreator *) CreateCurveLofted( MbFaceShell * solid,
MbeCopyMode sameShell,
RPArray<MbSurface> & surfs,
RPArray<MbContour> & c,
const LoftedValues & p,
RPArray<MbSurface> & surfaces,
RPArray <MbContour> & planeConours,
const LoftedValues & params,
OperationType oType,
const MbSNameMaker & operNames,
RPArray<MbSNameMaker> & ns,
const MbSNameMaker & operName,
RPArray<MbSNameMaker> & contourNames,
RPArray<MbCurve3D> * guideCurves,
SArray<MbCartPoint3D> * ps,
SArray<MbCartPoint3D> * guidePoints,
MbResultType & res,
MbFaceShell *& shell );
MbFaceShell *& resShell );
//------------------------------------------------------------------------------
@@ -168,21 +205,24 @@ MATH_FUNC (MbCreator *) CreateCurveLofted( MbFaceShell * solid,
The function simultaneously creates the shell and its constructor.\n \~
\result \ru Возвращает строитель.
\en Returns the constructor. \~
\deprecated \ru Функция устарела, взамен использовать #LoftedSolid с набором параметров #LoftedSolidParams.
\en The function is deprecated, instead use #LoftedSolid with the parameter list #LoftedSolidParams. \~
\ingroup Model_Creators
*/
// ---
MATH_FUNC (MbCreator *) CreateCurveLofted( MbFaceShell * solid,
MbeCopyMode _sameShell,
SArray<MbPlacement3D> & pl,
RPArray<MbContour> & c,
const MbCurve3D & centre_line,
const LoftedValues & p,
OperationType oType,
const MbSNameMaker & operNames,
RPArray<MbSNameMaker> & ns,
SArray<MbCartPoint3D> * ps,
MbResultType & res,
MbFaceShell *& shell );
//DEPRECATE_DECLARE_REPLACE( CreateCurveLofted with 'MbLoftedSolidParams' argument )
MATH_FUNC (MbCreator *) CreateCurveLofted( MbFaceShell * solid,
MbeCopyMode sameShell,
SArray<MbPlacement3D> & places,
RPArray<MbContour> & planeConours,
const MbCurve3D & centre_line,
const LoftedValues & params,
OperationType oType,
const MbSNameMaker & operName,
RPArray<MbSNameMaker> & contourNames,
SArray<MbCartPoint3D> * guidePoints,
MbResultType & res,
MbFaceShell *& resShell );
//------------------------------------------------------------------------------
@@ -196,22 +236,25 @@ MATH_FUNC (MbCreator *) CreateCurveLofted( MbFaceShell * solid,
The function simultaneously creates the shell and its constructor.\n \~
\result \ru Возвращает строитель.
\en Returns the constructor. \~
\deprecated \ru Функция устарела, взамен использовать #LoftedSolid с набором параметров #LoftedSolidParams.
\en The function is deprecated, instead use #LoftedSolid with the parameter list #LoftedSolidParams. \~
\ingroup Model_Creators
*/
// ---
//DEPRECATE_DECLARE_REPLACE( CreateCurveLofted with 'MbLoftedSolidParams' argument )
MATH_FUNC (MbCreator *) CreateCurveLofted( MbFaceShell * solid,
MbeCopyMode _sameShell,
RPArray<MbSurface> & surfs,
RPArray<MbContour> & c,
MbeCopyMode sameShell,
RPArray<MbSurface> & surfaces,
RPArray<MbContour> & planeConours,
const MbCurve3D & centre_line,
const LoftedValues & p,
const LoftedValues & params,
OperationType oType,
const MbSNameMaker & operNames,
RPArray<MbSNameMaker> & ns,
const MbSNameMaker & operName,
RPArray<MbSNameMaker> & contourNames,
RPArray<MbCurve3D> * guideCurves,
SArray<MbCartPoint3D> * ps,
SArray<MbCartPoint3D> * guidePoints,
MbResultType & res,
MbFaceShell *& shell );
MbFaceShell *& resShell );
#endif // __CR_LOFTED_SOLID_H
+25 -1
View File
@@ -88,16 +88,40 @@ IMPL_PERSISTENT_OPS( MbMeshShell )
\en Operation result code. \~
\param[out] shell - \ru Построенная оболочка.
\en The resultant shell. \~
\deprecated \ru Функция устарела, взамен использовать #CreateMeshShell с набором параметров #MbMeshShellParameters.
\en The function is deprecated, instead use #CreateMeshShell with the parameter list #MbMeshShellParameters. \~
\result \ru Возвращает строитель оболочки.
\en Returns the shell constructor. \~
\ingroup Model_Creators
*/
// ---
MATH_FUNC (MbCreator *) CreateMeshShell( MeshSurfaceValues & parameters,
//DEPRECATE_DECLARE_REPLACE( CreateMeshShell with MbMeshShellParameters )
MATH_FUNC (MbCreator *) CreateMeshShell( MeshSurfaceValues & parameters,
const MbSNameMaker & operNames,
bool isPhantom,
MbResultType & res,
MbFaceShell *& shell );
//------------------------------------------------------------------------------
/** \brief \ru Построить оболочку на сетке кривых.
\en Construct a shell from a mesh of curves. \~
\details \ru Построить оболочку на сетке кривых, образованной двумя сечействами кривых. \n
Одновременно с построением оболочки функция создаёт её строитель.\n
\en Create a shell from a mesh of curves formed by two sets of curves. \n
The function simultaneously creates the shell and its constructor.\n \~
\param[in] parameters - \ru Параметры операции.
\en Parameters of operation. ~
\param[out] res - \ru Код результата операции.
\en Operation result code. \~
\param[out] shell - \ru Построенная оболочка.
\en Constructed mesh shell. \~
\result \ru Возвращает строитель оболочки.
\en Returns the shell constructor. \~
\ingroup Model_Creators
*/
// ---
MATH_FUNC (MbCreator *) CreateMeshShell( const MbMeshShellParameters & parameters,
MbResultType & res,
c3d::ShellSPtr & shell );
#endif // __CR_MESH_SHELL_H
+20 -20
View File
@@ -43,12 +43,12 @@ private :
MbPatchCreator( const MbPatchCreator &, MbRegDuplicate * ireg );
public :
MbPatchCreator( const std::vector<SPtr<MbCurveMate>> & curves,
const PatchValues & params,
const MbSNameMaker & n,
const SArray<MbePairObjectsSelection> * surfInds,
const SArray<bool> * orientations,
const SArray<double> * tolerances );
MbPatchCreator( const std::vector<SPtr<MbCurveMate>> & curves,
const PatchValues & params,
const MbSNameMaker & n,
const SArray<MbePairObjectsSelection> * surfInds,
const SArray<bool> * orientations,
const SArray<double> * tolerances );
virtual ~MbPatchCreator();
// \ru Общие функции математического объекта \en Common functions of the mathematical object
@@ -152,8 +152,8 @@ MbFaceShell * CreatePatchShell( const RPArray<MbCurve3D> & initCurves,
*/
// ---
MATH_FUNC(MbCreator *) CreatePatchSet( const MbPatchShellParams & params,
MbResultType & res,
MbFaceShell *& shell );
MbResultType & res,
MbFaceShell *& shell );
//------------------------------------------------------------------------------
@@ -180,12 +180,12 @@ MATH_FUNC(MbCreator *) CreatePatchSet( const MbPatchShellParams & params,
\ingroup Model_Creators
*/
// ---
// DEPRECATE_DECLARE_REPLACE( CreatePatchSet with MbPatchShellParams )
MATH_FUNC (MbCreator *) CreatePatchSet( const RPArray<MbPatchCurve> & initEdges,
const PatchValues & parameters,
const MbSNameMaker & operNames,
MbResultType & res,
MbFaceShell *& shell );
DEPRECATE_DECLARE_REPLACE( CreatePatchSet with MbPatchShellParams )
MATH_FUNC (MbCreator *) CreatePatchSet( const RPArray<MbPatchCurve> & initEdges,
const PatchValues & parameters,
const MbSNameMaker & operNames,
MbResultType & res,
MbFaceShell *& shell );
//------------------------------------------------------------------------------
@@ -212,12 +212,12 @@ MATH_FUNC (MbCreator *) CreatePatchSet( const RPArray<MbPatchCurve> & initEdges,
\ingroup Model_Creators
*/
// ---
// DEPRECATE_DECLARE_REPLACE( CreatePatchSet with MbPatchShellParams )
MATH_FUNC (MbCreator *) CreatePatchSet( const RPArray<MbCurve3D> & initCurves,
const PatchValues & parameters,
const MbSNameMaker & operNames,
MbResultType & res,
MbFaceShell *& shell );
DEPRECATE_DECLARE_REPLACE( CreatePatchSet with MbPatchShellParams )
MATH_FUNC (MbCreator *) CreatePatchSet( const RPArray<MbCurve3D> & initCurves,
const PatchValues & parameters,
const MbSNameMaker & operNames,
MbResultType & res,
MbFaceShell *& shell );
#endif // __CR_PATCH_CREATOR_H
+78 -11
View File
@@ -14,7 +14,7 @@
#include <creator.h>
#include <op_swept_parameter.h>
class MbRibSolidParameters;
//------------------------------------------------------------------------------
/** \brief \ru Строитель тела с ребром жёсткости.
\en Constructor of a solid with a rib. \~
@@ -84,6 +84,8 @@ IMPL_PERSISTENT_OPS( MbRibSolid )
Одновременно с построением оболочки функция создаёт её строитель. \n
\en For a specified shell create a shell with a rib which shape is given by the planar contour.\n
The function simultaneously constructs the shell and creates its constructor. \n \~
\deprecated \ru Функция устарела, взамен использовать #CreateRib с набором параметров #MbRibSolidParameters.
\en The function is deprecated, instead use #CreateRib with the parameter list #MbRibSolidParameters. \~
\param[in] solid - \ru Исходная оболочка.
\en The source shell. \~
\param[in] sameShell - \ru Способ копирования граней исходной оболочки.
@@ -107,17 +109,87 @@ IMPL_PERSISTENT_OPS( MbRibSolid )
\ingroup Model_Creators
*/
// ---
//DEPRECATE_DECLARE_REPLACE( CreateRib with MbRibSolidParameters )
MATH_FUNC (MbCreator *) CreateRib( MbFaceShell * solid,
MbeCopyMode sameShell,
const MbPlacement3D & place,
const MbContour & contour,
size_t index,
RibValues & parameters,
const RibValues & parameters,
const MbSNameMaker & operNames,
MbResultType & res,
MbFaceShell *& shell );
//------------------------------------------------------------------------------
/** \brief \ru Создать оболочку с ребром жёсткости.
\en Create a shell with a rib. \~
\details \ru Для указанной оболочки построить оболочку с ребром жёсткости, форма которого задана плоским контуром.\n
Одновременно с построением оболочки функция создаёт её строитель. \n
\en For a specified shell create a shell with a rib which shape is given by the planar contour.\n
The function simultaneously constructs the shell and creates its constructor. \n \~
\param[in] solid - \ru Исходная оболочка.
\en The source shell. \~
\param[in] sameShell - \ru Способ копирования граней исходной оболочки.
\en Method of copying the source shell faces. \~
\param[in] parameters - \ru Правметры операции.
\en The operation parameters. \~
\param[out] res - \ru Код результата операции.
\en Operation result code. \~
\param[out] shell - \ru Построенный набор граней.
\en Constructed set of faces. \~
\result \ru Возвращает строитель, если операция была выполнена успешно.
\en Returns the constructor if the operation has been successfully performed. \~
\ingroup Model_Creators
*/
// ---
MATH_FUNC (MbCreator *) CreateRib( c3d::ShellSPtr & solid,
MbeCopyMode sameShell,
const MbRibSolidParameters & parameters,
MbResultType & res,
c3d::ShellSPtr & shell );
//------------------------------------------------------------------------------
/** \brief \ru Создать отдельное ребро жёсткости.
\en Create a separate rib. \~
\details \ru Для указанной оболочки построить оболочку в виде отдельного ребра жёсткости.
Одновременно с построением оболочки функция создаёт её строитель. \n
\en For the specified shell create a shell as a separate rib.
The function simultaneously constructs the shell and creates its constructor. \n \~
\deprecated \ru Функция устарела, взамен использовать #CreateRibElement с набором параметров #MbRibSolidParameters.
\en The function is deprecated, instead use #CreateRibElement with the parameter list #MbRibSolidParameters. \~
\param[in] solid - \ru Исходная оболочка.
\en The source shell. \~
\param[in] place - \ru Локальная система координат, в плоскости XY которай расположен двумерный контур.
\en A local coordinate system the two-dimensional contour is located in XY plane of. \~
\param[in] contour - \ru Двумерный контур ребра жесткости расположен в плоскости XY локальной системы координат.
\en Two-dimensional contour of a rib located in XY plane of the local coordinate system. \~
\param[in] index - \ru Индекс сегмента в контуре, от которого будет установлено направление уклона.
\en Index of a segment in the contour at which the inclination direction will be set. \~
\param[in] parameters - \ru Правметры операции.
\en The operation parameters. \~
\param[in] operNames - \ru Именователь операции.
\en An object defining names generation in the operation. \~
\param[out] res - \ru Код результата операции.
\en Operation result code. \~
\param[out] shell - \ru Построенный набор граней.
\en Constructed set of faces. \~
\result \ru Возвращает строитель, если операция была выполнена успешно.
\en Returns the constructor if the operation has been successfully performed. \~
\ingroup Model_Creators
*/
// ---
//DEPRECATE_DECLARE_REPLACE( CreateRibElement with MbRibSolidParameters )
MATH_FUNC (MbCreator *) CreateRibElement( MbFaceShell * solid,
const MbPlacement3D & place,
const MbContour & contour,
size_t index,
const RibValues & parameters,
const MbSNameMaker & operNames,
MbResultType & res,
MbFaceShell *& shell );
//------------------------------------------------------------------------------
/** \brief \ru Создать отдельное ребро жёсткости.
\en Create a separate rib. \~
@@ -146,14 +218,9 @@ MATH_FUNC (MbCreator *) CreateRib( MbFaceShell * solid,
\ingroup Model_Creators
*/
// ---
MATH_FUNC (MbCreator *) CreateRibElement( MbFaceShell * solid,
const MbPlacement3D & place,
const MbContour & contour,
size_t index,
RibValues & parameters,
const MbSNameMaker & operNames,
MbResultType & res,
MbFaceShell *& shell );
MATH_FUNC (MbCreator *) CreateRibElement( c3d::ShellSPtr & solid,
const MbRibSolidParameters & parameters,
MbResultType & res,
c3d::ShellSPtr & shell );
#endif // __CR_RIB_SOLID_H
+36 -5
View File
@@ -75,16 +75,17 @@ OBVIOUS_PRIVATE_COPY( MbRuledShell )
IMPL_PERSISTENT_OPS( MbRuledShell )
//------------------------------------------------------------------------------
/** \brief \ru Построить линейчатую оболочку.
\en Construct a ruled shell. \~
\details \ru Построить линейчатую оболочку по двум кривым.
Кривые могут быть составными.
Одновременно с построением оболочки функция создаёт её строитель.\n
Кривые могут быть составными.
Одновременно с построением оболочки функция создаёт её строитель.\n
\en Construct a ruled shell from two curves
Curves can be composite.
The function simultaneously creates the shell and its constructor.\n \~
\param[in] parameters - \ru Параметры операции.
Curves can be composite.
The function simultaneously creates the shell and its constructor.\n \~
\param[in,out] parameters - \ru Параметры операции.
\en The operation parameters. \~
\param[in] operNames - \ru Именователь.
\en An object for naming the new objects. \~
@@ -96,9 +97,12 @@ IMPL_PERSISTENT_OPS( MbRuledShell )
\en The resultant shell. \~
\result \ru Возвращает строитель оболочки.
\en Returns the shell constructor. \~
\deprecated \ru Функция устарела, взамен использовать #CreateRuledShell с набором параметров #MbRuledShellParams.
\en The function is deprecated, instead use #CreateRuledShell with the parameter list #MbRuledShellParams. \~
\ingroup Model_Creators
*/
// ---
//DEPRECATE_DECLARE_REPLACE( CreateRuledShell with MbRuledShellParams )
MATH_FUNC (MbCreator *) CreateRuledShell( RuledSurfaceValues & parameters,
const MbSNameMaker & operNames,
bool isPhantom,
@@ -106,4 +110,31 @@ MATH_FUNC (MbCreator *) CreateRuledShell( RuledSurfaceValues & parameters,
MbFaceShell *& shell );
//------------------------------------------------------------------------------
/** \brief \ru Построить линейчатую оболочку.
\en Construct a ruled shell. \~
\details \ru Построить линейчатую оболочку по двум кривым.
Кривые могут быть составными.
Одновременно с построением оболочки функция создаёт её строитель.\n
\en Construct a ruled shell from two curves
Curves can be composite.
The function simultaneously creates the shell and its constructor.\n \~
\param[in] ruledParams - \ru Параметры для построения линейчатого незамкнутого тела.
\en The operation parameters for the creation an open ruled solid. \~
\param[out] outParams - \ru Выходные параметры операции.
\en Output operation parameters. \~
\param[out] res - \ru Код результата операции.
\en Operation result code. \~
\param[out] shell - \ru Результирующая оболочка.
\en Result shell. \~
\result \ru Возвращает строитель оболочки.
\en Returns the shell constructor. \~
\ingroup Model_Creators
*/
// ---
MATH_FUNC (MbCreator *) CreateRuledShell( const MbRuledShellParams & ruledParams,
MbRuledShellResult & outParams,
MbResultType & res,
c3d::ShellSPtr & shell );
#endif // __CR_RULED_SHELL_H
+7 -14
View File
@@ -31,7 +31,6 @@ class MATH_CLASS MbFaceShell;
class MATH_CLASS MbSectionShell : public MbCreator {
protected :
MbSectionData sectionData; ///< \ru Данные о поверхности переменного сечения. \en Data about mutable section surface.
MbSectionCode sectionCode; ///< \ru Данные о поверхности переменного сечения. \en Data about mutable section surface.
/** \brief \ru Конструктор.
\en Constructor. \~
@@ -40,9 +39,7 @@ protected :
\param[in] names - \ru Именователь грани оболочки.
\en Generating face names. \~
*/
MbSectionShell( const MbSectionData & data,
const MbSectionCode & code,
const MbSNameMaker & names );
MbSectionShell( const MbSectionData & data );
private :
MbSectionShell( const MbSectionShell & init, MbRegDuplicate * ireg );
// \ru Объявление конструктора копирования без реализации, чтобы не было копирования по умолчанию. \en Declaration without implementation of the copy-constructor to prevent copying by default.
@@ -87,10 +84,6 @@ public :
const MbSectionData & GetSectionData() { return sectionData; }
/// \ru Установить параметры. \en Set the parameters.
void SetSectionData( const MbSectionData & data ) { sectionData = data; }
/// \ru Дать параметры. \en Get the parameters.
const MbSectionCode & GetSectionCode() { return sectionCode; }
/// \ru Установить параметры. \en Set the parameters.
void SetSectionCode( const MbSectionCode & code ) { sectionCode = code; }
/** \} */
/** \brief \ru Создать оболочку на поверхности переменного сечения.
@@ -116,12 +109,12 @@ public :
\result \ru Возвращает строитель.
\en Returns the constructor of operation. \~
*/
static MbSectionShell * Create( MbFaceShell * solid,
MbeCopyMode sameShell,
const MbSectionData & data,
const MbSNameMaker & names,
MbResultType & res,
MbFaceShell *& shell );
static
c3d::CreatorSPtr Create( c3d::ShellSPtr & solid,
MbeCopyMode sameShell,
const MbSectionData & data,
MbResultType & res,
c3d::ShellSPtr & shell );
private :
// \ru Объявление оператора присваивания без реализации, чтобы не было присваивания по умолчанию. \en The declaration of the assignment operator without implementation to prevent an assignment by default.
+22 -18
View File
@@ -23,9 +23,10 @@
*/
// ---
class MATH_CLASS MbNormalizeHolesSolid : public MbCreator {
bool _cutOnly; // \ru Нормализовавать только вырез \en Normalize only hole.
public :
MbNormalizeHolesSolid( const MbSNameMaker & names );
MbNormalizeHolesSolid( const MbSNameMaker & names,
bool isCut );
private:
MbNormalizeHolesSolid( const MbNormalizeHolesSolid &, MbRegDuplicate * iReg );
// \ru Объявление конструктора копирования без реализации, чтобы не было копирования по умолчанию. \en Declaration without implementation of the copy-constructor to prevent copying by default.
@@ -68,27 +69,30 @@ IMPL_PERSISTENT_OPS( MbNormalizeHolesSolid )
//------------------------------------------------------------------------------
/** \brief \ru Нормализовать вырезы листового тела.
\en Normalize of the holes of sheet solid. \~
\details \ru Нормализовать вырезы листового тела. \n
\en Normalize of the holes of sheet solid. \n \~
\param[in] initialShell - \ru Исходная оболочка.
\en The source shell. \~
\param[in] sameShell - \ru Флаг удаления оболочки исходного тела.
\en Whether to delete the shell of the source solid. \~
\param[in] nameMaker - \ru Именователь.
\en An object for naming the new objects. \~
\param[out] res - \ru Код результата операции.
\en Operation result code. \~
\param[out] shell - \ru Построенная оболочка.
\en The resultant shell. \~
\result \ru Возвращает строитель оболочки.
\en Returns the shell constructor. \~
\ingroup Sheet_Metal_Modeling
\en Normalize of the holes of sheet solid. \~
\details \ru Нормализовать вырезы листового тела. \n
\en Normalize of the holes of sheet solid. \n \~
\param[in] initialShell - \ru Исходная оболочка.
\en The source shell. \~
\param[in] sameShell - \ru Флаг удаления оболочки исходного тела.
\en Whether to delete the shell of the source solid. \~
\param[in] nameMaker - \ru Именователь.
\en An object for naming the new objects. \~
\param[in] cutOnly - \ru Hормализуется только вырез.
\en Normalize only cut. \~
\param[out] res - \ru Код результата операции.
\en Operation result code. \~
\param[out] shell - \ru Построенная оболочка.
\en The resultant shell. \~
\result \ru Возвращает строитель оболочки.
\en Returns the shell constructor. \~
\ingroup Sheet_Metal_Modeling
*/
// ---
MATH_FUNC (MbCreator *) NormalizeHolesSides ( MbFaceShell & initialShell,
const MbeCopyMode sameShell,
const MbSNameMaker & nameMaker,
bool cutOnly,
MbResultType & res,
MbFaceShell *& shell );
#endif // __CR_SHEET_NORMALIZE_HOLES_SOLID_H
+52 -9
View File
@@ -99,17 +99,19 @@ IMPL_PERSISTENT_OPS( MbUserStampSolid )
Одновременно с построением оболочки функция создаёт её строитель.\n
\en A shell is to be constructed on the basis of the source shell by the method of closed or open stamping. \n
The function simultaneously creates the shell and its constructor.\n \~
\param[in] solid - \ru Исходная оболочка.
\param[in] initialShell - \ru Исходная оболочка.
\en The source shell. \~
\param[in] sameShell - \ru Режим копирования исходной оболочки.
\param[in] sameShell - \ru Режим копирования исходной оболочки.
\en Mode of copying the source shell. \~
\param[in] face - \ru Грань штамповки.
\param[in] targetFace - \ru Грань штамповки.
\en The face for stamping. \~
\param[in] toolSolid - \ru Оболочка тела-инструмента.
\param[in] creatorsTool - \ru Журнал построения инструмента.
\en A creator of the tool.
\param[in] toolShell - \ru Оболочка тела-инструмента.
\en A shell of tool solid. \~
\param[in] sameShellTool - \ru Режим копирования оболочки тела-инструмента.
\en Mode of copying the tool shell. \~
\param[in] punch - \ru Является тело-инструмент пуансоном или матрицей.
\param[in] isPunch - \ru Является тело-инструмент пуансоном или матрицей.
\en Is tool body a punch or a die. \~
\param[in] pierceFaces - \ru Вскрываемые для вырубки грани инструмента,
\en Pierce faces of tool body. \~
@@ -117,13 +119,18 @@ IMPL_PERSISTENT_OPS( MbUserStampSolid )
\en The parameters of stamping. \~
\param[in] nameMaker - \ru Именователь.
\en An object for naming the new objects. \~
\param[out] result - \ru Результирующее тело.
\param[out] res - \ru - Код результата операции.
\en - The operation result code. \~
\param[out] resultShell - \ru Результирующее тело.
\en The resultant solid. \~
\result \ru Возвращает строитель оболочки.
\en Returns the shell constructor. \~
\deprecated \ru Функция устарела, взамен использовать #CreateUserStamp с набором параметров #MbStampWithToolParams.
\en The function is deprecated, instead use #CreateUserStamp with the parameter list #MbStampWithToolParams. \~
\ingroup Model_Creators
*/
// ---
//DEPRECATE_DECLARE_REPLACE( CreateUserStamp with 'MbStampWithToolParams' argument )
MATH_FUNC (MbCreator *) CreateUserStamp( MbFaceShell * initialShell, // Исходная оболочка,
const MbeCopyMode sameShell, // флаг способа использования исходной оболочки,
const MbFace & targetFace, // грань штамповки,
@@ -136,7 +143,43 @@ MATH_FUNC (MbCreator *) CreateUserStamp( MbFaceShell * initialShe
const MbSNameMaker & nameMaker, // именователь,
MbResultType & res, // флаг успешности операции,
SPtr<MbFaceShell> & resultShell ); // результирующая оболочка
//------------------------------------------------------------------------------
/** \brief \ru Построить оболочку из листового материала штамповкой телом-инструментом.
\en Construct a shell form sheet material by tool body stamping. \~
\details \ru На базе исходной оболочки из листового материала построить оболочку методом закрытой или открытой штамповки. \n
Одновременно с построением оболочки функция создаёт её строитель.\n
\en A shell is to be constructed on the basis of the source shell by the method of closed or open stamping. \n
The function simultaneously creates the shell and its constructor.\n \~
\param[in] initialShell - \ru Исходная оболочка.
\en The source shell. \~
\param[in] sameShell - \ru Режим копирования исходной оболочки.
\en Mode of copying the source shell. \~
\param[in] toolShell - \ru Оболочка тела-инструмента.
\en A shell of tool solid. \~
\param[in] sameShellTool - \ru Режим копирования оболочки тела-инструмента.
\en Mode of copying the tool shell. \~
\param[in] params - \ru Параметры штамповки.
\en The parameters of stamping. \~
\param[out] res - \ru - Код результата операции.
\en - The operation result code. \~
\param[out] resultShell - \ru Результирующее тело.
\en The resultant solid. \~
\result \ru Возвращает строитель оболочки.
\en Returns the shell constructor. \~
\ingroup Model_Creators
*/
// ---
MATH_FUNC( c3d::CreatorSPtr ) CreateUserStamp( c3d::ShellSPtr & initialShell, // Исходная оболочка,
const MbeCopyMode sameShell, // флаг способа использования исходной оболочки,
MbFaceShell & toolShell, // оболочка тела-инструмента,
const MbeCopyMode sameShellTool, // флаг способа использования оболочки инструмента,
const c3d::CreatorsSPtrVector & creatorsTool, // журнал построения инструмента,
const MbStampWithToolParams & stParams, // параметры штамповки
MbResultType & res, // флаг успешности операции,
c3d::ShellSPtr & resultShell ); // результирующая оболочка
//------------------------------------------------------------------------------
/** \brief \ru Построение результирующей оболочки.
@@ -168,7 +211,7 @@ MATH_FUNC (MbCreator *) CreateUserStamp( MbFaceShell * initialShe
\ingroup Model_Creators
*/
// ---
MbFaceShell * MakeUserStampShellForStampParts ( MbFaceShell * initialShell, // Исходная оболочка,
MbFaceShell * MakeUserStampShellForStampParts ( MbFaceShell * initialShell, // Исходная оболочка,
const MbeCopyMode sameShell, // флаг способа использования исходной оболочки,
const MbFace & targetFace, // грань штамповки,
MbFaceShell & toolShell, // оболочка тела-инструмента,
@@ -176,7 +219,7 @@ MbFaceShell * MakeUserStampShellForStampParts ( MbFaceShell *
bool isPunch, // является инструмент пуансоном или матрицей,
const RPArray<MbFace> & pierceFaces, // вскрываемые для вырубки грани инструмента,
const MbToolStampingValues & params, // параметры штамповки,
const MbSNameMaker & nameMaker ); // именователь,
const MbSNameMaker & nameMaker ); // именователь,
#endif // __CR_USERSTAMP_SOLID_H
+61
View File
@@ -13,6 +13,7 @@
#include <creator.h>
#include <op_swept_parameter.h>
#include <op_shell_parameter.h>
//------------------------------------------------------------------------------
@@ -117,6 +118,33 @@ MATH_FUNC (MbCreator *) CreateThinShell( const MbSurface & surface,
MbFaceShell *& shell );
//------------------------------------------------------------------------------
/** \brief \ru Построить оболочку по наборам точек.
\en Construct a shell from point sets. \~
\details \ru Построить оболочку по заданным наборам точек. По заданным наборам точек строятся кривые, по кривым создаётся
поверхность MbLoftedSurface, которой придаётся толщина.
Одновременно с построением оболочки функция создаёт её строитель.\n
\en Construct a shell from given point sets. The curves are created from the given sets of points, from these curves the surface
MbLoftedSurface with a certain thickness is created.
The function simultaneously creates the shell and its constructor.\n \~
\param[in] params - \ru Параметры операции.
Содержат информацию о наборе точек, именователе, имени операции.
\en Operation parameters.
Contains information about points, object defining names generation in the operation, operation name. \~
\param[out] res - \ru Код результата операции.
\en Operation result code. \~
\param[out] shell - \ru Построенная оболочка.
\en The resultant shell. \~
\result \ru Возвращает строитель оболочки.
\en Returns the shell constructor. \~
\ingroup Model_Creators
*/
// ---
MATH_FUNC (MbCreator *) CreateLoftedShell( const MbLoftedPointsShellParams & params,
MbResultType & res,
MbFaceShell *& shell );
//------------------------------------------------------------------------------
/** \brief \ru Построить оболочку по наборам точек.
\en Construct a shell from point sets. \~
@@ -138,9 +166,12 @@ MATH_FUNC (MbCreator *) CreateThinShell( const MbSurface & surface,
\en The resultant shell. \~
\result \ru Возвращает строитель оболочки.
\en Returns the shell constructor. \~
\deprecated \ru Функция устарела, взамен использовать #CreateLoftedShell с набором параметров #MbLoftedPointsShellParams.
\en The function is deprecated, instead use #CreateLoftedShell with the parameter list #MbLoftedPointsShellParams. \~
\ingroup Model_Creators
*/
// ---
DEPRECATE_DECLARE_REPLACE( CreateLoftedShell with MbLoftedPointsShellParams )
MATH_FUNC (MbCreator *) CreateLoftedShell( const RPArray< SArray<MbCartPoint3D> > & points,
const MbSNameMaker & operNames,
SimpleName & name,
@@ -148,6 +179,33 @@ MATH_FUNC (MbCreator *) CreateLoftedShell( const RPArray< SArray<MbCartPoint3D>
MbFaceShell *& shell );
//------------------------------------------------------------------------------
/** \brief \ru Построить оболочку по кривым.
\en Construct a shell from curves. \~
\details \ru Построить оболочку по заданным кривым. По заданным кривым создаётся
поверхность MbLoftedSurface, которой придаётся толщина.
Одновременно с построением оболочки функция создаёт её строитель.\n
\en Construct a shell from given curves. A surface MbLoftedSurface is created from the given curves,
and it is supplied with a thickness.
The function simultaneously creates the shell and its constructor.\n \~
\param[in] params - \ru Параметры операции.
Содержат информацию о наборе кривых, именователе, имени операции.
\en Operation parameters.
Contains information about curves, object defining names generation in the operation, operation name. \~
\param[out] res - \ru Код результата операции.
\en Operation result code. \~
\param[out] shell - \ru Построенная оболочка.
\en The resultant shell. \~
\result \ru Возвращает строитель оболочки.
\en Returns the shell constructor. \~
\ingroup Model_Creators
*/
// ---
MATH_FUNC (MbCreator *) CreateLoftedShell( const MbLoftedCurvesShellParams & params,
MbResultType & res,
MbFaceShell *& shell );
//------------------------------------------------------------------------------
/** \brief \ru Построить оболочку по кривым.
\en Construct a shell from curves. \~
@@ -169,9 +227,12 @@ MATH_FUNC (MbCreator *) CreateLoftedShell( const RPArray< SArray<MbCartPoint3D>
\en The resultant shell. \~
\result \ru Возвращает строитель оболочки.
\en Returns the shell constructor. \~
\deprecated \ru Функция устарела, взамен использовать #CreateLoftedShell с набором параметров #MbLoftedCurvesShellParams.
\en The function is deprecated, instead use #CreateLoftedShell with the parameter list #MbLoftedCurvesShellParams. \~
\ingroup Model_Creators
*/
// ---
DEPRECATE_DECLARE_REPLACE( CreateLoftedShell with MbLoftedCurvesShellParams )
MATH_FUNC (MbCreator *) CreateLoftedShell( const RPArray<MbCurve3D> & curves,
const MbSNameMaker & operNames,
SimpleName & name,
+1
View File
@@ -86,6 +86,7 @@ enum MbeCreatorType {
ct_IntersectionCurveCreator = 206, ///< \ru Строитель кривой пересечения. \en Constructor of the intersection curve.
ct_ConnectingCurveCreator = 207, ///< \ru Строитель кривой скругления двух кривых. \en Constructor of the curve connecting two curves. \n
ct_ExtensionCurveCreator = 208, ///< \ru Строитель удлиняемой кривой. \en Constructor of the extended curve. \n
ct_FairCurveCreator = 209, ///< \ru Строитель плавной кривой. \en Constructor of fair curve. \n
// \ru Строители полигональных объектов. \en Creators of polygonal objects.
ct_SimpleMeshCreator = 400, ///< \ru Строитель полигонального объекта без истории. \en Constructor of a polygonal object without history.
+1 -1
View File
@@ -524,7 +524,7 @@ public :
virtual bool GetAxisPoint( MbCartPoint & p ) const; // \ru Точка для построения оси \en A point for the axis construction
// \ru Продлить кривую. \en Extend the curve. \~
virtual MbResultType Extend( const MbCurveExtensionParameters & parameters, MbCurve *& resCurve ) const;
virtual MbResultType Extend( const MbCurveExtensionValues & parameters, c3d::PlaneCurveSPtr & resCurve ) const;
/// \ru Проверить с заданной точностью, является ли эллипс окружностью. \en Check whether the ellipse is a circle with a given tolerance.
bool IsCircle( double eps = PARAM_EPSILON ) const;
+1 -1
View File
@@ -430,7 +430,7 @@ public :
virtual void GetWeightCentre( MbCartPoint3D & ) const;
// \ru Продлить кривую. \en Extend the curve. \~
virtual MbResultType Extend( const MbCurveExtensionParameters & parameters, MbCurve3D *& resCurve ) const;
virtual MbResultType Extend( const MbCurveExtensionValues & parameters, c3d::SpaceCurveSPtr & resCurve ) const;
bool Normalize(); ///< \ru Ортонормировать локальную систему координат. \en Orthonormalize the local coordinate system.
bool IsPositionNormal() const { return ( !position.IsAffine() ); }
+28 -5
View File
@@ -299,7 +299,7 @@ public :
/** \ru \name Функции движения по кривой
\en \name Functions of the motion along the curve
\{ */
virtual double Step( double t, double sag ) const; // \ru Вычисление шага аппроксимации с учетом радиуса кривизны \en Calculation of the approximation step with consideration of the curvature radius
virtual double Step( double t, double sag ) const; // \ru Вычисление шага аппроксимации с учетом радиуса кривизны \en Calculation of the approximation step with consideration of the curvature radius
virtual double DeviationStep( double t, double angle ) const; // \ru Вычисление шага аппроксимации по угловой толерантности \en Calculation of the approximation step by angular tolerance
/** \} */
@@ -310,7 +310,7 @@ public :
virtual MbNurbs * NurbsCurve( const MbCurveIntoNurbsInfo & ) const;
virtual MbCurve * NurbsCurve( const MbNurbsParameters & ) const; // \ru Построить NURBS-копию кривой \en Create a NURBS-copy of the curve
virtual MbCurve * Trimmed( double t1, double t2, int sense ) const;
virtual MbContour * NurbsContour() const;
virtual MbContour * NurbsContour() const;
virtual void Inverse( MbRegTransform * iReg = nullptr ); // \ru Изменение направления кривой на противоположное \en Change to the opposite direction of a curve
@@ -328,7 +328,7 @@ public :
virtual size_t GetPointsCount() const; ///< \ru Вернуть количество несовпадающих контрольных точек. \en Return the number of non-coincedent control points.
virtual void GetPoint( ptrdiff_t index, MbCartPoint & pnt ) const; // \ru Выдать точку \en Get point
virtual ptrdiff_t GetNearPointIndex( const MbCartPoint & pnt ) const; ///< \ru Выдать индекс точки, ближайшей к заданной. \en Get the point index which is nearest to the given.
virtual ptrdiff_t GetNearPointIndex( const MbCartPoint & pnt ) const; ///< \ru Выдать индекс точки, ближайшей к заданной. \en Get the point index which is nearest to the given.
virtual void GetRuleInterval( ptrdiff_t index, double & t1, double & t2 ) const; // \ru Выдать интервал влияния точки \en Get the interval of point influence
@@ -346,6 +346,29 @@ public :
virtual void InsertPoint( ptrdiff_t index, const MbCartPoint & pnt ); // \ru Вставить точку по индексу \en Insert a point by index
virtual void InsertPoint( double t, const MbCartPoint & pnt, double xEps, double yEps ); // \ru Вставить точку по индексу \en Insert a point by index
/** \brief \ru Вставить полюс, заданный тремя точками, по индексу. Без пересчета производных в полюсах.
\en Insert a pole, specified by three pointss, by index. No recalculation of derivatives at the poles. \~
\details \ru Точка #basePnt задает характерную точку.
Вектор из точки #basePnt в точку слева #leftPnt задает производную слева от характерной точки,
вектор из точки #basePnt в точку справа #rightPnt задает производную справа от характерной точки.
Для сохранения непрерывности производной по направлению три заданных точки должны лежать на одной прямой.
Для сохранения непрерывности производной по величине расстояния от характерной точки до точек справа и слева должны быть равны.
\en #basePnt is the characteristic point.
The vector from #basePnt to the left point #leftPnt specifies the derivative to the left of the characteristic point,
the vector from #basePnt to the right point #rightPnt specifies the derivative to the right of the characteristic point.
To maintain the continuity of the directional derivative, the three specified points must lie on one straight line.
To maintain the continuity of the derivative with respect to the magnitude, the distances from the characteristic point to the points on the right and left must be equal. \~
\param[in] index - \ru Индекс полюса.
\en Pole index. \~
\param[in] leftPnt - \ru Точка слева от характерной точки.
\en Point to the left of the characteristic point. \~
\param[in] basePnt - \ru Характерная точка.
\en Сharacteristic point \~
\param[in] rightPnt- \ru Точка справа от характерной точки.
\en Point to the right of the characteristic point. \~
*/
void InsertPolePoints( size_t index, const MbCartPoint & leftPnt, const MbCartPoint & basePnt, const MbCartPoint & rightPnt );
/** \brief \ru Заменить полюс.
\en Replace the pole. \~
\details \ru Заменяет характерную точку с указанным индексом.
@@ -355,7 +378,7 @@ public :
\param[in] pnt - \ru Заданная точка.
\en A given point. \~
*/
virtual void ChangePole ( ptrdiff_t index, const MbCartPoint & pnt ); // \ru Заменить полюс \en Replace the pole
virtual void ChangePole ( ptrdiff_t index, const MbCartPoint & pnt );
virtual void ChangePoint( ptrdiff_t index, const MbCartPoint & pnt ); // \ru Заменить точку или производную \en Replace a point or derivative
virtual bool CheckParam ( double & t, ptrdiff_t & i0, ptrdiff_t & i1, double & t0, double & t1 ) const; // \ru Загнать параметр получить локальный индексы и параметры \en Move parameter, get local indices and parameters
virtual double GetParam( ptrdiff_t i ) const;
@@ -427,7 +450,7 @@ public :
\en True - if construction has been successfully. \~
*/
bool Break( MbBezier & trimPart, double t1, double t2 ) const; // \ru Выделить часть \en Break a part
void SetBezierSplines(); ///< \ru Вычислить параметры кривой-Bezier. \en > Calculate parameters of the Bezier curve.
void SetBezierSplines(); ///< \ru Вычислить параметры кривой-Bezier. \en Calculate parameters of the Bezier curve.
int GetFormType() const { return form; } ///< \ru Вернуть форму сплайна. \en Return the spline shape.
void SetFormType( int newForm ); ///< \ru Установить форму сплайна. \en Set the spline shape.
ptrdiff_t GetSplinesCount() const { return splinesCount; } ///< \ru Количество сплайнов \en The number of splines
+1 -1
View File
@@ -233,7 +233,7 @@ public :
bool IsVertical ( double eps = Math::paramEpsilon ) const { return ::fabs(point1.x - point2.x) < eps; } // \ru Проверка вертикальности \en Check for verticality
// \ru Продлить кривую. \en Extend the curve. \~
virtual MbResultType Extend( const MbCurveExtensionParameters & parameters, MbCurve *& resCurve ) const;
virtual MbResultType Extend( const MbCurveExtensionValues & parameters, c3d::PlaneCurveSPtr & resCurve ) const;
//private:
const MbLineSegment & operator = ( const MbLineSegment & ); // \ru Реализовано \en Implemented
+4 -1
View File
@@ -131,6 +131,9 @@ public :
virtual void GetPointsByEvenLengthDelta( size_t n, std::vector<MbCartPoint3D> & pnts ) const; // \ru Выдать n точек кривой с равными интервалами по длине дуги \en Get n points of curves equally spaced by the arc length
virtual bool IsSimilarToCurve( const MbCurve3D & curve, double precision = METRIC_PRECISION ) const; // \ru Подобные ли кривые для объединения (слива) \en Whether the curves are similar for merge (joining)
// \ru Построить двумерный отрезок, если пространственный отрезок параллелен плоской поверхности. \en Construct a two-dimensional segment if the spatial segment is parallel to a planar surface
virtual bool GetSurfaceCurve( MbCurve *& curve, MbSurface *& surface, VERSION version ) const;
const MbCartPoint3D & GetPoint1() const { return point1; }
const MbCartPoint3D & GetPoint2() const { return point2; }
MbCartPoint3D & SetPoint1() { return point1; }
@@ -142,7 +145,7 @@ public :
void SetLimitPoint( ptrdiff_t number, const MbCartPoint3D &pnt ); // \ru Заменить точку отрезка \en Replace the point of a line segment
// \ru Продлить кривую. \en Extend the curve. \~
virtual MbResultType Extend( const MbCurveExtensionParameters & parameters, MbCurve3D *& resCurve ) const;
virtual MbResultType Extend( const MbCurveExtensionValues & parameters, c3d::SpaceCurveSPtr & resCurve ) const;
/// \ru Является ли объект смещением \en Whether the object is a shift
virtual bool IsShift ( const MbSpaceItem &, MbVector3D &, bool & isSame, double accuracy = LENGTH_EPSILON ) const;
+15 -5
View File
@@ -231,11 +231,13 @@ public:
\en Set of points which the spline passes through. \~
\param[in] params - \ru Последовательность узловых параметров.
\en Sequence of knot parameters. \~
\param[in] aKnots - \ru Неубывающая последовательность узлов.
\en Nondecreasing sequence of knots. \~
\return \ru Возвращает указатель на созданный объект или нулевой указатель в случае неудачи.
\en Returns pointer to the created object or null pointer in case of failure. \~
*/
static MbNurbs * CreateThrough( size_t degree, bool cls, const SArray<MbCartPoint> & points,
const SArray<double> & params );
const SArray<double> & params, SArray<double> * aKnots = nullptr );
/** \brief \ru Заполнить NURBS по данным parasolid.
\en Fill NURBS by parasolid data. \~
\details \ru Заполнить NURBS по данным parasolid.\n
@@ -492,11 +494,15 @@ public :
\en Set of points which the spline passes through. \~
\param[in] params - \ru Последовательность узловых параметров.
\en Sequence of knot parameters. \~
\param[in] aKnots - \ru Неубывающая последовательность узлов.
\en Nondecreasing sequence of knots. \~
*/
bool InitThrough( size_t degree,
bool cls,
const SArray<MbCartPoint> & points,
const SArray<double> & params );
const SArray<double> & params,
SArray<double> * aKnots = nullptr );
/** \brief \ru Инициализация.
\en Initialization. \~
\details \ru Сплайн, проходящий через заданные точки при заданных параметрах.\n
@@ -511,11 +517,14 @@ public :
\en Set of points which the spline passes through. \~
\param[in] params - \ru Последовательность узловых параметров.
\en Sequence of knot parameters. \~
\param[in] aKnots - \ru Неубывающая последовательность узлов.
\en Nondecreasing sequence of knots. \~
*/
bool InitThrough( size_t degree,
bool cls,
const c3d::ParamPointsVector & points,
const c3d::DoubleVector & params );
const c3d::DoubleVector & params,
c3d::DoubleVector * aKnots = nullptr );
/** \brief \ru Инициализация.
\en Initialization. \~
@@ -953,7 +962,7 @@ public :
*/
bool BreakC0NURBS4( RPArray<MbCurve> &, bool bline = true );
/// \ru Разбить NURBS-кривую в местах, где кривая не дифференцируема. Параметризация не сохраняется. \en Split NURBS-curve at places where the curve is non-differentiable. Parametrization does not remain.
DEPRECATE_DECLARE_REPLACE( BreakC0 )
DEPRECATE_DECLARE_REPLACE( BreakC0 with c3d::PlaneCurvesSPtrVector )
bool BreakC0( RPArray<MbCurve> & );
/// \ru Разбить NURBS-кривую в местах, где кривая не дифференцируема. Параметризация не сохраняется. \en Split NURBS-curve at places where the curve is non-differentiable. Parametrization does not remain.
bool BreakC0( c3d::PlaneCurvesSPtrVector &, double metricAcc = METRIC_EPSILON );
@@ -1004,7 +1013,8 @@ private: // \ru Системные методы. \en System methods.
bool InitThroughTempl( size_t degree,
bool cls,
const PointsVector & points,
const ParamsVector & params );
const ParamsVector & params,
ParamsVector * aKnots = nullptr );
// \ru Служебные аналоги публичных функций, которые используют заданный кэш. \en Service analogs of public functions that use a given cache.
void PointOn( double & t, MbCartPoint & pnt, MbNurbsAuxiliaryData * ucache ) const; // \ru Точка на кривой. \en Point on the curve.
+5 -4
View File
@@ -445,7 +445,7 @@ public:
\en Set of points which the spline passes through. \~
\param[in] params - \ru Последовательность узловых параметров.
\en Sequence of knot parameters. \~
\param[in] knots - \ru Неубывающая последовательность узлов.
\param[in] aKnots - \ru Неубывающая последовательность узлов.
\en Nondecreasing sequence of knots. \~
*/
bool InitThrough( size_t degree,
@@ -453,6 +453,7 @@ public:
const SArray<MbCartPoint3D> & points,
const SArray<double> & params,
SArray<double> * aKnots = nullptr );
/** \brief \ru Инициализация.
\en Initialization. \~
\details \ru Сплайн, проходящий через заданные точки при заданных параметрах.\n
@@ -467,14 +468,14 @@ public:
\en Set of points which the spline passes through. \~
\param[in] params - \ru Последовательность узловых параметров.
\en Sequence of knot parameters. \~
\param[in] knots - \ru Неубывающая последовательность узлов.
\param[in] aKnots - \ru Неубывающая последовательность узлов.
\en Nondecreasing sequence of knots. \~
*/
bool InitThrough( size_t degree,
bool cls,
const c3d::SpacePointsVector & points,
const c3d::DoubleVector & params,
c3d::DoubleVector * knots = nullptr );
c3d::DoubleVector * aKnots = nullptr );
/// \ru Установить тип формы. \en Set the type of shape.
void SetFormType( MbeNurbsCurveForm f ) { form = f; }
@@ -782,7 +783,7 @@ public:
/// \ru Преобразовать кривую в коническое сечение, если это возможно. \en Transform a curve into a conic section if it is possible.
MbCurve3D * ConvertToConic();
/// \ru Разбить NURBS-кривую в местах, где кривая не дифференцируема. Если кривая дифференцируема, то добавляется копия кривой. \en Split a NURBS-curve at places where the curve is non-differentiable. If the curve is differentiable, then the curve copy is added.
DEPRECATE_DECLARE_REPLACE( BreakC0 )
DEPRECATE_DECLARE_REPLACE( BreakC0 with c3d::SpaceCurvesSPtrVector )
bool BreakC0( RPArray<MbCurve3D> & );
/// \ru Разбить NURBS-кривую в местах, где кривая не дифференцируема. Если кривая дифференцируема, то добавляется копия кривой. \en Split a NURBS-curve at places where the curve is non-differentiable. If the curve is differentiable, then the curve copy is added.
bool BreakC0( c3d::SpaceCurvesSPtrVector &, double metricAcc = METRIC_EPSILON );
+2 -2
View File
@@ -33,7 +33,7 @@ class MATH_CLASS MbLine;
class MATH_CLASS MbContour;
class MATH_CLASS MbPolygon;
class MATH_CLASS MbCrossPoint;
class MATH_CLASS MbCurveExtensionParameters;
class MATH_CLASS MbCurveExtensionValues;
class MbCurveIntoNurbsInfo;
struct MbNurbsParameters;
@@ -1358,7 +1358,7 @@ public :
\en Under development. \~
*/
// ---
virtual MbResultType Extend( const MbCurveExtensionParameters & parameters, MbCurve *& resCurve ) const;
virtual MbResultType Extend( const MbCurveExtensionValues & parameters, c3d::PlaneCurveSPtr & resCurve ) const;
private:
// \ru Объявление оператора присваивания без реализации, чтобы не было присваивания по умолчанию \en Declaration without implementation of the assignment operator to prevent an assignment by default
+2 -2
View File
@@ -34,7 +34,7 @@ class MATH_CLASS MbSurface;
class MATH_CLASS MbPolygon3D;
class MATH_CLASS MbNurbs3D;
class MATH_CLASS MbPlacement3D;
class MATH_CLASS MbCurveExtensionParameters;
class MATH_CLASS MbCurveExtensionValues;
class MbCurveIntoNurbsInfo;
struct MbNurbsParameters;
@@ -1083,7 +1083,7 @@ public :
\en Under development. \~
*/
// ---
virtual MbResultType Extend( const MbCurveExtensionParameters & parameters, MbCurve3D *& resCurve ) const;
virtual MbResultType Extend( const MbCurveExtensionValues & parameters, c3d::SpaceCurveSPtr & resCurve ) const;
// \ru Функции унификации кривой и вектора кривых в шаблонных функциях. \en Functions for compatibility of a curve and a vector of curves in template functions.
size_t size() const { return 1; } ///< \ru Размер кривой трактуемой как в виде вектора кривых. \en Size of curve interpreted as vector of curves.
+37
View File
@@ -59,4 +59,41 @@ MATH_FUNC( MbResultType ) IntersectLines( const MbCartPoint3D & r0,
MbCartPoint3D & p3 );
//------------------------------------------------------------------------------
/** \brief \ru Определение точек пересечения скрещивающихся прямых. \en Find intersection point of two intersecting lines.
\details \ru Определение точек пересечения скрещивающихся прямых. \en Find intersection point of two intersecting lines.
\param[in] p10 - \ru Первая точка. \en First point.
\param[in] p11 - \ru Первая касательная. \en First tangent.
\param[in] p20 - \ru Вторая точка. \en Second point.
\param[in] p21 - \ru Вторая касательная. \en Second tangent.
\param[out] xyz - \ru Результирующая точка. \en Result point.
\return \ru Возвращает значение результата операции.
\en Returns operation result value.
*/
// ---
MATH_FUNC( MbResultType )
LineIntersectIn3DTest( const MbCartPoint3D & p10, const MbVector3D & p11, // первая точка с касательной
const MbCartPoint3D & p20, const MbVector3D & p21, // вторая ...
MbCartPoint3D & xyz );
// DEBUG20211217 BEGIN
//------------------------------------------------------------------------------
/** \brief \ru Уплотнить точки на окружности. \en Condense the points on the circle.
\details \ru Уплотнить точки на окружности. Определить касательные к точкам на окружности.
\en Condense the points on the circle. Find tangents to the points onthe circle.
\param[in] polyLine - \ru Набор из трех точек. \en A set of three points.
\param[in] tangents - \ru Набор касательных. \en A set of tangents.
\param[out] polyLineRezult - \ru Результирующие точки. \en Result points.
\return \ru Возвращает значение результата операции.
\en Returns operation result value.
*/
// ---
MATH_FUNC( MbResultType )
TangentsOnCirleTest( SArray<MbCartPoint3D> & polyLine, // 3 точки
SArray<MbVector3D> & tangents,
SArray<MbCartPoint3D> & polyLineRezult, // Результат 5 точек
double & cvt );
#endif // __FAIR_CURVES_UTILS_H
+4 -4
View File
@@ -64,10 +64,10 @@ public:
// \ru Общие функции математического объекта \en Common functions of mathematical object
virtual MbeFunctionType IsA () const; // \ru Тип элемента \en A type of element
virtual MbFunction & Duplicate() const; // \ru Сделать копию элемента \en Create a copy of the element
virtual bool IsSame ( const MbFunction & other, double accuracy = LENGTH_EPSILON ) const; // \ru Являются ли объекты равными \en Determine whether objects are equal
virtual bool SetEqual ( const MbFunction & ); // \ru Сделать равным \en Make equal
virtual void GetProperties( MbProperties & ); // \ru Выдать свойства объекта \en Get properties of the object
virtual void SetProperties( const MbProperties & ); // \ru Записать свойства объекта \en Set properties of the object
virtual bool IsSame ( const MbFunction & other, double accuracy = LENGTH_EPSILON ) const; // \ru Являются ли объекты равными \en Determine whether objects are equal
virtual bool SetEqual ( const MbFunction & ); // \ru Сделать равным \en Make equal
virtual void GetProperties( MbProperties & ); // \ru Выдать свойства объекта \en Get properties of the object
virtual void SetProperties( const MbProperties & ); // \ru Записать свойства объекта \en Set properties of the object
virtual double GetTMax () const; // \ru Вернуть максимальное значение параметра \en Get the maximum value of parameter
virtual double GetTMin () const; // \ru Вернуть минимальное значение параметра \en Get the minimum value of parameter
+13
View File
@@ -14,13 +14,26 @@
#include <io_tape.h>
#include <mb_variables.h>
#include <reference_item.h>
#include <templ_sptr.h>
#include <vector>
#include <utility>
class MATH_CLASS MbProperties;
class MATH_CLASS MbRegTransform;
class MATH_CLASS MbFunction;
namespace c3d // namespace C3D
{
typedef SPtr<MbFunction> FunctionSPtr;
typedef SPtr<const MbFunction> ConstFunctionSPtr;
typedef std::vector<MbFunction *> FunctionVector;
typedef std::vector<const MbFunction *> ConstFunctionVector;
}
//------------------------------------------------------------------------------
/** \brief \ru Типы скалярных функций.
\en Types of scalar functions. \~
+52
View File
@@ -326,6 +326,36 @@ GCE_FUNC(geom_item) GCE_AddRigidSet( GCE_system gSys, const std::vector<geom_ite
//---
GCE_FUNC(var_item) GCE_AddVariable( GCE_system gSys, double val );
//----------------------------------------------------------------------------------------
/** \brief \ru Получить переменную из системы ограничений.
\en Get a variable from the constraint system. \~
\param[in] gSys - \ru Система ограничений.
\en System of constraints. \~
\param[in] g - \ru Идентификатор геометрического объекта.
\en Descriptor of geometric object. \~
\param[in] coordType - \ru Тип переменной геометрического объекта.
\en Type of variable of geometric object. \~
\return \ru Дескриптор зарегистрированной переменной геометрического объекта.
\en Descriptor of registered variable of geometric object. \~
*/
//---
GCE_FUNC(var_item) GCE_VariableOf( GCE_system gSys, geom_item g, coord_type coordType );
//----------------------------------------------------------------------------------------
/** \brief \ru Ограничить значение переменной интервалом.
\en Limit the value of a variable to an interval. \~
\param[in] gSys - \ru Система ограничений.
\en System of constraints. \~
\param[in] var - \ru Идентификатор переменной.
\en Descriptor of variable. \~
\param[in] GCE_interval - \ru Границы изменения переменной.
\en Boundaries for changing a variable. \~
\return \ru Дескриптор нового ограничения.
\en Descriptor of a new constraint. \~
*/
//---
GCE_FUNC(constraint_item) GCE_AddBound( GCE_system gSys, var_item var, GCE_interval dim );
//----------------------------------------------------------------------------------------
/** \brief \ru Тип геометрического объекта.
\en A type of geometric object. \~
@@ -369,6 +399,17 @@ GCE_FUNC(geom_type) GCE_BaseCurveType( GCE_system gSys, geom_item crv );
//---
GCE_FUNC(bool) GCE_RemoveVariable( GCE_system gSys, var_item var );
//----------------------------------------------------------------------------------------
/** \brief \ru Передать управление временем жизни переменной решателю.
\en Control variable's lifetime by solver. \~
\param[in] gSys - \ru Система ограничений.
\en System of constraints. \~
\param[in] var - \ru Дескриптор переменной.
\en Descriptor of variable. \~
*/
//---
GCE_FUNC(void) GCE_ReleaseVariable( GCE_system gSys, var_item var );
//----------------------------------------------------------------------------------------
/** \brief \ru Удалить геометрический объект из системы ограничений.
\en Delete geometric object from the constraint system. \~
@@ -399,6 +440,17 @@ GCE_FUNC(bool) GCE_RemoveVariable( GCE_system gSys, var_item var );
//---
GCE_FUNC(bool) GCE_RemoveGeom( GCE_system gSys, geom_item g );
//----------------------------------------------------------------------------------------
/** \brief \ru Передать управление временем жизни геометрического объекта решателю.
\en Control geometry object's lifetime by solver. \~
\param[in] gSys - \ru Система ограничений.
\en System of constraints. \~
\param[in] var - \ru Дескриптор геометрического.
\en Descriptor of geometric object. \~
*/
//---
GCE_FUNC(void) GCE_ReleaseGeom( GCE_system gSys, geom_item g );
//----------------------------------------------------------------------------------------
/** \brief \ru Удалить ограничение из системы.
\en Delete a constraint from the system. \~
+147 -59
View File
@@ -939,6 +939,10 @@ inline void MbSymbolVestige::SetMatrix( const MbMatrix & initMatrix )
с селектированием на видимые и невидимые.\n
\en The set of arrays which are given after getting off all solid(s) lines
with the separation to visible and invisible.\n \~
\warning \ru Доступ к полям структуры будет ограничен начиная с версии C3D_2022_VERSION.
Необходимо использовать соответствующие методы доступа к данным.
\en Direct access to structure fields will be limited starting from C3D_2022_VERSION.
Use corresponding methods to data access.
\ingroup Mapping
*/
// ---
@@ -954,15 +958,7 @@ struct MATH_CLASS MbVEFVestiges {
public:
/// \ru Конструктор. \en Constructor.
MbVEFVestiges()
: vertexVestiges ( 0, 1, true )
, edgeVestiges ( 0, 1, true )
, faceVestiges ( 0, 1, true )
, annotateVestiges( 0, 1, true )
, symbolVestiges ( 0, 1, true )
, pointVestiges ( 0, 1, true )
, curveVestiges ( 0, 1, true )
{}
MbVEFVestiges();
/// \ru Конструктор копирования с регистратором. \en Copy-constructor with the registrator.
MbVEFVestiges( const MbVEFVestiges & other, MbRegDuplicate * iReg );
/// \ru Деструктор. \en Destructor.
@@ -970,52 +966,67 @@ public:
public:
/// \ru Создать копию объекта. \en Create a copy of the object.
virtual MbVEFVestiges & Duplicate( MbRegDuplicate * iReg = nullptr ) const;
virtual MbVEFVestiges & Duplicate( MbRegDuplicate * iReg = nullptr ) const;
/// \ru Очистить массивы следов. \en Clear arrays of vestiges.
void SetEmpty()
{
vertexVestiges.Flush();
edgeVestiges.Flush();
faceVestiges.Flush();
annotateVestiges.Flush();
symbolVestiges.Flush();
pointVestiges.Flush();
curveVestiges.Flush();
}
void SetEmpty();
/// \ru Очистить массивы следов. \en Clear arrays of vestiges.
void SetEmptyHard()
{
vertexVestiges.HardFlush();
edgeVestiges.HardFlush();
faceVestiges.HardFlush();
annotateVestiges.HardFlush();
symbolVestiges.HardFlush();
pointVestiges.HardFlush();
curveVestiges.HardFlush();
}
void SetEmptyHard();
/// \ru Освободить неиспользуемую память. \en Adjust memory.
void Adjust()
{
vertexVestiges.Adjust();
edgeVestiges.Adjust();
faceVestiges.Adjust();
annotateVestiges.Adjust();
symbolVestiges.Adjust();
pointVestiges.Adjust();
curveVestiges.Adjust();
}
bool IsEmpty() const
{
return (vertexVestiges.Count() < 1) &&
(edgeVestiges.Count() < 1) &&
(faceVestiges.Count() < 1) &&
(annotateVestiges.Count() < 1) &&
(symbolVestiges.Count() < 1) &&
(pointVestiges.Count() < 1) &&
(curveVestiges.Count() < 1);
}
void Adjust();
/// \ru Пусты ли массивы следов. \en Check if arrays of vestiges are empty.
bool IsEmpty() const;
/// \ru Изменить флаг владения элементами. \en Change the flag of elements ownership
void DetachOwn();
/// \ru Зарезервировать место под n элементов следов вершин. \en Reserve memory for n elements of vertices vestiges.
void VertexVestigesReserve( size_t count );
/// \ru Зарезервировать место под n элементов следов вершин. \en Reserve memory for n elements of edges vestiges.
void EdgesVestigesReserve( size_t count );
/// \ru Очистить массивы следов вершин. \en Clear arrays of vertices vestiges.
void ClearVertexVestiges();
/// \ru Очистить массивы следов ребер. \en Clear arrays of edges vestiges.
void ClearEdgeVestiges();
/// \ru Очистить массивы следов граней. \en Clear arrays of faces vestiges.
void ClearFaceVestiges();
/// \ru Очистить массивы следов аннотационных объектов. \en Clear arrays of annotative objects vestiges.
void ClearAnnotationVestiges();
/// \ru Очистить массивы следов условных обозначений. \en Clear arrays of conventional notations vestiges.
void ClearSymbolVestiges();
/// \ru Очистить массивы следов пространственных точек. \en Clear arrays of spatial points vestiges.
void ClearPointVestiges();
/// \ru Очистить массивы следов пространственных кривых. \en Clear arrays of spatial curves vestiges.
void ClearCurveVestiges();
public:
/// \ru Количество следов вершин. \en Count of vertices vestiges.
size_t VertexVestigesCount() const { return vertexVestiges.size(); }
/// \ru Количество следов ребер. \en Count of edges vestiges.
size_t EdgeVestigesCount() const { return edgeVestiges.size(); }
/// \ru Количество следов граней. \en Count of faces vestiges.
size_t FaceVestigesCount() const { return faceVestiges.size(); }
/// \ru Количество следов аннотационных объектов. \en Count of annotative objects vestiges.
size_t AnnotateVestigesCount() const { return annotateVestiges.size(); }
/// \ru Количество следов условных обозначений. \en Count of conventional notations vestiges.
size_t SymbolVestigesCount() const { return symbolVestiges.size(); }
/// \ru Количество следов пространственных точек. \en Count of spatial points vestiges.
size_t PointVestigesCount() const { return pointVestiges.size(); }
/// \ru Количество следов пространственных кривых. \en Count of spatial curves vestiges.
size_t CurveVestigesCount() const { return curveVestiges.size(); }
/// \ru Получить указатель на след вершины. \en Get pointer to vertex vestige.
MbVertexVestige * GetVertexVestige( size_t ind ) const { return vertexVestiges[ind]; }
/// \ru Получить указатель на след ребра. \en Get pointer to edge vestige.
MbEdgeVestige * GetEdgeVestige( size_t ind ) const { return edgeVestiges[ind]; }
/// \ru Получить указатель на след грани. \en Get pointer to face vestige.
MbFaceVestige * GetFaceVestige( size_t ind ) const { return faceVestiges[ind]; }
/// \ru Получить указатель на след аннотационного объекта. \en Get pointer to annotative object vestige.
MbAnnotationEdgeVestige * GetAnnotationVestige( size_t ind ) const { return annotateVestiges[ind]; }
/// \ru Получить указатель на след условного обозначения. \en Get pointer to conventional notation vestige.
MbSymbolVestige * GetSymbolVestige( size_t ind ) const { return symbolVestiges[ind]; }
/// \ru Получить указатель на след пространственной точки. \en Get pointer to spatial point vestige.
MbVertexVestige * GetPointVestige( size_t ind ) const { return pointVestiges[ind]; }
/// \ru Получить указатель на след пространственной кривой. \en Get pointer to spatial curve vestige.
MbEdgeVestige * GetCurveVestige( size_t ind ) const { return curveVestiges[ind]; }
/** \brief \ru Добавить MbVertexVestige в массив.
\en Add the MbVertexVestige to an array. \~
\details \ru Добавить MbVertexVestige в массив через закрытые конструкторы. \n
@@ -1028,7 +1039,7 @@ public:
\en A topological object. \~
\param[in] uv - \ru Точка - след вершины.
\en Point - vertex vestige. \~
\param[in] uv - \ru Состояние видимости.
\param[in] vis - \ru Состояние видимости.
\en Visibility state. \~
*/
MbVertexVestige * AddVestigeVertex( uint otherComp, size_t otherIdent, const MbTopologyItem & otherItem, const MbCartPoint & uv, bool vis );
@@ -1071,12 +1082,14 @@ public:
\en Add the MbEdgeVestige to an array. \~
\details \ru Добавить MbEdgeVestige в массив через закрытые конструкторы. \n
\en Add the MbEdgeVestige to an array by the private constructors. \n \~
\param[in] otherComp - \ru Компонент.
\en A component. \~
\param[in] otherIdent - \ru Идентификатор нити.
\en A thread identifier. \~
\param[in] otherName - \ru Имя топологического объекта.
\en A name of a topological object. \~
\param[in] otherComp - \ru Компонент.
\en A component. \~
\param[in] otherIdent - \ru Идентификатор нити.
\en A thread identifier. \~
\param[in] otherName - \ru Имя топологического объекта.
\en A name of a topological object. \~
\param[in] isCenterLine - \ru Является ли след осевой линией объекта.
\en Is curve vestige a center line. \~
*/
MbEdgeVestige * AddVestigeCurve( uint otherComp, size_t otherIdent, const MbName & otherName, bool isCenterLine = false );
@@ -1147,6 +1160,80 @@ public:
*/
MbSymbolVestige * AddVestigeSymbol( uint otherComp, size_t otherIdent, const MbTopologyItem * otherItem, const MbName & otherName, bool _bvisible = true );
/// \ru Трансформировать следы по матрице. \en Transform vestiges according to a matrix.
void Transform( const MbMatrix & matrix );
/// \ru Удалить след вершины. \en Delete vertex vestige.
void RemoveVertexVestige( size_t ind );
/// \ru Удалить след ребра. \en Delete edge vestige.
void RemoveEdgeVestige( size_t ind );
/// \ru Удалить след грани. \en Delete face vestige.
void RemoveFaceVestige( size_t ind );
/// \ru Удалить след аннотационного объекта. \en Delete annotative object vestige.
void RemoveAnnotationVestige( size_t ind );
/// \ru Удалить след условного обозначения. \en Delete conventional notation vestige.
void RemoveSymbolVestige( size_t ind );
/// \ru Удалить след пространственной точки. \en Delete spatial point vestige.
void RemovePointVestige( size_t ind );
/// \ru Удалить след пространственной кривой. \en Delete spatial curve vestige.
void RemoveCurveVestige( size_t ind );
/// \ru Добавить следы из другого набора. \en Add vestiges from other set.
void AddFrom( const MbVEFVestiges & other );
/// \ru Инициализировать следы аннотационных объектов. \en Initialize annotative objects vestiges.
template <class AnnotateVector>
void InitAnnotateVestiges( const AnnotateVector & annotates ) {
annotateVestiges.clear();
annotateVestiges.AddArray( annotates );
}
/// \ru Инициализировать следы пространственных кривых. \en Initialize spatial curves vestiges.
template <class CurveVector>
void InitCurveVestiges( CurveVector & curves ) {
curveVestiges.clear();
curveVestiges.AddArray( curves );
}
/// \ru Выдать следы вершин. \en Get vertices vestiges.
template <class VertexVector>
void GetVertexVestiges( VertexVector & vertices ) const {
vertices.reserve( vertices.size() + vertexVestiges.size() );
std::copy( vertexVestiges.begin(), vertexVestiges.end(), std::back_inserter(vertices) );
}
/// \ru Выдать следы ребер. \en Get edges vestiges.
template <class EdgeVector>
void GetEdgeVestiges( EdgeVector & edges ) const {
edges.reserve( edges.size() + edgeVestiges.size() );
std::copy( edgeVestiges.begin(), edgeVestiges.end(), std::back_inserter(edges) );
}
/// \ru Выдать следы граней. \en Get faces vestiges.
template <class FaceVector>
void GetFaceVestiges( FaceVector & faces ) const {
faces.reserve( faces.size() + faceVestiges.size() );
std::copy( faceVestiges.begin(), faceVestiges.end(), std::back_inserter(faces) );
}
/// \ru Выдать следы аннотационных объектов. \en Get annotative objects vestiges.
template <class AnnotateVector>
void GetAnnotateVestiges( AnnotateVector & annotates ) const {
annotates.reserve( annotates.size() + annotateVestiges.size() );
std::copy( annotateVestiges.begin(), annotateVestiges.end(), std::back_inserter(annotates) );
}
/// \ru Выдать следы условных обозначений. \en Get conventional notations vestiges.
template <class SymbolVector>
void GetSymbolVestiges( SymbolVector & symbols ) const {
symbols.reserve( symbols.size() + symbolVestiges.size() );
std::copy( symbolVestiges.begin(), symbolVestiges.end(), std::back_inserter(symbols) );
}
/// \ru Выдать следы пространственных точек. \en Get spatial points vestiges.
template <class PointVector>
void GetPointVestiges( PointVector & points ) const {
points.reserve( points.size() + pointVestiges.size() );
std::copy( pointVestiges.begin(), pointVestiges.end(), std::back_inserter(points) );
}
/// \ru Выдать следы пространственных кривых. \en Get spatial curves vestiges.
template <class CurveVector>
void GetCurveVestiges( CurveVector & curves ) const {
curves.reserve( curves.size() + curveVestiges.size() );
std::copy( curveVestiges.begin(), curveVestiges.end(), std::back_inserter(curves) );
}
private:
bool operator == ( const MbVEFVestiges & ); // \ru Не реализован. \en Not implemented.
bool operator != ( const MbVEFVestiges & ); // \ru Не реализован. \en Not implemented.
@@ -1273,8 +1360,9 @@ inline MbSymbolVestige * MbVEFVestiges::AddVestigeSymbol( uint otherComp, size_t
\ingroup Mapping
*/
// ---
inline MbVertexVestige & GetVertexI( size_t i, RPArray<MbVertexVestige> & array ) {
return *array[i];
inline
MbVertexVestige & GetVertexI( size_t i, const MbVEFVestiges & vestiges ) {
return *vestiges.GetVertexVestige( i );
}
+1 -1
View File
@@ -90,7 +90,7 @@ namespace c3d {
//------------------------------------------------------------------------------
#define CONCAT_TKNS(A, B, C, D) A ## B ## C ## D // Concatenate tokens without expanding macro (if invoked from macro, arguments are expanded).
#define CONCAT_TKNS(A, B, C, D) A B C D // Concatenate tokens without expanding macro (if invoked from macro, arguments are expanded).
#define CONCAT_TOKENS(A, B, C, D) CONCAT_TKNS(A, B, C, D) // Concatenate tokens with expanding macro.
#define DEPR_MSG "This is a deprecated API that will be removed in version 2022!" // Message about a deprecated API.
+17 -42
View File
@@ -521,14 +521,14 @@ struct MATH_CLASS MbFairCurveData {
public:
bool closed; ///< \ru Признак замкнутости кривой. \en Sign of closed curve \~
bool fairing; ///< \ru Сглаживание (0 - без сглаживания, 1 - со сглаживанием). \en Smoothing of curve: 0 - disable, 1 - enable. \~
MbeFairSmoothing fairing; ///< \ru Сглаживание (без сглаживания, со сглаживанием, со сглаживанием и исправлением острых углов). \en Smoothing of curve: 0 - disable, 1 - enable, 2 - enable and correct acute angles \~
bool arrange; ///< \ru Перераспределение точек по контуру (false - без перераспределения, true - с перераспределением). \en Redistribution of points (false - without of distribution, true - with distribution) . \~
MbeFairSubdivision subdivision; ///< \ru Коэффициент уплотнения кривой. \en Curve subdivision coefficient . \~
MbeFairCurvature accountCurvature; ///< \ru Учет кривизны в концевых точках. \en Accounting for curvature at end points. \~
MbeFairVector accountInflexVector; ///< \ru Учет вектора в точке перегиба (0 - направление звена S-полигона, 1 - направление касательной). \en How to take into account the vector at the inflection point (0 - direction of segment of S-polygon, 1 - direction of tangent to curve). \~
MbeFixPntTng fixPntTng; ///< \ru Фиксировать точки на касательных / касательные в точках. \en Fix the points on tangents / the tangents on points.
MbeFairApprox approx; ///< \ru Метод аппроксимации. \en Approx method. \~
int create; ///< \ru Исходные ГО: 1 - опорная ломаная, 2 - касательная ломаная. \en Initial GD: 1 - base polyline, 2 - tangent polyline. \~
MbeFairMethod create; ///< \ru Исходные ГО: 1 - опорная ломаная, 2 - касательная ломаная. \en Initial GD: 1 - base polyline, 2 - tangent polyline. \~
size_t degreeBSpline; ///< \ru Степень B-сплайновой кривой m (3<=m<=10). \en The degree m (3<=m<=10) of B-Spline curve. \~
MbeFairSplineFormat initFormat; ///< \ru Исходный формат сплайна (1 - открытый S-полигон, 2 - закрытый S-полигон, 3 - GB-полигон). \en Output format of spline (1 - foat S-polygon, 2 - clamped S-polygon, 3 - GB-polygon). \~
MbeFairSplineFormat outFormat; ///< \ru Выходной формат сплайна (2 - S-полигон, 3 - GB-полигон). \en Output format of spline (2 - S-polygon, 3 - GB-polygon). \~
@@ -538,8 +538,6 @@ public:
double clothoidRMin; ///< \ru Радиус кривизны на конце начального участка клотоиды. \en Curvature radius on end of initial part of Clothoid. \~
double clothoidLMax; ///< \ru Максимальная длина начального участка клотоиды. \en Max length of initial part of Clothoid. \~
size_t clothoidSegms; ///< \ru Количество сегментов аппроксимирующей клотоиду кривой. \en Number of segments of curve approximated the Clothoid. \~
MbeFairWarning warning; ///< \ru Предупреждение о работе. \en The operation warning. \~
MbResultType error; ///< \ru Ошибка о работе. \en The operation error. \~
SArray<int> arrayFixPntTngSign; ///< \ru Признаки учета касательных на точках / точек на касательных. \en Signs of points on tangents / tangents on points.
size_t numberOfIterationsBSpl; ///< \ru Количество итераций построения B-сплайна (заданное и фактическое). \en The number of iterations for building the B-spline (given and actual).
size_t numberOfIterationsVCurve; ///< \ru Количество итераций построения V-кривой (заданное и фактическое). \en The number of iterations for building the V-curve (given and actual).
@@ -553,6 +551,9 @@ public:
double firstCurvature; ///< \ru Значение кривизны в начальной точке. \en Curvature in the first point.
double lastCurvature; ///< \ru Значение кривизны в конечной точке. \en Curvature in the last point.
bool smoothTorsion; ///< \ru Флаг сглаживания кручения пространственной кривой (false - незамкнут, true - замкнут). \en Sign of smoothing of torsion of curve (false - not smoothed, true - smoothed).
MbeFairWarning warning; ///< \ru Предупреждение о работе. \en The operation warning. \~
MbResultType error; ///< \ru Ошибка о работе. \en The operation error. \~
#ifdef C3D_DEBUG_FAIR_CURVES
/*DEBUG*/ FILE *prt;
@@ -561,59 +562,33 @@ public:
public:
/// \ru Пустой конструктор. \en Empty constructor.
MbFairCurveData() :
//closed( false ), fairing( false ), arrange( false ), subdivision( fairSubdiv_Single ),
closed( false ), fairing( true ), arrange( false ), subdivision( fairSubdiv_Single ), //DEBUG 2020 25
closed( false ), fairing( fairSmooth_Yes ), arrange( false ), subdivision( fairSubdiv_Single ),
accountCurvature( fairCur_No ), accountInflexVector( fairVector_Tangent ),
fixPntTng( fixPntTng_NotFix ),
//approx( fairApprox_KnotsSpline ), create( 1 ), degreeBSpline( 8 ),
approx( fairApprox_IsoNurbs ), create( 1 ), degreeBSpline( 8 ), //DEBUG 2020 25
approx( fairApprox_IsoNurbs ), create( fairMethod_Polyline ), degreeBSpline( 8 ), //DEBUG 2020 25
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 ),
clothoidRMin( 50.0 ), clothoidLMax( 200.0 ), clothoidSegms( 10 ), numberOfIterationsBSpl( 500 ),
numberOfIterationsVCurve( 192 ),
#ifdef C3D_DEBUG_FAIR_CURVES
prt( nullptr ),
#endif
realAccuracyBSpl( METRIC_ACCURACY ), realAccuracyVCurve( METRIC_EPSILON ),
switchEndTangents( false ), switchEndCurvature( false ),
firstCurvature( 0.0 ), lastCurvature( 0.0 ), smoothTorsion( true ){}
firstCurvature( 0.0 ), lastCurvature( 0.0 ), smoothTorsion( true ),
warning( fwarn_Success ), error( rt_Success ){}
~MbFairCurveData() {}
/// \ru Оператор присваивания. \en Assignment operator.
MbFairCurveData & operator = ( const MbFairCurveData & other )
{
closed = other.closed;
fairing = other.fairing;
arrange = other.arrange;
subdivision = other.subdivision;
accountCurvature = other.accountCurvature;
accountInflexVector = other.accountInflexVector;
approx = other.approx;
create = other.create;
degreeBSpline = other.degreeBSpline;
outFormat = other.outFormat;
nSegments = other.nSegments;
numSegment = other.numSegment;
tParam = other.tParam;;
warning = other.warning;
error = other.error;
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 & operator = ( const MbFairCurveData & other );
// \ru Являются ли объекты равными? \en Determine whether an object is equal?
bool IsEqual( const MbFairCurveData &, double accuracy ) const;
KNOWN_OBJECTS_RW_REF_OPERATORS_EX( MbFairCurveData, MATH_FUNC_EX ) // \ru Для работы со ссылками и объектами класса. \en For working with references and objects of the class.
}; // MbFairCurveData
+27 -2
View File
@@ -736,6 +736,32 @@ enum MbeFairSplineFormat
fairFormat_GB = 3 ///< \ru GB-полигон. \en GB-polygon.
};
//------------------------------------------------------------------------------
/** \brief \ru Управление построением гладких кривых на базе трехмерной ломаной. Сглаживание.
\en Construction of smooth curves based on a three-dimensional polyline. Smoothing. \~
\ingroup Data_Structures
*/
// ---
enum MbeFairSmoothing
{
fairSmooth_No = 0, ///< \ru Без сглаживания. \en Disable smoothing.
fairSmooth_Yes = 1, ///< \ru Со сглаживанием. \en Enable smoothing.
fairSmooth_FixAng = 2, ///< \ru Со сглаживанием и исправлением острых углов. \en Enable smoothing and correct acute angles.
};
//------------------------------------------------------------------------------
/** \brief \ru Способ построения плавной кривой. \en Creation method of fair curve. \~
\ingroup Data_Structures
*/
// ---
enum MbeFairMethod
{
fairMethod_Polyline = 1, ///< \ru На опорной ломаной. \en On base polyline.
fairMethod_Tangent = 2, ///< \ru На касательных. \en On tangents.
fairMethod_GDHermite = 3, ///< \ru На ГО Эрмита с кривизнами. \en On GD Hermite with curvatures.
};
//------------------------------------------------------------------------------
/** \brief \ru Предупреждения построения плавной кривой. \en Warnings of fair curve creation. \~
\ingroup Data_Structures
@@ -766,12 +792,11 @@ enum MbeFairWarning
/// \ru Форма поверхности заметания переменного сечения. \en The swept surface cross-section shape. \~
// ---
enum MbeSectionShape {
cs_Cycle = 0, ///< \ru Окружность или её дуга в сечении. \en The section is circle or arc.
cs_Round = 0, ///< \ru Окружность или её дуга в сечении. \en The section is circle or arc.
cs_Linea = 1, ///< \ru Отрезок прямой в сечении. \en The section is line segment.
cs_Conic = 2, ///< \ru Кривая второго порядка в сечении. \en The section is conic curve.
cs_Cubic = 3, ///< \ru Кубическая кривая в сечении. \en The section is cubic curve.
cs_Shape = 4, ///< \ru Сплайн определяет форму сечения. \en The section is spline.
cs_Round = 5, ///< \ru Скругление определяет форму сечения. \en The section is fillet.
}; // MbeSectionShape
+19 -6
View File
@@ -663,10 +663,12 @@ ptrdiff_t DefineKnotsVector( ptrdiff_t degree, bool closed, ptrdiff_t uppPointsI
\en B-spline degree. \~
\param[in] closed - \ru Признак замкнутости.
\en A closedness attribute. \~
\param[in] count - \ru Количество точек.
\en Number of points. \~
\param[in] count - \ru Количество точек.
\en Number of points. \~
\param[in] params - \ru Параметры точек (для замкнутого count+1).
\en Points parameters (for closed spline - "count"+1). \~
\param[in] kMode - \ru Способ построения узлового вектора при наличии параметров.
\en A method for constructing a knot vector in the presence of parameters. \~
\param[out] knots - \ru Узловой вектор.
\en Knots vector. \~
\return \ru true, если набор параметров сформирован.
@@ -679,6 +681,7 @@ bool DefineKnotsVector( size_t degree,
bool closed,
size_t count,
const ParamsVector * paramsPtr,
size_t kMode,
KnotsVector & knots )
{
bool isDone = false;
@@ -736,14 +739,24 @@ bool DefineKnotsVector( size_t degree,
}
}
else {
size_t d_2 = degree % 2;
size_t i_2 = degree / 2;
for ( size_t i = 0; i < knotsCount; ++i ) {
if ( i < degree )
knot = pmin;
else if ( i < count ) {
knot = 0.0;
for ( size_t j = i - degree + 1; j < i; ++j )
knot += params[j];
knot /= (double)(degree - 1);
if ( kMode == 0 ) { // \ru Усреднение ближайших параметров в узловом векторе. \en Averaging of the nearest parameters for the knots vector.
knot = 0.0;
for ( size_t j = i - degree + 1; j < i; ++j )
knot += params[j];
knot /= (double)(degree - 1);
}
else { // \ru Использование параметров в узловом векторе. \en Using parameters for the knots vector.
if ( d_2 == 0 )
knot = params[i - i_2];
else
knot = ( params[i - 1 - i_2] + params[i - i_2] ) * c3d::ONE_HALF;
}
}
else
knot = pmax;
+24 -2
View File
@@ -395,13 +395,35 @@ public: /** \}
/// \ru Инвертировать. \en Invert.
void Invert( MbMatrix * = nullptr );
/// \ru Найти ближайшую точку пересечения с линией. \en Find the nearest point of intersection with line.
bool LineIntersectionPoint( const MbCartPoint3D & pc, const MbVector3D & axis, MbCartPoint3D & p, double & d, double eps = ANGLE_EPSILON ) const;
//------------------------------------------------------------------------------
/** \brief \ru Найти ближайшую точку пересечения с линией.
\en Find the nearest point of intersection with line. \~
\details \ru Найти ближайшую точку пересечения с линией. Линия задана своими начальной точкой и направляющим вектором: p(d) = origin + d * direction.\n
\en Find the nearest point of intersection with a line. The line is set by its origin and direction: p(d) = origin + d * direction.\n \~
\param[in] origin - \ru Начальная точка исходной линии.
\en The origin of the input line. \~
\param[in] direction - \ru Направляющий вектор исходной линии.
\en The direction of the input line. \~
\param[out] p - \ru Найденная точка пересечения.
\en The found intersection point. \~
\param[out] d - \ru Параметр точки пересечения на линии.
\en A parameter of the intersection point along the line. \~
\param[in] eps - \ru Толерантность, при которой линия будет считаться параллельной плоскости.
\en A tolerance determining the situation when the line is parallel to the plane. \~
\result \ru Возвращает true, если пересечение найдено.
\en Returns true if the intersection point has been found. \~
\ingroup Mathematic_Base_3D
*/
// ---
bool LineIntersectionPoint( const MbCartPoint3D & origin, const MbVector3D & direction, MbCartPoint3D & p, double & d, double eps = ANGLE_EPSILON ) const;
/// \ru Получить точку и направление линии пересечения плоскостей. \en Get the point and direction of planes intersection line.
bool PlanesIntersection ( const MbPlacement3D & place, MbCartPoint3D & p, MbVector3D & axis, double eps = ANGLE_EPSILON ) const;
/// \ru Нахождение точки пересечения плоскости XY и кривой. \en Intersection plane XY with a curve.
MbeNewtonResult CurveIntersectNewton( const MbCurve3D & curve, bool ext, double funcEpsilon, size_t iterLimit,
double & u, double & v, double & t ) const;
/// \ru Вычислить параметры ближайших точек плоскости XY и кривой. \en Calculate parameters of the nearest points of surface and curve. \~
MbeNewtonResult NearestPoints( const MbCurve3D & curve, bool ext, double & u0, double & v0,
double & t0, double & dmin, bool tCalc ) const;
/// \ru Преобразовать 2D-точки в другую 2D-точку. \en Transform 2D-point to another 2D-point.
void TransformPoint ( const MbMatrix3D &, MbCartPoint & ) const;
+28 -28
View File
@@ -24,76 +24,76 @@ class MATH_CLASS MbFaceShell;
//------------------------------------------------------------------------------
/** \brief \ru Точность построения объектов.
\en The accuracy of object construction. \~
\details \ru Класс содержит заданную точность и достигнутую точность построения граней, рёбер и вершин. \n
\en The class contains the specified accuracy and the achieved accuracy of the construction of faces, edges and vertices. \n \~
\en The precision of object construction. \~
\details \ru Класс содержит метрическую и угловую точность построения объектов. \n
\en The class contains the metric and angular precision of object construction. \n \~
\ingroup Build_Parameters
*/
// ---
class MATH_CLASS MbAccuracy {
class MATH_CLASS MbPrecision {
protected:
double precision; ///< \ru Заданная метрическая точность построения объектов. \en The metric accuracy of the construction of objects.
double deviation; ///< \ru Заданная уловая точность построения объектов. \en The angular accuracy of the construction of objects.
double accuracy; ///< \ru Точность построенных поверхностей. \en The accuracy of the constructed faces (surfaces).
double precision; ///< \ru Заданная метрическая точность построения объектов. \en The metric precision of the construction of objects.
double deviation; ///< \ru Заданная уловая точность построения объектов. \en The angular precision of the construction of objects.
double tolerance; ///< \ru Толерантность построенных объектов. \en The tolerance of the constructed objects.
public:
/// \ru Конструктор по умолчанию. \en Default constructor.
MbAccuracy()
MbPrecision()
: precision( METRIC_PRECISION )
, deviation( ANGLE_REGION )
, accuracy ( METRIC_PRECISION )
, tolerance( METRIC_EPSILON )
{}
/// \ru Конструктор по заданной точности. \en Constructor by the specified accuracy.
MbAccuracy( double _precision )
/// \ru Конструктор по заданной точности. \en Constructor by the specified precision.
MbPrecision( double _precision )
: precision( _precision )
, deviation( _precision )
, accuracy ( METRIC_PRECISION )
, tolerance( METRIC_EPSILON )
{}
/// \ru Конструктор копирования. \en Copy-constructor.
MbAccuracy( const MbAccuracy & other )
MbPrecision( const MbPrecision & other )
: precision( other.precision )
, deviation( other.deviation )
, accuracy ( other.accuracy )
, tolerance( other.tolerance )
{}
/// \ru Деструктор. \en Destructor.
~MbAccuracy() {}
~MbPrecision() {}
public:
/// \ru Функция инициализации. \en Initialization function.
void Init( const MbAccuracy & other ) {
void Init( const MbPrecision & other ) {
precision = other.precision;
deviation = other.deviation;
accuracy = other.accuracy;
tolerance = other.tolerance;
}
/// \ru Функция инициализации. \en Initialization function.
void Init( double _precision ) {
precision = _precision;
deviation = METRIC_EPSILON;
accuracy = METRIC_EPSILON;
tolerance = METRIC_EPSILON;
}
/// \ru Оператор присваивания. \en Assignment operator.
MbAccuracy & operator = ( const MbAccuracy & other ) {
MbPrecision & operator = ( const MbPrecision & other ) {
precision = other.precision;
deviation = other.deviation;
accuracy = other.accuracy;
tolerance = other.tolerance;
return *this;
}
/// \ru Являются ли объекты равными? \en Determine whether an object is equal?
bool IsSame( const MbAccuracy & other, double accuracy ) const;
bool IsSame( const MbPrecision & other, double accuracy ) const;
/// \ru Получить точность. \en Get accuracy.
/// \ru Получить точность. \en Get precision.
double GetPrecision() const { return precision; }
double GetDeviation() const { return deviation; }
double GetAccuracy() const { return accuracy; }
double GetTolerance() const { return tolerance; }
/// \ru Установить точность. \en Set accuracy.
/// \ru Установить точность. \en Set precision.
void SetPrecision( double a ) { precision = a; }
void SetDeviation( double a ) { deviation = a; }
void SetAccuracy ( double a ) { accuracy = a; }
void SetTolerance( double a ) { tolerance = a; }
KNOWN_OBJECTS_RW_REF_OPERATORS( MbAccuracy ) // \ru Для работы со ссылками и объектами класса. \en For working with references and objects of the class.
DECLARE_NEW_DELETE_CLASS( MbAccuracy )
DECLARE_NEW_DELETE_CLASS_EX( MbAccuracy )
KNOWN_OBJECTS_RW_REF_OPERATORS( MbPrecision ) // \ru Для работы со ссылками и объектами класса. \en For working with references and objects of the class.
DECLARE_NEW_DELETE_CLASS( MbPrecision )
DECLARE_NEW_DELETE_CLASS_EX( MbPrecision )
};
+92 -40
View File
@@ -187,67 +187,119 @@ OBVIOUS_PRIVATE_COPY( MbSurfaceOffsetCurveParams )
\en Under development. \~
*/
// ---
class MATH_CLASS MbCurveExtensionParameters
class MATH_CLASS MbCurveExtensionValues
{
private:
bool startBoundary; ///< \ru Расширяемая граница (true - начало кривой, false - ее конец). По умолчанию false. \en The boundary to extend (it is the start point if the value is true and the end point if the value is false). The default value is false. \~
MbeCurveExtensionWays extensionWay; ///< \ru Способ продления. По умолчанию не определен. \en The way to extend. The default value is Undefined. \~
double extensionLength; ///< \ru Длина продления (в метрическом диапазоне). Всегда неотрицательна. По умолчанию 0.0. \en The length to extend (in metric range). It is always not negative. The default value is 0.0. \~
protected:
bool _startBoundary; ///< \ru Расширяемая граница (true - начало кривой, false - ее конец). По умолчанию false. \en The boundary to extend (it is the start point if the value is true and the end point if the value is false). The default value is false. \~
MbeCurveExtensionWays _extensionWay; ///< \ru Способ продления. По умолчанию не определен. \en The way to extend. The default value is Undefined. \~
double _extensionLength; ///< \ru Длина продления (в метрическом диапазоне). Всегда неотрицательна. По умолчанию 0.0. \en The length to extend (in metric range). It is always not negative. The default value is 0.0. \~
public:
/** \brief \ru Конструктор.
\en Constructor. \~
\details \ru Конструктор по умолчанию.
\en Default constructor. \~
*/
MbCurveExtensionParameters()
{
Clear();
}
MbCurveExtensionValues();
//------------------------------------------------------------------------------
/** \brief \ru Конструктор.
\en Constructor. \~
\details \ru Конструктор по параметрам.
\en Constructor by parameters. \~
\param[in] extWay - \ru способ продления кривой.
\en The way to extend the curve. \~
\param[in] extLength - \ru Длина (в метрическом пространстве), на которую продлевается кривая.
\en The length (in metric space) the curve extended to. \~
\param[in] toStart - \ru Удлиняемая часть: начало кривой (toStart = true) или ее конец (toStart = false).
\en The extended part: begin of the curve (toStart = true) or its end (toStart = false). \~
*/
// ---
MbCurveExtensionValues( const MbeCurveExtensionWays extWay,
const double extLength,
const bool toStart );
/// \ru Конструктор копирования. \en Copy constructor. \~
MbCurveExtensionValues( const MbCurveExtensionValues & other );
/// \ru Возврат к параметрам по умолчанию. \en Coming back to the default parameters. \~
void Clear()
{
startBoundary = false;
extensionWay = MbeCurveExtensionWays::cew_Undefined;
extensionLength = 0.0;
}
void Clear();
/// \ru Вернуть true, если *this == other. \en Return true if *this == other. \~
bool IsEqual( const MbCurveExtensionParameters & other, const double accuracy = Math::metricEpsilon ) const
{
if ( (startBoundary == other.startBoundary) &&
(extensionWay == other.extensionWay) &&
::fabs(extensionLength - other.extensionLength) < accuracy ) {
return true;
}
bool IsEqual( const MbCurveExtensionValues & other, const double accuracy = Math::metricEpsilon ) const;
return false;
}
/// \ru Оператор присваивания. \en Assignment operator. \~
MbCurveExtensionParameters & operator=( const MbCurveExtensionParameters & other )
{
startBoundary = other.startBoundary;
extensionWay = other.extensionWay;
extensionLength = other.extensionLength;
return *this;
}
/// \ru Задать удлиняемую часть: начало кривой (toStart = true) или ее конец (toStart = false)? \en Set the extended part: begin of the curve (toStart = true) or its end (toStart = false). \~
void SetExtendToStart( const bool toStart ) { startBoundary = toStart; }
MbCurveExtensionValues & operator=( const MbCurveExtensionValues & other );
//------------------------------------------------------------------------------
/** \brief \ru Задание входных параметров алгоритма.
\en Initialize of input parameters. \~
\details \ru Задание входных параметров алгоритма.
\en Initialize of input parameters. \~
\param[in] extWay - \ru способ продления кривой.
\en The way to extend the curve. \~
\param[in] extLength - \ru Длина (в метрическом пространстве), на которую продлевается кривая.
\en The length (in metric space) the curve extended to. \~
\param[in] toStart - \ru Удлиняемая часть: начало кривой (toStart = true) или ее конец (toStart = false).
\en The extended part: begin of the curve (toStart = true) or its end (toStart = false). \~
*/
// ---
void Init( const MbeCurveExtensionWays extWay,
const double extLength,
const bool toStart );
/// \ru Вернуть true, если удлиняемая часть в начале кривой или false, если в конце. \en Return true if the extended part is in the curve begin or false if it is in the curve end. \~
bool GetExtendToStart() const { return startBoundary; }
bool GetExtendToStart() const { return _startBoundary; }
/// \ru Задать способ продления кривой. \en Set the way to extend the curve. \~
void SetWayToExtend( const MbeCurveExtensionWays newValue ) { extensionWay = newValue; }
/// \ru Текущий способ продления кривой. \en The Current way to extend the curve. \~
MbeCurveExtensionWays GetWayToExtend() const { return extensionWay; }
MbeCurveExtensionWays GetWayToExtend() const { return _extensionWay; }
/// \ru Задать длину (в метрическом пространстве), на которую продлевается кривая. \en Set the length (in metric space) the curve extended to. \~
void SetExtensionLength( const double newLength ) { extensionLength = ::fabs( newLength ); }
/// \ru Текущая длина (в метрическом пространстве), на которую продлевается кривая. \en Current length (in metric space) the curve extended to. \~
double GetExtensionLength() const { return extensionLength; }
double GetExtensionLength() const { return _extensionLength; }
/// \ru Проверить корректность параметров. Вернуть код ошибки или rt_Success, если все хорошо. \en Check the parameters validity. Return the error code or rt_Success if all is OK. \~
MbResultType CheckValid() const;
private:
/// \ru Инициализировать объект другим объектом. \en Initialize this object by another one. \~
void InitByCopy( const MbCurveExtensionValues & other );
KNOWN_OBJECTS_RW_REF_OPERATORS( MbCurveExtensionValues ) // \ru Для работы со ссылками и объектами класса. \en For working with references and objects of the class.
};
//-------------------------------------------------------------------------------
/** \brief \ru Исходные данные для операции продления кривой.
\en Input data for the curve extension operation. \~
\details \ru Исходные данные для операции продления кривой.
\en Input data for the curve extension operation. \~
\ingroup Data_Structures
\warning \ru В разработке.
\en Under development. \~
*/
// ---
class MATH_CLASS MbCurveExtensionParameters
{
protected:
MbCurveExtensionValues _parameters; ///< \ru Параметры операции. \en Operation parameters. \~
c3d::SNameMakerSPtr _operName; ///< \ru Именователь операции. \en An object defining names generation in the operation. \~
public:
/// \ru Конструктор по параметрам. \en Constructor by parameters. \~
MbCurveExtensionParameters( const MbCurveExtensionValues & par, const MbSNameMaker & operName );
/// \ru Конструктор копирования. \en Copy constructor. \~
MbCurveExtensionParameters( const MbCurveExtensionParameters & other );
/// \ru Получить именователь операции. \en Get the object defining names generation in the operation. \~
const MbCurveExtensionValues & GetOperationParameters() const { return _parameters; }
/// \ru Получить именователь операции. \en Get the object defining names generation in the operation. \~
const c3d::SNameMakerSPtr & GetNameMaker() const { return _operName; }
/// \ru Оператор присваивания. \en Assignment operator. \~
MbCurveExtensionParameters & operator=( const MbCurveExtensionParameters & other );
};
File diff suppressed because it is too large Load Diff
+221 -117
View File
@@ -18,6 +18,7 @@
#include <mb_enum.h>
#include <mb_vector3d.h>
#include <mb_axis3d.h>
#include <op_binding_data.h>
#include <cur_contour.h>
#include <cur_contour3d.h>
#include <surface.h>
@@ -1528,27 +1529,31 @@ private:
class MATH_CLASS MbSectionRail {
private:
std::vector<MbCurveEdge *> edges; ///< \ru Направляющие рёбра (могут отсутствовать). \en The guide edges (may be empty).
std::vector<bool> edgeSide; ///< \ru С какой гранью ребра гладко стыковать поверхность (синхронно с edges). \en What face of edge should the surface join smoothly to (synchronously with edges).
std::vector<MbFace *> faces; ///< \ru Опорные грани (могут отсутствовать). \en The reference faces (may be empty).
std::vector<bool> faceSide; ///< \ru С каких сторон касаться поверхностей при form==cs_Linea (синхронно с faces). \en On which sides to touch surfaces when form==cs_Linea (synchronously with faces).
std::vector<MbCurve3D *> curves; ///< \ru Направляющие кривые (могут отсутствовать). \en The guide curves (may be empty).
MbCurve3D * track; ///< \ru Кривая, через которую должно пройти сечение (может отсутствовать). \en The curve that the section should pass through (may be nullptr).
MbFunction * angle; ///< \ru Функция угла наклона или длины (может отсутствовать). \en The function of the angle of inclination or of the length (may be nullptr).
ThreeStates state; ///< \ru Как использовать angle: угол к хорде или направлению (ts_neutral), отклонение от касательной поверхности (ts_positive), отклонение от нормали к поверхности (ts_negative).
///< \en How to use angle: the angle to chord or to direction (ts_neutral), deviation from tangent surface (ts_positive), deviation from normal to surface (ts_negative).
std::vector<c3d::EdgeSPtr> edges; ///< \ru Направляющие рёбра (могут отсутствовать). \en The guide edges (may be empty).
std::vector<bool> edgeSide; ///< \ru С какой гранью ребра гладко стыковать поверхность (синхронно с edges). \en What face of edge should the surface join smoothly to (synchronously with edges).
std::vector<MbEdgeFacesIndexes> edgeIndex; ///< \ru Номера направляющих рёбер (могут отсутствовать). \en The guide edge numbers (may be empty).
std::vector<c3d::FaceSPtr> faces; ///< \ru Опорные грани (могут отсутствовать). \en The reference faces (may be empty).
std::vector<bool> faceSide; ///< \ru С каких сторон касаться поверхностей при form==cs_Linea (синхронно с faces). \en On which sides to touch surfaces when form==cs_Linea (synchronously with faces).
std::vector<MbItemIndex> faceIndex; ///< \ru Номера опорных граней. \en The reference face numbers (may be empty).
std::vector<c3d::SpaceCurveSPtr> curves; ///< \ru Направляющие кривые (могут отсутствовать). \en The guide curves (may be empty).
c3d::SpaceCurveSPtr track; ///< \ru Кривая, через которую должно пройти сечение (может отсутствовать). \en The curve that the section should pass through (may be nullptr).
c3d::FunctionSPtr function; ///< \ru Функция угла наклона, или длины, или радиуса (может отсутствовать). \en The function of the angle of inclination, or of the length, or of the fillet radius (may be nullptr).
ThreeStates state; ///< \ru Как использовать function: угол к хорде или направлению (ts_neutral), отклонение от касательной поверхности (ts_positive), отклонение от нормали к поверхности (ts_negative).
///< \en How to use the function: the angle to chord or to direction (ts_neutral), deviation from tangent surface (ts_positive), deviation from normal to surface (ts_negative).
public:
/// \ru Конструктор по умолчанию. \en Empty constructor.
MbSectionRail()
: edges ()
, edgeSide()
, faces ()
, faceSide()
, curves ()
, track ( nullptr )
, angle ( nullptr )
, state( ts_neutral )
: edges ()
, edgeSide ()
, edgeIndex()
, faces ()
, faceSide ()
, faceIndex()
, curves ()
, track ( nullptr )
, function ( nullptr )
, state ( ts_neutral )
{}
/** \brief \ru Конструктор по параметрам.
@@ -1590,11 +1595,14 @@ public:
void GetEdges( RPArray<MbCurveEdge> & eds ) const;
/// \ru Какую сторону кривой гладко стыковать с поверхностью? \en Which side should the surface join smoothly to?
void GetEdgeSide( std::vector<bool> & eSide ) const;
/// \ru Выдать номера направляющих рёбер. \en Get guide edge numbers.
void GetEdgeIndex( std::vector<MbEdgeFacesIndexes> & ads ) const;
std::vector<MbEdgeFacesIndexes> & SetEdgeIndex() { return edgeIndex; }
/// \ru Выдать количество направляющих ребер. \en Get guide edges count.
size_t GetEdgesCount() const { return edges.size(); }
size_t GetEdgeSideCount() const { return edgeSide.size(); }
/// \ru Выдать направляющее ребро. \en Get guide edge.
MbCurveEdge * SetEdge( size_t i ) { return ( i < edges.size() ) ? edges[i] : nullptr; }
MbCurveEdge * SetEdge( size_t i ) { return ( i < edges.size() ) ? edges[i].get() : nullptr; }
/// \ru Установить сторону ребра. \en Set edge side.
void SetEdgeSide( size_t i, bool s ) { if ( i < edgeSide.size() ) edgeSide[i] = s; }
@@ -1605,11 +1613,14 @@ public:
void GetFaces( RPArray<MbFace> & fas ) const;
/// \ru С каких сторон касаться поверхностей? \en On which sides to touch surfaces?
void GetFaceSide( std::vector<bool> & fSide ) const;
/// \ru Выдать номера опорных граней. \en Get reference face numbers.
void GetFaceIndex( std::vector<MbItemIndex> & fas ) const;
std::vector<MbItemIndex> & SetFaceIndex() { return faceIndex; }
/// \ru Выдать количество направляющих граней. \en Get guide faces count.
size_t GetFacesCount() const { return faces.size(); }
size_t GetFaceSideCount() const { return faceSide.size(); }
/// \ru Выдать направляющую грань. \en Get guide face.
MbFace * SetFace( size_t i ) { return ( i < faces.size() ) ? faces[i] : nullptr; }
MbFace * SetFace( size_t i ) { return ( i < faces.size() ) ? faces[i].get() : nullptr; }
/// \ru Установить сторону касания грани. \en Set face side.
void SetFaceSide( size_t i, bool s ) { if ( i < faceSide.size() ) faceSide[i] = s; }
@@ -1622,19 +1633,19 @@ public:
/// \ru Выдать количество дополнительных направляющих кривых. \en Get additional guide curves count.
size_t GetCurvesCount() const { return curves.size(); }
/// \ru Выдать дополнительную направляющую кривую. \en Get additional guide curve.
MbCurve3D * SetCurve( size_t i ) { return ( i < curves.size() ) ? curves[i] : nullptr; }
MbCurve3D * SetCurve( size_t i ) { return ( i < curves.size() ) ? curves[i].get() : nullptr; }
/// \ru Добавить в данные кривую. \en Add curve to data. \~
void SetTrack( MbCurve3D & trk );
/// \ru Выдать кривую, через которую должно пройти сечение. \en Get the curve that the section should pass through.
const MbCurve3D * GetTrack() const { return track; }
MbCurve3D * SetTrack() { return track; }
const MbCurve3D * GetTrack() const { return track.get(); }
MbCurve3D * SetTrack() { return track.get(); }
/// \ru Установить функцию управления сечением. \en Set section control function.
void SetAngle( MbFunction & an, ThreeStates ts );
/// \ru Выдать функцию управления сечением (радиус или дискриминант). \en Get section control function (radius or discriminant).
const MbFunction * GetAngle() const { return angle; }
MbFunction * SetAngle() { return angle; }
const MbFunction * GetAngle() const { return function.get(); }
MbFunction * SetAngle() { return function.get(); }
/// \ru К чему задан угол функции: к хорде, к поверхности, к нормали поверхности. \en What is the angle of the function set to: to the chord, to the surface, to the surface normal.
ThreeStates GetState() const { return state; }
void SetState( ThreeStates st ) { state = st; }
@@ -1652,8 +1663,10 @@ public:
/// \ru Сделать объекты равным. \en Make objects equal. \~
bool SetEqual ( const MbSectionRail & other );
// Дать любую точку и ориентировочную длину.
// \ru Дать любую точку и ориентировочную длину. \en Give any point and approximate length. \~
double GetAnyPopint( MbCartPoint3D & p0 );
/// \ru Найти номера рёбер и граней в оболочке. \en Find the numbers of edges and faces in the shell. \~
bool FindIndex( const MbFaceShell & shell );
/// \ru Оператор присваивания без копирования данных. \en Assignment operator without copying.
void operator = ( const MbSectionRail & other );
@@ -1675,10 +1688,10 @@ public:
// ---
struct MATH_CLASS MbSectionRule {
public:
MbFunction * discr; ///< \ru Функция управления сечением (дискриминант или радиус, может быть nullptr). \en Section control function (discriminant or radius).
MbCurve3D * track; ///< \ru Кривая, через которую должно пройти сечение. \en The curve that the section should pass through.
MbSurface * touch; ///< \ru Поверхность, которой должно касаться сечение. \en The surface that the section should touch.
MbFaceShell * shell; ///< \ru Оболочка, которой должно касаться сечение. \en The shell that the section should touch.
c3d::FunctionSPtr discr; ///< \ru Функция управления сечением (дискриминант или радиус, может быть nullptr). \en Section control function (discriminant or radius).
c3d::SpaceCurveSPtr track; ///< \ru Кривая, через которую должно пройти сечение. \en The curve that the section should pass through.
c3d::SurfaceSPtr touch; ///< \ru Поверхность, которой должно касаться сечение. \en The surface that the section should touch.
c3d::ShellSPtr shell; ///< \ru Оболочка, которой должно касаться сечение. \en The shell that the section should touch.
public:
/// \ru Конструктор по умолчанию. \en Empty constructor.
@@ -1701,20 +1714,20 @@ public:
public:
/// \ru Выдать функцию управления сечением. \en Get section control function.
const MbFunction * GetFunction() const { return discr; }
const MbFunction * GetFunction() const { return discr.get(); }
/// \ru Установить функцию управления сечением. \en Set section control function.
void SetFunction( MbFunction & f );
void SetFunction( double f );
/// \ru Выдать кривую управления сечением. \en Get section control curve.
const MbCurve3D * GetCurve() const { return track; }
const MbCurve3D * GetCurve() const { return track.get(); }
/// \ru Установить кривую управления сечением. \en Set section control curve.
void SetCurve( MbCurve3D & c );
/// \ru Выдать поверхность управления сечением. \en Get section control surface.
const MbSurface * GetSurface() const { return touch; }
const MbSurface * GetSurface() const { return touch.get(); }
/// \ru Установить поверхность управления сечением. \en Set section control surface.
void SetSurface( MbSurface & s );
/// \ru Выдать оболочку управления сечением. \en Get section control shell.
const MbFaceShell * GetShell() const { return shell; }
const MbFaceShell * GetShell() const { return shell.get(); }
/// \ru Установить оболочку управления сечением. \en Set section control shell.
void SetShell( MbFaceShell & s );
@@ -1785,23 +1798,24 @@ public:
\ingroup Build_Parameters
*/
// ---
class MATH_CLASS MbSectionData {
class MATH_CLASS MbSectionData : public MbPrecision {
private:
MbCurve3D * spine; ///< \ru Опорная кривая. \en The reference curve.
MbeSectionShape form; ///< \ru Форма сечения поверхности. \en The surface cross-section shape.
MbSectionRail rail1; ///< \ru Данные начального края сечения. \en The data of the begining of section.
MbSectionRail rail2; ///< \ru Данные конечного края сечения. \en The data of the end of section.
MbCurve3D * apexCurve; ///< \ru Кривая вершин (может отсутствовать). \en The apex curve (may be nullptr).
MbSectionRule descript; ///< \ru Функция управления сечением поверхности (радиус или дискриминант, может быть nullptr). \en The section control function (radius or discriminant).
MbPolyCurve * pattern; ///< \ru Образующая кривая при form==cs_Shape (для других форм nullptr). \en Forming curve for form==cs_Shape (nullptr on other case).
MbVector3D direction; ///< \ru Направление, от которого отсчитывается угол при form==cs_Linea. \en The direction from which the angle is calculated when form==cs_Linea.
double uMin; ///< \ru Минимальное значение первого параметра. \en Minimal value of the first parameter.
double uMax; ///< \ru Максимальное значение первого параметра. \en Maximal value of the first parameter.
double buildSag; ///< \ru Угловое отклонение при движении по кривым и поверхностям. \en Angular deviation while moving along curves and surfaces.
double accuracy; ///< \ru Точность построения толерантных объектов. \en An accuracy of building tolerant objects.
uint32 count; ///< \ru Минимальное количество шагов по опорной кривой. \en Minimum number of steps along the reference curve.
bool check; ///< \ru Проверять самопересечение построенной поверхности. \en Check the self-intersection of the constructed surface (default false).
c3d::SpaceCurveSPtr spine; ///< \ru Опорная кривая. \en The reference curve.
MbeSectionShape form; ///< \ru Форма сечения поверхности. \en The surface cross-section shape.
MbSectionRail rail1; ///< \ru Данные начального края сечения. \en The data of the begining of section.
MbSectionRail rail2; ///< \ru Данные конечного края сечения. \en The data of the end of section.
c3d::SpaceCurveSPtr apexCurve; ///< \ru Кривая вершин (может отсутствовать). \en The apex curve (may be nullptr).
MbSectionRule descript; ///< \ru Функция управления сечением поверхности (радиус или дискриминант, может быть nullptr). \en The section control function (radius or discriminant).
SPtr<MbPolyCurve> pattern; ///< \ru Образующая кривая при form==cs_Shape (для других форм nullptr). \en Forming curve for form==cs_Shape (nullptr on other case).
MbVector3D direction; ///< \ru Направление, от которого отсчитывается угол при form==cs_Linea. \en The direction from which the angle is calculated when form==cs_Linea.
double uMin; ///< \ru Минимальное значение первого параметра. \en Minimal value of the first parameter.
double uMax; ///< \ru Максимальное значение первого параметра. \en Maximal value of the first parameter.
double buildSag; ///< \ru Угловое отклонение при движении по кривым и поверхностям. \en Angular deviation while moving along curves and surfaces.
double accuracy; ///< \ru Точность построения толерантных объектов. \en An accuracy of building tolerant objects.
uint32 count; ///< \ru Минимальное количество шагов по опорной кривой. \en Minimum number of steps along the reference curve.
bool check; ///< \ru Проверять самопересечение построенной поверхности. \en Check the self-intersection of the constructed surface (default false).
MbSNameMaker nameMaker; ///< \ru Именователь новых граней операции. \en An object defining names generation in the operation.
public:
/// \ru Конструктор по умолчанию. \en Empty constructor.
@@ -1823,6 +1837,8 @@ public:
\en Section control function (may be nullptr). \~
\param[in] patt - \ru Образующая кривая (может быть nullptr).
\en Forming curve (may be nullptr). \~
\param[in] names - \ru Именователь новых граней операции.
\en An object defining names generation in the operation. \~
*/
MbSectionData( MbCurve3D & sp,
MbeSectionShape f,
@@ -1830,7 +1846,8 @@ public:
MbSectionRail & r2,
MbCurve3D * ap,
MbSectionRule & desc,
MbPolyCurve * patt );
MbPolyCurve * patt,
const MbSNameMaker & names );
/// \ru Конструктор копирования. \en Copy-constructor.
MbSectionData( const MbSectionData & other );
/// \ru Конструктор копирования. \en Copy-constructor.
@@ -1842,11 +1859,11 @@ public:
/// \ru Установить опорную кривую. \en Set reference curve.
void SetSpine( MbCurve3D & s );
//< \ru Установить вектор направления опорной кривой (если spine==nullptr). \en Set the direction vector of the reference curve (if spine= = nullptr).
/// \ru Установить вектор направления опорной кривой (если spine==nullptr). \en Set the direction vector of the reference curve (if spine= = nullptr).
void SetSpine( const MbVector3D & a );
/// \ru Выдать опорную кривую. \en Get reference curve.
const MbCurve3D * GetSpine() const { return spine; }
MbCurve3D * SetSpine() { return spine; }
const MbCurve3D * GetSpine() const { return spine.get(); }
MbCurve3D * SetSpine() { return spine.get(); }
/// \ru Выдать форму сечения поверхности. \en Get cross-section shape.
MbeSectionShape GetForm() const { return form; }
@@ -1871,6 +1888,10 @@ public:
void GetEdgeSide1( std::vector<bool> & eSide ) const { rail1.GetEdgeSide( eSide ); }
/// \ru Какую сторону кривой гладко стыковать с поверхностью? \en Which side should the surface join smoothly to?
void GetEdgeSide2( std::vector<bool> & eSide ) const { rail2.GetEdgeSide( eSide ); }
/// \ru Выдать номера направляющих рёбер. \en Get guide edge numbers.
void GetEdgeIndex1( std::vector<MbEdgeFacesIndexes> & eds ) const { rail1.GetEdgeIndex( eds ); }
void GetEdgeIndex2( std::vector<MbEdgeFacesIndexes> & eds ) const { rail2.GetEdgeIndex( eds ); }
std::vector<MbEdgeFacesIndexes> & SetEdgeIndex( size_t i ) { return ( (i == 1) ? rail1.SetEdgeIndex() : rail2.SetEdgeIndex() ); }
/// \ru Выдать количество направляющих ребер. \en Get guide edges count.
size_t GetEdgesCount1() const { return rail1.GetEdgesCount(); }
size_t GetEdgesCount2() const { return rail2.GetEdgesCount(); }
@@ -1894,6 +1915,10 @@ public:
void GetFaceSide1( std::vector<bool> & fSide ) const { rail1.GetFaceSide( fSide ); }
/// \ru С каких сторон касаться поверхностей? \en On which sides to touch surfaces?
void GetFaceSide2( std::vector<bool> & fSide ) const { rail2.GetFaceSide( fSide ); }
/// \ru Выдать номера опорных граней. \en Get reference face numbers.
void GetFaceIndex1( std::vector<MbItemIndex> & fas ) const { rail1.GetFaceIndex( fas ); }
void GetFaceIndex2( std::vector<MbItemIndex> & fas ) const { rail2.GetFaceIndex( fas ); }
std::vector<MbItemIndex> & SetFaceIndex( size_t i ) { return ( (i == 1) ? rail1.SetFaceIndex() : rail2.SetFaceIndex() ); }
/// \ru Выдать количество направляющих граней. \en Get guide faces count.
size_t GetFacesCount1() const { return rail1.GetFacesCount(); }
size_t GetFacesCount2() const { return rail2.GetFacesCount(); }
@@ -1955,9 +1980,9 @@ public:
/// \ru Добавить в данные кривую вершин. \en Set apex curve. \~
void SetApexCurve( MbCurve3D & curv );
/// \ru Выдать кривую вершин. \en Get apex curve.
MbCurve3D * SetApexCurve() { return apexCurve; }
MbCurve3D * SetApexCurve() { return apexCurve.get(); }
/// \ru Выдать кривую вершин. \en Get apex curve.
const MbCurve3D * GetApexCurve() const { return apexCurve; }
const MbCurve3D * GetApexCurve() const { return apexCurve.get(); }
/// \ru Выдать данные управления сечением. \en Get section control data.
const MbSectionRule & GetSectionRule() const { return descript; }
@@ -1976,12 +2001,13 @@ public:
const MbFaceShell * GetDescriptShell() const { return descript.GetShell(); }
/// \ru Выдать образующую кривую. \en Get forming curve.
const MbPolyCurve * GetPattern() const { return pattern; }
MbPolyCurve * SetPattern() { return pattern; }
const MbPolyCurve * GetPattern() const { return pattern.get(); }
MbPolyCurve * SetPattern() { return pattern.get(); }
/// \ru Установить образующую кривую. \en Set forming curve.
void SetPattern( MbPolyCurve & p );
/// \ru Выдать направление, от которого отсчитывается угол. \en Get the direction from which the angle is calculated.
const MbVector3D & GetDirection() const { return direction; }
MbVector3D & SetDirection() { return direction; }
/// \ru Установить направление, от которого отсчитывается угол. \en Set the direction from which the angle is calculated.
void SetDirection( const MbVector3D & dir ) { direction = dir; }
@@ -1993,15 +2019,18 @@ public:
void SetUParams( double u1, double u2 );
/// \ru Угловое отклонение при движении по кривым и поверхностям. \en Angular deviation while moving along curves and surfaces.
double GetBuildSag() const { return buildSag; }
///< \ru Точность построения толерантных объектов. \en An accuracy of building tolerant objects.
/// \ru Точность построения толерантных объектов. \en An accuracy of building tolerant objects.
double GetAccuracy() const { return accuracy; }
void SetAccuracy( double acc );
///< \ru Минимальное количество шагов по опорной кривой. \en Minimum number of steps along the reference curve.
/// \ru Минимальное количество шагов по опорной кривой. \en Minimum number of steps along the reference curve.
uint32 GetCount() const { return count; }
void SetCount( uint32 c );
///< \ru Проверять самопересечение построенной поверхности. \en Check the self-intersection of the constructed surface.
/// \ru Проверять самопересечение построенной поверхности. \en Check the self-intersection of the constructed surface.
bool GetCheck() const { return check; }
void SetCheck( bool c );
/// \ru Выдать именователь операции. \en Get an object defining names generation in the operation.
const MbSNameMaker & GetNameMaker() const { return nameMaker; }
void SetNameMaker( const MbSNameMaker & nm ) { nameMaker.SetNameMaker( nm, true ); }
/// \ru Преобразовать объект. \en Transform the object. \~
void Transform( const MbMatrix3D & matr, MbRegTransform * iReg = nullptr );
@@ -2015,6 +2044,8 @@ public:
bool IsSimilar( const MbSectionData & other ) const;
/// \ru Сделать объекты равным. \en Make objects equal. \~
bool SetEqual ( const MbSectionData & other );
// \ru Найти номера рёбер и граней в оболочке. \en Find the numbers of edges and faces in the shell. \~
bool FindIndex( const MbFaceShell & shell );
/// \ru Оператор присваивания без копирования данных. \en Assignment operator without copying.
void operator = ( const MbSectionData & other );
@@ -2025,75 +2056,148 @@ public:
//------------------------------------------------------------------------------
/** \brief \ru Данные о поверхности переменного сечения.
\en Data about swept mutable section surface. \~
\details \ru Данные содержат номера рёбер и граней исходной оболочки, на которых строится поверхность.
\en The data contains the numbers of edges and faces of the original shell on which the surface is built.
\ingroup Model_Creators
/** \brief \ru Данные фантома для торца поверхности переменного сечения.
\en The parameters of form-generating operation. \~
\details \ru Данные фантома содержат точки и направления сторон охватывающего треугольника. \n
\en The phantom data contains the points and directions of the flank of the enclosing triangle. \~
\ingroup Build_Parameters
*/
// ---
class MATH_CLASS MbSectionCode {
private:
SArray<MbEdgeFacesIndexes> edgeIndex1; ///< \ru Номера рёбер первой направляющей кривой. \en The edge numbers of the first guide curve.
SArray<MbItemIndex> faceIndex1; ///< \ru Номера граней первой направляющей поверхности. \en The face numbers of the first guide surface.
SArray<MbEdgeFacesIndexes> edgeIndex2; ///< \ru Номера рёбер второй направляющей кривой. \en The edge numbers of the second guide curve.
SArray<MbItemIndex> faceIndex2; ///< \ru Номера граней второй направляющей поверхности. \en The face numbers of the second guide surface.
public:
struct MATH_CLASS MbSectionLayout {
public :
MbPlacement3D place; ///< \ru Плоскость охватывающего треугольника (XY) на краю поверхности. \en The plane of the enclosing triangle (XY) at the flank of the surface. \~
MbCartPoint3D point1; ///< \ru Точка пересечения первой направляющей кривой и плоскости XY. \en The intersection point of the first guide curve ans XY plane. \~
MbCartPoint3D point2; ///< \ru Точка пересечения второй направляющей кривой и плоскости XY. \en The intersection point of the second guide curve ans XY plane. \~
MbVector3D vector1; ///< \ru Вектор направления от первой направляющей к вершине охватывающего треугольника. \en The direction vector from the first guide point to the vertex of the enclosing triangle. \~
MbVector3D vector2; ///< \ru Вектор направления от второй направляющей к вершине охватывающего треугольника. \en The direction vector from the second guide point to the vertex of the enclosing triangle. \~
MbCartPoint3D apex; ///< \ru Точка пересечения вершинной кривой и плоскости XY - является вершиной охватывающего треугольника (может быть в бесконечности).
///< \en The intersection point of the apex curve ans XY plane is the vertex of the enclosing triangle (may be on infinity). \~
public :
/// \ru Конструктор по умолчанию. \en Default constructor.
MbSectionCode()
: edgeIndex1( 0, 1 )
, faceIndex1( 0, 1 )
, edgeIndex2( 0, 1 )
, faceIndex2( 0, 1 )
MbSectionLayout()
: place ()
, point1 ()
, point2 ()
, vector1()
, vector2()
, apex ()
{}
/// \ru Конструктор. \en Constructor.
MbSectionCode( SArray<MbEdgeFacesIndexes> & edI1, SArray<MbItemIndex> & faI1,
SArray<MbEdgeFacesIndexes> & edI2, SArray<MbItemIndex> & faI2 )
: edgeIndex1( edI1 )
, faceIndex1( faI1 )
, edgeIndex2( edI2 )
, faceIndex2( faI2 )
/// \ru Конструктор по параметрам. \en Constructor by parameters.
MbSectionLayout( const MbPlacement3D & pl, const MbCartPoint3D & pnt1, const MbCartPoint3D & pnt2,
const MbVector3D & vec1, const MbVector3D & vec2, const MbCartPoint3D & apx )
: place ( pl )
, point1 ( pnt1 )
, point2 ( pnt2 )
, vector1( vec1 )
, vector2( vec2 )
, apex ( apx )
{}
/// \ru Конструктор копирования. \en Copy-constructor.
MbSectionCode( const MbSectionCode & other )
: edgeIndex1( other.edgeIndex1 )
, faceIndex1( other.faceIndex1 )
, edgeIndex2( other.edgeIndex2 )
, faceIndex2( other.faceIndex2 )
MbSectionLayout( const MbSectionLayout & other )
: place ( other.place )
, point1 ( other.point1 )
, point2 ( other.point2 )
, vector1( other.vector1 )
, vector2( other.vector2 )
, apex ( other.apex )
{}
/// \ru Деструктор. \en Destructor.
~MbSectionCode() {}
~MbSectionLayout() {}
public:
SArray<MbEdgeFacesIndexes> & SetEdgeIndex1() { return edgeIndex1; }
SArray<MbItemIndex> & SetFaceIndex1() { return faceIndex1; }
SArray<MbEdgeFacesIndexes> & SetEdgeIndex2() { return edgeIndex2; }
SArray<MbItemIndex> & SetFaceIndex2() { return faceIndex2; }
/// \ru Преобразовать элемент согласно матрице. \en Transform element according to the matrix.
void Transform( const MbMatrix3D & matr );
/// \ru Сдвинуть объект вдоль вектора. \en Move an object along a vector.
void Move ( const MbVector3D & to );
/// \ru Повернуть объект вокруг оси на заданный угол. \en Rotate an object at a given angle around an axis.
void Rotate ( const MbAxis3D & axis, double ang );
/// \ru Являются ли объекты равными? \en Determine whether an object is equal?
bool IsSame( const MbSectionCode & other, double accuracy ) const;
// \ru Оператор присваивания. \en The assignment operator.
void operator = ( const MbSectionCode & other ) {
edgeIndex1 = other.edgeIndex1;
faceIndex1 = other.faceIndex1;
edgeIndex2 = other.edgeIndex2;
faceIndex2 = other.faceIndex2;
/// \ru Выдать значения объектов. \en Get an object values. \~
void GetLayout( MbPlacement3D & pl, MbCartPoint3D & pnt1, MbCartPoint3D & pnt2,
MbVector3D & vec1, MbVector3D & vec2, MbCartPoint3D & apx ) const
{
pl = place;
pnt1 = point1;
pnt2 = point2;
vec1 = vector1;
vec2 = vector2;
apx = apex;
}
/// \ru Установить значения объектов. \en Set an object values. \~
void SetLayout( const MbPlacement3D & pl, const MbCartPoint3D & pnt1, const MbCartPoint3D & pnt2,
const MbVector3D & vec1, const MbVector3D & vec2, const MbCartPoint3D & apx )
{
place = pl;
point1 = pnt1;
point2 = pnt2;
vector1 = vec1;
vector2 = vec2;
apex = apx;
}
/// \ru Оператор присваивания. \en Assignment operator.
void operator = ( const MbSectionLayout & other ) {
place = other.place;
point1 = other.point1;
point2 = other.point2;
vector1 = other.vector1;
vector2 = other.vector2;
apex = other.apex;
}
KNOWN_OBJECTS_RW_REF_OPERATORS( MbSectionCode ) // \ru Для работы со ссылками и объектами класса. \en For working with references and objects of the class.
//DECLARE_NEW_DELETE_CLASS( MbSectionCode )
//DECLARE_NEW_DELETE_CLASS_EX( MbSectionCode )
}; // MbSectionCode
}; // MbSectionLayout
//------------------------------------------------------------------------------
/** \brief \ru Данные фантома для торцев поверхности переменного сечения.
\en The parameters of form-generating operation. \~
\details \ru Данные фантома содержат точки и направления сторон охватывающих треугольников на торцах поверхности переменного сечения. \n
\en The phantom data contains the points and directions of the enclosing triangles at the ends of the mutable section surface. \~
\ingroup Build_Parameters
*/
// ---
class MATH_CLASS MbSectionPhantom {
public :
MbSectionLayout begLayout; ///< Данные фантома для начального торца поверхности переменного сечения.
MbSectionLayout endLayout; ///< Данные фантома для конечного торца поверхности переменного сечения.
public :
/// \ru Конструктор по умолчанию. \en Default constructor.
MbSectionPhantom()
: begLayout()
, endLayout()
{}
/// \ru Конструктор по толщинам и замкнутости. \en Constructor by thicknesses and closedness.
MbSectionPhantom( const MbPlacement3D & pl_1, const MbCartPoint3D & pnt1_1, const MbCartPoint3D & pnt2_1,
const MbVector3D & vec1_1, const MbVector3D & vec2_1, const MbCartPoint3D & apx_1,
const MbPlacement3D & pl_2, const MbCartPoint3D & pnt1_2, const MbCartPoint3D & pnt2_2,
const MbVector3D & vec1_2, const MbVector3D & vec2_2, const MbCartPoint3D & apx_2 )
: begLayout( pl_1, pnt1_1, pnt2_1, vec1_1, vec2_1, apx_1 )
, endLayout( pl_2, pnt1_2, pnt2_2, vec1_2, vec2_2, apx_2 )
{}
/// \ru Конструктор копирования. \en Copy-constructor.
MbSectionPhantom( const MbSectionPhantom & other )
: begLayout( other.begLayout )
, endLayout( other.endLayout )
{}
/// \ru Деструктор. \en Destructor.
~MbSectionPhantom() {}
/// \ru Выдать значения объектов. \en Get an object values. \~
void GetLayout( size_t i, MbPlacement3D & pl, MbCartPoint3D & pnt1, MbCartPoint3D & pnt2,
MbVector3D & vec1, MbVector3D & vec2, MbCartPoint3D & apx ) const {
if ( i == 1 )
begLayout.GetLayout( pl, pnt1, pnt2, vec1, vec2, apx );
else
endLayout.GetLayout( pl, pnt1, pnt2, vec1, vec2, apx );
}
/// \ru Установить значения объектов. \en Set an object values. \~
void SetLayout( size_t i, const MbPlacement3D & pl, const MbCartPoint3D & pnt1, const MbCartPoint3D & pnt2,
const MbVector3D & vec1, const MbVector3D & vec2, const MbCartPoint3D & apx ) {
if ( i == 1 )
begLayout.SetLayout( pl, pnt1, pnt2, vec1, vec2, apx );
else
endLayout.SetLayout( pl, pnt1, pnt2, vec1, vec2, apx );
}
/// \ru Оператор присваивания. \en Assignment operator.
void operator = ( const MbSectionPhantom & other ) {
begLayout = other.begLayout;
endLayout = other.endLayout;
}
}; // MbSectionPhantom
#endif // __OP_SWEPT_PARAMETERS_H
+46
View File
@@ -2230,4 +2230,50 @@ public:
KNOWN_OBJECTS_RW_REF_OPERATORS( MbSolidToSheetMetalValues ) // \ru Для работы со ссылками и объектами класса \en For treatment of references and objects of the class
};
//------------------------------------------------------------------------------
/** \brief \ru Исходные данные для операции построения штамповки телом.
\en Input data for stamping by solid operation.
\details \ru Исходные данные для операции построения штамповки телом.
\en Input data for stamping by solid operation. \~
\ingroup Build_Parameters
*/
// ---
class MATH_CLASS MbStampWithToolParams
{
private:
bool _punch; ///< \ru Является тело-инструмент пуансоном или матрицей. \en Is tool body a punch or a die. \~
c3d::SNameMakerSPtr _nameMaker; ///< \ru Именователь. \en An object for naming the new objects. \~
c3d::ConstFaceSPtr _targetFace; ///< \ru Грань штамповки. Всегда не ноль. \en The face for stamping. It is always not nullptr.\~
c3d::FacesSPtrVector _pierceFaces; ///< \ru Вскрываемые для вырубки грани инструмента. \en Pierce faces of tool body. \~
MbToolStampingValues _params; ///< \ru Параметры штамповки. \en The parameters of stamping. \~
public:
/// \ru Конструктор по параметрам. \en Constructor by parameters.
MbStampWithToolParams( const c3d::ConstFaceSPtr & targetFace,
const c3d::FacesSPtrVector & pierceFaces,
const bool punch,
const MbToolStampingValues & params,
const MbSNameMaker & nameMaker );
///\ru Проверить корректность параметров. \en Check whether the parameters are valid.
const bool CheckValid() const;
///\ru Получить грань штамповки. \en Obtain the face for stamping.
const c3d::ConstFaceSPtr & GetTargetFace() const { return _targetFace; }
///\ru Получить вскрываемые для вырубки грани инструмента. \en Obtain the pierce faces of tool body.
const c3d::FacesSPtrVector & GetPierceFacesVector() const { return _pierceFaces; }
///\ru Получить параметры штамповки. \en Obtain the stamping parameters.
const MbToolStampingValues & GetStampingValues() const { return _params; }
///\ru Является тело-инструмент пуансоном (true) или матрицей (false). \en Is tool body a punch (true) or a die (false).
bool IsPunch() const { return _punch; }
///\ru Получить наименователь. \en Obtain an object for naming the new objects.
const MbSNameMaker & GetSimpleNameMaker() const { return *_nameMaker; }
OBVIOUS_PRIVATE_COPY( MbStampWithToolParams )
};
#endif // __SHEET_METAL_PARAM_H
+3 -3
View File
@@ -13,8 +13,8 @@
#include <model_item.h>
#include <topology_faceset.h>
class MATH_CLASS MbSolid;
class MATH_CLASS MbIngotSolidParams;
class MATH_CLASS MbSolid;
namespace c3d // namespace C3D
{
typedef SPtr<MbSolid> SolidSPtr;
@@ -451,7 +451,7 @@ public :
/** \} */
public:
friend MbResultType MakeIngot( RPArray<MbItem> &, bool, const MbSNameMaker &, MbSolid *& );
friend MbResultType MakeIngot( bool, const MbIngotSolidParams &, c3d::SolidSPtr & );
private:
void SetMultiSolidStateDirectly( bool ms ) const { multiState = ms ? ms_Multiple : ms_Single; }
+2
View File
@@ -232,6 +232,8 @@ public:
MbFunction & SetFunction() { return *function; }
/// \ru Заменить функцию изменения радиуса. \en Set a function of radius changing.
void SetFunction( MbFunction & funcNew ); // \ru (новая функция должна быть корректна) \en (new function must be correct)
/// \ru Построить функцию изменения радиуса от параметра u1 до параметра u2. \en Construct a function for changing the radius from parameter u1 to parameter u2.
MbFunction * MakeFunction( double u1, double u2 ) const;
/** \} */
private:
+4 -4
View File
@@ -151,8 +151,8 @@ protected:
\en The reference curve (spine). \~
\param[in] c0 - \ru Осевая кривая.
\en The axis curve. \~
\param[in] f - \ru Форма сечения поверхности (cs_Cycle).
\en The form of the surface section (cs_Cycle). \~
\param[in] f - \ru Форма сечения поверхности (cs_Round).
\en The form of the surface section (cs_Round). \~
\param[in] uBeg - \ru Минимальное значение первого параметра поверхности (uBeg<uEnd).
\en The minimum value of the first surface parameter (uBeg<uEnd). \~
\param[in] uEnd - \ru Максимальное значение первого параметра поверхности (0<uEnd<M_IP2).
@@ -180,8 +180,8 @@ public:
\en The reference curve (spine). \~
\param[in] g1 - \ru Первая направляющая кривая.
\en The first guide curve. \~
\param[in] g2 - \ru Вторая направляющая кривая (g1==g2 совпадает с первой при cs_Cycle).
\en The second guide curve (g1==g2 the same first guide for cs_Cycle). \~
\param[in] g2 - \ru Вторая направляющая кривая (g1==g2 совпадает с первой при cs_Round).
\en The second guide curve (g1==g2 the same first guide for cs_Round). \~
\param[in] c0 - \ru Дополнительная направляющая кривая (может быть nullptr).
\en The additional guide curve (may be nullptr). \~
\param[in] f - \ru Форма сечения поверхности.
+11
View File
@@ -46,6 +46,17 @@ struct MemoryLeaksController
MATH_FUNC( void ) AddController( MemoryLeaksControllerPtr );
#ifdef _UNICODE
//------------------------------------------------------------------------------
/** \brief \ru Добавить внешнюю библиотеку контроллером утечек памяти.
\en Add memory leaks controller. \~
\ingroup Base_Tools
*/
// ---
MATH_FUNC(void) AddExternalController( const std::wstring & dllName, const std::string & funcName, const std::wstring & args );
#endif //_UNICODE
//------------------------------------------------------------------------------
/** \brief \ru Собрать утечки. Необходимо вызвать перед выходом из приложения, чтобы выполнить именование утекающих объектов.
\en Collect leaks. The function should be called before exiting the application to names the leaking objects. \~
+42 -3
View File
@@ -14,6 +14,7 @@
#include <templ_rp_array.h>
#include <templ_css_array.h>
#include <templ_three_states.h>
#include <templ_sptr.h>
#include <mb_rect.h>
#include <mb_placement3d.h>
#include <mb_rect1d.h>
@@ -24,7 +25,7 @@
#include <set>
#include <vector>
#include <surface.h>
#include <op_binding_data.h>
class MATH_CLASS MbCurve;
class MATH_CLASS MbContour;
@@ -1377,6 +1378,14 @@ public:
};
//------------------------------------------------------------------------------
// Сортировка MbItemIndex
// ---
inline int ItemIndexCompare( const MbItemIndex * first, const MbItemIndex * second ) {
return second->GetIndex() < first->GetIndex() ? 1 : -1;
}
//------------------------------------------------------------------------------
/** \brief \ru Грань.
\en Face. \~
@@ -1664,9 +1673,39 @@ public:
MbOrientedEdge * SetOrientedEdge( const MbCurveEdge & curveEdge );
/// \ru Удалить ориентированное ребро по ребру грани. \en Remove an oriented edge by the edge of a face.
bool DeleteOrientedEdge( MbCurveEdge * curveEdge );
/// \ru Найти номера для рёбер. \en Find numbers for the edges.
bool FindIndexByEdges( const RPArray<MbCurveEdge> & initEdges, SArray<MbItemIndex> & indexes ) const;
template<class EdgeVector>
bool FindIndexByEdges( const EdgeVector & initEdges,
SArray<MbItemIndex> & indexes ) const {
MbItemIndex ind;
for ( size_t n = 0, nCount = initEdges.size(); n < nCount; n++ ) {
SPtr<MbCurveEdge> initEdge( initEdges[n]);
size_t number = 0;
for ( size_t i = 0, iCount = loops.Count(); i < iCount; i++ ) {
MbLoop * loop = loops[i];
for( size_t j = 0, jCount = loop->GetEdgesCount(); j < jCount; j++ ) {
MbOrientedEdge * oe = loop->_GetOrientedEdge( j );
if ( &oe->GetCurveEdge() == initEdge ) {
ind.Init( oe->GetCurveEdge(), number );
indexes.Add( ind );
i = iCount;
j = jCount; // выход из циклов
}
number++;
}
}
initEdge.detach();
}
// сортировка по возрастанию номера
size_t indCount = indexes.Count();
if ( indCount > 1 )
QuickSort<MbItemIndex, MbItemIndex, MbItemIndex>( indexes.begin(), indCount, (KsQSortCompFunc)ItemIndexCompare );
return indCount > 0;
}
/// \ru Найти рёбра по номерам. \en Find edges by numbers.
bool FindEdgesByIndex( SArray<MbItemIndex> & indexes, RPArray<MbCurveEdge> & initEdges ) const;
+45
View File
@@ -508,4 +508,49 @@ MATH_FUNC (bool) CreateWireFrame( MbWireFrame *& result,
const MbCreator * creator = nullptr );
//------------------------------------------------------------------------------
/** \brief \ru Создать каркас по кривой.
\en Create a frame by a curve. \~
\details \ru Создать или обновить каркас по кривой. \n
\en Create or update a frame by a curve. \n \~
\param[in] curve - \ru Кривая для построения каркаса.
\en A curve for the frame construction. \~
\param[in] snMaker - \ru Именователь кривых каркаса.
\en An object defining the frame curves names. \~
\param[out] result - \ru Каркас, подлежащий замене или построению.
\en A frame to replace or construct. \~
\param[in] creator - \ru Строитель каркаса.
\en A creator of a frame. \~
\result \ru Возвращает true, если присланный каркас обновился, или был создан новый при отсутствии каркаса на входе.
\en Returns true if the sent frame has been updated or if the new frame has been created without a frame in the input. \~
\ingroup Curve3D_Modeling
*/ // ---
MATH_FUNC (bool) CreateWireFrame( const MbCurve3D & curve,
const MbSNameMaker & snMaker,
c3d::WireFrameSPtr & result,
const c3d::CreatorSPtr & creator = nullptr );
//------------------------------------------------------------------------------
/** \brief \ru Создать каркас по множеству кривых.
\en Create a frame by a set of curves. \~
\details \ru Создать или обновить каркас по множеству кривых. \n
\en Create or update a frame by a set of curves. \n \~
\param[in] curves - \ru Кривые для построения каркаса.
\en Curves for the frame construction. \~
\param[in] snMaker - \ru Именователь кривых каркаса.
\en An object defining the frame curves names. \~
\param[out] result - \ru Каркас, подлежащий замене или построению.
\en A frame to replace or construct. \~
\param[in] creator - \ru Строитель каркаса.
\en A creator of a frame. \~
\result \ru Возвращает true, если присланный каркас обновился, или был создан новый при отсутствии каркаса на входе.
\en Returns true if the sent frame has been updated or if the new frame has been created without a frame in the input. \~
\ingroup Curve3D_Modeling
*/ // ---
MATH_FUNC( bool ) CreateWireFrame( const c3d::SpaceCurvesSPtrVector & curves,
const MbSNameMaker & snMaker,
c3d::WireFrameSPtr & result,
const c3d::CreatorSPtr & creator = nullptr );
#endif // __WIRE_FRAME_H
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.