- C3d aggiornamento librerie ( 118044).
This commit is contained in:
SaraP
2025-08-28 14:47:28 +02:00
parent daccdfc398
commit f05795ffff
53 changed files with 1756 additions and 520 deletions
+44 -20
View File
@@ -12,7 +12,6 @@
#include <templ_rp_array.h>
#include <templ_s_array.h>
#include <templ_sptr.h>
#include <math_define.h>
#include <mb_placement3d.h>
@@ -34,6 +33,7 @@ class MbCurve;
class MbSurfaceIntersectionCurve;
class MbSNameMaker;
class MbSolid;
class MbWireFrame;
struct MbControlData3D;
class MbRegDuplicate;
class MbRegTransform;
@@ -46,12 +46,12 @@ enum MbeCopyMode;
\en Truncating elements. \~
\details \ru Усекающие элементы используются для разделения граней на части и усечения оболочек.
Усечение может выполняться двумерными кривыми, расположенными в плоскости XY локальной системы координат,
трёхмерными кривыми, поверхностями и оболочками.
трёхмерными кривыми, поверхностями, оболочками и каркасом.
Усекающие элементы используются в строителе усеченной оболочки MbTruncatedShell и
строителе оболочки с разбиением граней MbSplitShell. \n
\en Truncating elements are used for splitting faces into parts and truncation of shells.
Truncating can be performed by two-dimensional curves located in the XY plane of the local coordinate system,
by three-dimensional curves, surfaces and shells.
by three-dimensional curves, surfaces, shells and wire frame.
Truncating elements are used in the creator of truncated shell MbTruncatedShell and
in the creator of shell with face splitting MbSplitShell. \n \~
\ingroup Shell_Building_Parameters
@@ -60,11 +60,12 @@ enum MbeCopyMode;
class MATH_CLASS MbSplitData : public MbRefItem {
/// \ru Типы усекающих объектов. \en Truncating objects types.
enum MbeSplitItemsType {
sit_NoItems = 0, ///< \ru Нет объектов. \en No objects.
sit_Curves2d = 1, ///< \ru Двумерные кривые в локальной системе координат. \en Two-dimensional curves in the local coordinate system.
sit_Curves3d = 2, ///< \ru Трехмерные кривые. \en Three-dimensional curves.
sit_Surfaces = 3, ///< \ru Поверхности. \en Surfaces.
sit_Creators = 4, ///< \ru Строители тела. \en Solid creators.
sit_NoItems = 0, ///< \ru Нет объектов. \en No objects.
sit_Curves2d = 1, ///< \ru Двумерные кривые в локальной системе координат. \en Two-dimensional curves in the local coordinate system.
sit_Curves3d = 2, ///< \ru Трехмерные кривые. \en Three-dimensional curves.
sit_Surfaces = 3, ///< \ru Поверхности. \en Surfaces.
sit_Creators = 4, ///< \ru Строители тела. \en Solid creators.
sit_WfCreators = 5, ///< \ru Строители каркаса. \en Wire frame.
};
private:
@@ -80,6 +81,8 @@ private:
// Shell
c3d::CreatorsSPtrVector creators; ///< \ru Строители оболочки. \en Shell creators.
c3d::ShellSPtr solidShell; ///< \ru Оболочка. \en A shell.
// Wire frame
c3d::CreatorsSPtrVector wfCreators; ///< \ru Строители каркаса. \en Wire frame creators.
public:
/// \ru Конструктор. \en Constructor.
@@ -91,7 +94,8 @@ public:
, spaceCurves ( )
, surfaces ( )
, creators ( )
, solidShell ( nullptr )
, solidShell ( nullptr )
, wfCreators ( )
{
}
/// \ru Конструктор по двумерному контуру в локальной системе координат. \en Constructor by two-dimensional contour in the local coordinate system.
@@ -103,7 +107,8 @@ public:
, spaceCurves ( )
, surfaces ( )
, creators ( )
, solidShell ( nullptr )
, solidShell ( nullptr )
, wfCreators ( )
{
SPtr<MbContour> sketchContour;
sketchContour = same ? const_cast<MbContour *>(&item) : static_cast<MbContour *>(&item.Duplicate());
@@ -118,7 +123,8 @@ public:
, spaceCurves ( )
, surfaces ( )
, creators ( )
, solidShell ( nullptr )
, solidShell ( nullptr )
, wfCreators ( )
{
C3D_ASSERT( (direction.MaxFactor() < LENGTH_EPSILON) || !direction.Orthogonal( place.GetAxisZ(), ANGLE_EPSILON ) );
@@ -136,7 +142,8 @@ public:
, spaceCurves ( )
, surfaces ( )
, creators ( )
, solidShell ( nullptr )
, solidShell ( nullptr )
, wfCreators ( )
{
::AddRefItems( items, same, sketchContours );
}
@@ -150,7 +157,8 @@ public:
, spaceCurves ( )
, surfaces ( )
, creators ( )
, solidShell ( nullptr )
, solidShell ( nullptr )
, wfCreators ( )
{
C3D_ASSERT( (direction.MaxFactor() < LENGTH_EPSILON) || !direction.Orthogonal( place.GetAxisZ(), ANGLE_EPSILON ) );
@@ -165,7 +173,8 @@ public:
, spaceCurves ( )
, surfaces ( )
, creators ( )
, solidShell ( nullptr )
, solidShell ( nullptr )
, wfCreators ( )
{
::AddRefItems( items, same, spaceCurves );
}
@@ -178,7 +187,8 @@ public:
, spaceCurves ( )
, surfaces ( )
, creators ( )
, solidShell ( nullptr )
, solidShell ( nullptr )
, wfCreators ( )
{
::AddRefItems( items, same, spaceCurves );
}
@@ -191,7 +201,8 @@ public:
, spaceCurves ( )
, surfaces ( )
, creators ( )
, solidShell ( nullptr )
, solidShell ( nullptr )
, wfCreators ( )
{
SPtr<MbSurface> surface;
surface = same ? const_cast<MbSurface *>(&item) : static_cast<MbSurface *>(&item.Duplicate());
@@ -206,7 +217,8 @@ public:
, spaceCurves ( )
, surfaces ( )
, creators ( )
, solidShell ( nullptr )
, solidShell ( nullptr )
, wfCreators ( )
{
::AddRefItems( items, same, surfaces );
}
@@ -219,12 +231,15 @@ public:
, spaceCurves ( )
, surfaces ( )
, creators ( )
, solidShell ( nullptr )
, solidShell ( nullptr )
, wfCreators ( )
{
::AddRefItems( items, same, surfaces );
}
/// \ru Конструктор по телу. \en Constructor by a solid.
MbSplitData( const MbSolid & solid, bool same, bool keepShell );
/// \ru Конструктор по каркасу. \en
MbSplitData( const MbWireFrame & wireFrame, bool same );
/// \ru Конструктор копирования с регистратором копирования. \en Copy constructor with registrator of copying.
explicit MbSplitData( const MbSplitData &, bool same, MbRegDuplicate * iReg );
/// \ru Деструктор. \en Destructor.
@@ -353,7 +368,8 @@ public:
return ( sketchContours.empty() &&
spaceCurves.empty() &&
surfaces.empty() &&
(creators.empty() && (solidShell == nullptr)) ); }
(creators.empty() && (solidShell == nullptr)) &&
wfCreators.empty() ); }
/// \ru Являются ли объекты равными? \en Determine whether an object is equal?
bool IsSame( const MbSplitData &, double accuracy ) const;
@@ -493,12 +509,20 @@ public:
::DetachItem( creator );
}
}
/// \ru Получить хранимую оболочку. \en Get stored shell.
/// \ru Получить хранимую оболочку. \en Get stored shell.
const MbFaceShell * GetSolidShell() const { return solidShell; }
/// \ru Создать оболочку по строителям (solidShell остается нетронутой). \en Create a shell by creators (solidShell remains unchanged).
MbFaceShell * CreateShell( MbeCopyMode copyMode );
/// \ru Создать оболочку по строителям. \en Create a shell by creators (solidShell remains unchanged).
bool UpdateShell( MbeCopyMode copyMode );
/// \ru Выдать количество строителей тела. \en Get number of wire frame creators.
size_t GetWFrameCreatorsCount() const { return wfCreators.size(); }
/// \ru Получить строитель каркаса по индексу. \en Get wire frame constructor by index.
const MbCreator * GetWireFrameCreator( size_t k ) const { return ((k < wfCreators.size()) ? wfCreators[k].get() : nullptr ); }
/// \ru Получить строитель каркаса по индексу. \en Get wire frame constructor by index.
MbCreator * SetWireFrameCreator( size_t k ) { return ((k < wfCreators.size()) ? wfCreators[k].get() : nullptr ); }
/// \ru Создать каркас по строителям. \en Create a wire frame by creators.
MbWireFrame * CreateWireFrame( MbeCopyMode copyMode );
/// \ru Удалить данные. \en Delete data.
void DeleteItems();
/// \ru Прочитать данные. \en Read data.